This commit is contained in:
2023-10-30 19:19:09 -07:00
parent 0a6d75d2d1
commit 648f3581bb
2 changed files with 12 additions and 30 deletions

View File

@@ -1029,10 +1029,7 @@
<asp:HiddenField ID="HdnPS" runat="server" Value="-1" /> <asp:HiddenField ID="HdnPS" runat="server" Value="-1" />
<asp:HiddenField ID="HdnCodigoPS" runat="server" Value="-1" /> <asp:HiddenField ID="HdnCodigoPS" runat="server" Value="-1" />
<asp:HiddenField ID="HdnTipoPS" runat="server" Value="-1" /> <asp:HiddenField ID="HdnTipoPS" runat="server" Value="-1" />
<asp:HiddenField ID="HdnTipoInv" runat="server" Value="-1" /> <asp:HiddenField ID="HdnTipoInv" runat="server" Value="-1" />
<asp:HiddenField ID="HdnAsientoContable" runat="server" Value="-1" />
<asp:HiddenField ID="HdnCtaContable" runat="server" Value="-1" />
<asp:HiddenField ID="HdnAplicaParaConcepto" runat="server" Value="-1" />
<asp:HiddenField ID="HdnCodigo" runat="server" Value="-1" /> <asp:HiddenField ID="HdnCodigo" runat="server" Value="-1" />
<asp:HiddenField ID="HdnAplicaIEPS" runat="server" Value="-1" /> <asp:HiddenField ID="HdnAplicaIEPS" runat="server" Value="-1" />
<asp:HiddenField ID="HdnPorcentajeIEPS" runat="server" Value="-1" /> <asp:HiddenField ID="HdnPorcentajeIEPS" runat="server" Value="-1" />

View File

@@ -2320,10 +2320,6 @@ Partial Class Ventas
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If EsProduccion Then
If UsuarioActual.CveEmpresa.Contiene(141, 152, 153, 160, 161, 162) Then System.Threading.Thread.Sleep(2000)
End If
If Not IsPostBack Then If Not IsPostBack Then
If IfNull(Request("Opcionx"), "").ToString = "Saldar" And UsuarioActual.CveUsuario = 100 Then If IfNull(Request("Opcionx"), "").ToString = "Saldar" And UsuarioActual.CveUsuario = 100 Then
@@ -3209,7 +3205,6 @@ Partial Class Ventas
ThProyecto.Visible = False ThProyecto.Visible = False
For Each Gvr As GridViewRow In GvPS.Rows For Each Gvr As GridViewRow In GvPS.Rows
Gvr.FCLinkButton("imgE").Visible = False Gvr.FCLinkButton("imgE").Visible = False
Gvr.FCLinkButton("imgEPyME").Visible = True
Next Next
LnkAddVenta.Visible = True LnkAddVenta.Visible = True
End If End If
@@ -7376,8 +7371,8 @@ Partial Class Ventas
Else Else
'VERIFICAR RESTRICCIONES DEL CLIENTE 'VERIFICAR RESTRICCIONES DEL CLIENTE
If Not UsuarioActual.Empresa.Funcionalidad(702).ToEntero() > 0 Then If UsuarioActual.Empresa.Funcionalidad(702) = "" Then
If DdlTipoComprobante.SelectedValue = "Cot" AndAlso CveVenta > 0 AndAlso RBLPago.SelectedValue = "2" Then If Not (DdlTipoComprobante.SelectedValue = "Cot" AndAlso CveVenta > 0 AndAlso RBLPago.SelectedValue = "2") Then
Dim Vta As New ClsVentas Dim Vta As New ClsVentas
Dim Opcion As Integer = Vta.ObtenerClienteLimitesVenta(CveCliente, UsuarioActual.CveEmpresa) Dim Opcion As Integer = Vta.ObtenerClienteLimitesVenta(CveCliente, UsuarioActual.CveEmpresa)
Dim OpcionMsg As String = String.Format("El Cliente se encuentra bloqueado por la siguiente razón: <br> <br> {0}", Vta.SerieVenta) Dim OpcionMsg As String = String.Format("El Cliente se encuentra bloqueado por la siguiente razón: <br> <br> {0}", Vta.SerieVenta)
@@ -7867,7 +7862,7 @@ Partial Class Ventas
e.Row.FCDropDownList("DdlSubProyecto").DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, dr("CveProyecto").ToString().ToEntero(), UsuarioActual.CveEmpresa, -1, 1) e.Row.FCDropDownList("DdlSubProyecto").DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, dr("CveProyecto").ToString().ToEntero(), UsuarioActual.CveEmpresa, -1, 1)
e.Row.FCDropDownList("DdlSubProyecto").DataBind() e.Row.FCDropDownList("DdlSubProyecto").DataBind()
e.Row.FCDropDownList("DdlSubProyecto").SelectedValue = e.Row.DBCampo("CveSubProyecto") e.Row.FCDropDownList("DdlSubProyecto").SelectedValueExist(e.Row.DBCampo("CveSubProyecto"))
End If End If
@@ -8474,8 +8469,11 @@ Partial Class Ventas
If GvPS.Rows(e.RowIndex).FCDropDownList("DdlSubProyecto").Items.Count = 0 Then If GvPS.Rows(e.RowIndex).FCDropDownList("DdlSubProyecto").Items.Count = 0 Then
TmpDT.Rows(e.RowIndex)("SubProyecto") = "Sin SubProyecto Asignado" TmpDT.Rows(e.RowIndex)("SubProyecto") = "Sin SubProyecto Asignado"
Else Else
TmpDT.Rows(e.RowIndex)("SubProyecto") = GvPS.Rows(e.RowIndex).FCDropDownList("DdlSubProyecto").SelectedItem.Text 'si está visible en el encabezado, si no esta visible que no actualice, porque generar error, selecciona el primer item
TmpDT.Rows(e.RowIndex)("CveSubProyecto") = GvPS.Rows(e.RowIndex).FCDropDownList("DdlSubProyecto").SelectedValue If DdlSubProyecto.Visible Then
TmpDT.Rows(e.RowIndex)("SubProyecto") = GvPS.Rows(e.RowIndex).FCDropDownList("DdlSubProyecto").SelectedItem.Text
TmpDT.Rows(e.RowIndex)("CveSubProyecto") = GvPS.Rows(e.RowIndex).FCDropDownList("DdlSubProyecto").SelectedValue
End If
End If End If
'RELACIONAL PS CON EL DESCUENTO 'RELACIONAL PS CON EL DESCUENTO
@@ -15799,6 +15797,7 @@ Partial Class Ventas
Pago.CveVentaAmortizacion = gvr.DataKey("CveVenta").ToEntero() Pago.CveVentaAmortizacion = gvr.DataKey("CveVenta").ToEntero()
Pago.AplicaTraslado = gvr.DataKey("RegresarImpuesto") = "1" Pago.AplicaTraslado = gvr.DataKey("RegresarImpuesto") = "1"
Pago.Referencia = gvr.DataKey("Folio") Pago.Referencia = gvr.DataKey("Folio")
Pago.CveClientePago = gvr.DataKey("CveCliente").ToEntero()
ErrorConta = AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjConta) ErrorConta = AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjConta)
@@ -16692,8 +16691,6 @@ Partial Class Ventas
HdnIVAPS.Value = If(drPS("IVA").ToString() = "-1", ViewState("IVA"), drPS("IVA").ToString()).ToString() HdnIVAPS.Value = If(drPS("IVA").ToString() = "-1", ViewState("IVA"), drPS("IVA").ToString()).ToString()
HdnIVARetAPS.Value = drPS("RetIVA").ToString() HdnIVARetAPS.Value = drPS("RetIVA").ToString()
HdnAsientoContable.Value = drPS("AsientoContableVentas").ToString()
HdnAplicaParaConcepto.Value = drPS("AplicaParaConcepto").ToString()
HdnCodigo.Value = drPS("Codigo").ToString() HdnCodigo.Value = drPS("Codigo").ToString()
If DdlClasificacion.SelectedIndex = 0 Then If DdlClasificacion.SelectedIndex = 0 Then
If drPS("CveClasificacion").ToString() IsNot Nothing Then If drPS("CveClasificacion").ToString() IsNot Nothing Then
@@ -18028,9 +18025,6 @@ Partial Class Ventas
HdnIVARetAPS.Value = "-1" HdnIVARetAPS.Value = "-1"
HdnAplicaIEPS.Value = "False" HdnAplicaIEPS.Value = "False"
HdnPorcentajeIEPS.Value = "0" HdnPorcentajeIEPS.Value = "0"
HdnAsientoContable.Value = "-1"
HdnCtaContable.Value = "-1"
HdnAplicaParaConcepto.Value = "False"
HdnCodigo.Value = "-1" HdnCodigo.Value = "-1"
TxtCuentaPredial.Text = "" TxtCuentaPredial.Text = ""
' codigo comentado RMF. 2016.06.13, esto paa que respete el que tenga selecionado e nla sucursal ' codigo comentado RMF. 2016.06.13, esto paa que respete el que tenga selecionado e nla sucursal
@@ -18506,9 +18500,7 @@ Partial Class Ventas
TmpDT.Columns.Add("Total", GetType(Decimal)) TmpDT.Columns.Add("Total", GetType(Decimal))
TmpDT.Columns.Add("RetIVA", GetType(Decimal)) TmpDT.Columns.Add("RetIVA", GetType(Decimal))
TmpDT.Columns.Add("RetISR", GetType(Decimal)) TmpDT.Columns.Add("RetISR", GetType(Decimal))
'Para uso del módulo contable 'Para uso del módulo contable
TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer))
TmpDT.Columns.Add("AplicaParaConcepto", GetType(Boolean))
TmpDT.Columns.Add("CveProyecto", GetType(Integer)) TmpDT.Columns.Add("CveProyecto", GetType(Integer))
TmpDT.Columns.Add("Proyecto", GetType(String)) TmpDT.Columns.Add("Proyecto", GetType(String))
TmpDT.Columns.Add("CveSubProyecto", GetType(Integer)) TmpDT.Columns.Add("CveSubProyecto", GetType(Integer))
@@ -21578,8 +21570,6 @@ Partial Class Ventas
HdnPorcentajeIEPS.Value = DrProducto("IEPSPorcentaje").ToString() HdnPorcentajeIEPS.Value = DrProducto("IEPSPorcentaje").ToString()
HdnIVAPS.Value = If(DrProducto("IVA").ToString() = "-1", ViewState("IVA"), DrProducto("IVA").ToString()).ToString() HdnIVAPS.Value = If(DrProducto("IVA").ToString() = "-1", ViewState("IVA"), DrProducto("IVA").ToString()).ToString()
HdnIVARetAPS.Value = DrProducto("RetIVA").ToString() HdnIVARetAPS.Value = DrProducto("RetIVA").ToString()
HdnAsientoContable.Value = DrProducto("AsientoContableVentas").ToString()
HdnAplicaParaConcepto.Value = DrProducto("AplicaParaConcepto").ToString()
HdnCodigo.Value = DrProducto("Codigo").ToString() HdnCodigo.Value = DrProducto("Codigo").ToString()
If ValidaAgregarPS(DrProducto("CvePS").ToString().ToEntero(), DrProducto("CveUM").ToString().ToEntero(), TxtPrecio.Text.Trim.ToDouble, DrProducto("CveTipoPS").ToString().ToEntero()) Then If ValidaAgregarPS(DrProducto("CvePS").ToString().ToEntero(), DrProducto("CveUM").ToString().ToEntero(), TxtPrecio.Text.Trim.ToDouble, DrProducto("CveTipoPS").ToString().ToEntero()) Then
@@ -24763,9 +24753,6 @@ Partial Class Ventas
HdnPorcentajeIEPS.Value = "-1" HdnPorcentajeIEPS.Value = "-1"
HdnIVAPS.Value = "0.16" HdnIVAPS.Value = "0.16"
HdnIVARetAPS.Value = "0" HdnIVARetAPS.Value = "0"
HdnAsientoContable.Value = "1"
HdnCtaContable.Value = "0"
HdnAplicaParaConcepto.Value = "False"
HdnCodigo.Value = TxtCodigoPS.Text.Trim HdnCodigo.Value = TxtCodigoPS.Text.Trim
End If End If
@@ -33789,9 +33776,7 @@ Partial Class Ventas
TmpDT.Columns.Add("TipoDescuento", GetType(Integer)) TmpDT.Columns.Add("TipoDescuento", GetType(Integer))
TmpDT.Columns.Add("TotalImporte", GetType(Decimal)) TmpDT.Columns.Add("TotalImporte", GetType(Decimal))
TmpDT.Columns.Add("Total", GetType(Decimal)) TmpDT.Columns.Add("Total", GetType(Decimal))
'Para uso del módulo contable 'Para uso del módulo contable
TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer))
TmpDT.Columns.Add("AplicaParaConcepto", GetType(Boolean))
TmpDT.Columns.Add("CveProyecto", GetType(Integer)) TmpDT.Columns.Add("CveProyecto", GetType(Integer))
TmpDT.Columns.Add("Proyecto", GetType(String)) TmpDT.Columns.Add("Proyecto", GetType(String))
TmpDT.Columns.Add("CveSubProyecto", GetType(Integer)) TmpDT.Columns.Add("CveSubProyecto", GetType(Integer))