From 648f3581bbaae6532b9898c9756cefcc0e6f7286 Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 30 Oct 2023 19:19:09 -0700 Subject: [PATCH] - --- Ventas/Ventas.aspx | 5 +---- Ventas/Ventas.aspx.vb | 37 +++++++++++-------------------------- 2 files changed, 12 insertions(+), 30 deletions(-) diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 6c126fd2d..a37d7075f 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -1029,10 +1029,7 @@ - - - - + diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 984c85f62..95d27a523 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -2320,10 +2320,6 @@ Partial Class Ventas 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 IfNull(Request("Opcionx"), "").ToString = "Saldar" And UsuarioActual.CveUsuario = 100 Then @@ -3209,7 +3205,6 @@ Partial Class Ventas ThProyecto.Visible = False For Each Gvr As GridViewRow In GvPS.Rows Gvr.FCLinkButton("imgE").Visible = False - Gvr.FCLinkButton("imgEPyME").Visible = True Next LnkAddVenta.Visible = True End If @@ -7376,8 +7371,8 @@ Partial Class Ventas Else 'VERIFICAR RESTRICCIONES DEL CLIENTE - If Not UsuarioActual.Empresa.Funcionalidad(702).ToEntero() > 0 Then - If DdlTipoComprobante.SelectedValue = "Cot" AndAlso CveVenta > 0 AndAlso RBLPago.SelectedValue = "2" Then + If UsuarioActual.Empresa.Funcionalidad(702) = "" Then + If Not (DdlTipoComprobante.SelectedValue = "Cot" AndAlso CveVenta > 0 AndAlso RBLPago.SelectedValue = "2") Then Dim Vta As New ClsVentas 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:

{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").DataBind() - e.Row.FCDropDownList("DdlSubProyecto").SelectedValue = e.Row.DBCampo("CveSubProyecto") + e.Row.FCDropDownList("DdlSubProyecto").SelectedValueExist(e.Row.DBCampo("CveSubProyecto")) End If @@ -8474,8 +8469,11 @@ Partial Class Ventas If GvPS.Rows(e.RowIndex).FCDropDownList("DdlSubProyecto").Items.Count = 0 Then TmpDT.Rows(e.RowIndex)("SubProyecto") = "Sin SubProyecto Asignado" Else - 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 + 'si está visible en el encabezado, si no esta visible que no actualice, porque generar error, selecciona el primer item + 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 'RELACIONAL PS CON EL DESCUENTO @@ -15799,6 +15797,7 @@ Partial Class Ventas Pago.CveVentaAmortizacion = gvr.DataKey("CveVenta").ToEntero() Pago.AplicaTraslado = gvr.DataKey("RegresarImpuesto") = "1" Pago.Referencia = gvr.DataKey("Folio") + Pago.CveClientePago = gvr.DataKey("CveCliente").ToEntero() 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() HdnIVARetAPS.Value = drPS("RetIVA").ToString() - HdnAsientoContable.Value = drPS("AsientoContableVentas").ToString() - HdnAplicaParaConcepto.Value = drPS("AplicaParaConcepto").ToString() HdnCodigo.Value = drPS("Codigo").ToString() If DdlClasificacion.SelectedIndex = 0 Then If drPS("CveClasificacion").ToString() IsNot Nothing Then @@ -18028,9 +18025,6 @@ Partial Class Ventas HdnIVARetAPS.Value = "-1" HdnAplicaIEPS.Value = "False" HdnPorcentajeIEPS.Value = "0" - HdnAsientoContable.Value = "-1" - HdnCtaContable.Value = "-1" - HdnAplicaParaConcepto.Value = "False" HdnCodigo.Value = "-1" TxtCuentaPredial.Text = "" ' 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("RetIVA", GetType(Decimal)) TmpDT.Columns.Add("RetISR", GetType(Decimal)) - 'Para uso del módulo contable - TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer)) - TmpDT.Columns.Add("AplicaParaConcepto", GetType(Boolean)) + 'Para uso del módulo contable TmpDT.Columns.Add("CveProyecto", GetType(Integer)) TmpDT.Columns.Add("Proyecto", GetType(String)) TmpDT.Columns.Add("CveSubProyecto", GetType(Integer)) @@ -21578,8 +21570,6 @@ Partial Class Ventas HdnPorcentajeIEPS.Value = DrProducto("IEPSPorcentaje").ToString() HdnIVAPS.Value = If(DrProducto("IVA").ToString() = "-1", ViewState("IVA"), DrProducto("IVA").ToString()).ToString() HdnIVARetAPS.Value = DrProducto("RetIVA").ToString() - HdnAsientoContable.Value = DrProducto("AsientoContableVentas").ToString() - HdnAplicaParaConcepto.Value = DrProducto("AplicaParaConcepto").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 @@ -24763,9 +24753,6 @@ Partial Class Ventas HdnPorcentajeIEPS.Value = "-1" HdnIVAPS.Value = "0.16" HdnIVARetAPS.Value = "0" - HdnAsientoContable.Value = "1" - HdnCtaContable.Value = "0" - HdnAplicaParaConcepto.Value = "False" HdnCodigo.Value = TxtCodigoPS.Text.Trim End If @@ -33789,9 +33776,7 @@ Partial Class Ventas TmpDT.Columns.Add("TipoDescuento", GetType(Integer)) TmpDT.Columns.Add("TotalImporte", GetType(Decimal)) TmpDT.Columns.Add("Total", GetType(Decimal)) - 'Para uso del módulo contable - TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer)) - TmpDT.Columns.Add("AplicaParaConcepto", GetType(Boolean)) + 'Para uso del módulo contable TmpDT.Columns.Add("CveProyecto", GetType(Integer)) TmpDT.Columns.Add("Proyecto", GetType(String)) TmpDT.Columns.Add("CveSubProyecto", GetType(Integer))