From e58f2ece36b8d38f5405fe22f48e0393d96ee1d2 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Mon, 21 Apr 2025 14:42:36 -0700 Subject: [PATCH 1/5] =?UTF-8?q?--Sob/Fal=20en=20impresi=C3=B3n=20de=20poli?= =?UTF-8?q?za=20en=20deposito=20de=20caja?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bancos/DepositosCaja.aspx | 2 +- Bancos/DepositosCaja.aspx.vb | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Bancos/DepositosCaja.aspx b/Bancos/DepositosCaja.aspx index 085d86b98..599a630af 100644 --- a/Bancos/DepositosCaja.aspx +++ b/Bancos/DepositosCaja.aspx @@ -372,7 +372,7 @@
- + diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb index 0ae16b335..77b25a49a 100644 --- a/Bancos/DepositosCaja.aspx.vb +++ b/Bancos/DepositosCaja.aspx.vb @@ -323,8 +323,17 @@ Partial Class Bancos_DepositosCaja End If End If - NuevaCvePrePoliza = ObjConta.AddPrePolizas("DepCaja", 13, TotalImportePrePoliza, TotalImportePrePoliza, CveMoneda, Fecha, $"Depósito Bancario - {DdlTipoDeposito.SelectedItem.Text}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=1) + Dim ImporteSobFaltante As Decimal = 0 + If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then + For Each Gvr As GridViewRow In GvFacturas.Rows + If Gvr.FCCheckBox("ChkFactura").Checked Then + ImporteSobFaltante += Gvr.DataKey("SobranteFaltante").ToDecimal() + End If + Next + End If + + NuevaCvePrePoliza = ObjConta.AddPrePolizas("DepCaja", 13, TotalImportePrePoliza, TotalImportePrePoliza, CveMoneda, Fecha, $"Depósito Bancario - {DdlTipoDeposito.SelectedItem.Text} {If(ImporteSobFaltante <> 0, $"- Sobrante/faltante: ${ImporteSobFaltante:N2}", "")}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=1) Dim CveTransaccionBanco As Integer = DdlTipoDeposito.SelectedValue.ToEntero From 490f2bc8d367b5492cf84259d7d801feb6608dbc Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Mon, 21 Apr 2025 16:07:38 -0700 Subject: [PATCH 2/5] --FIX clientes --- Ventas/Clientes.aspx.vb | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index d29106f29..92714d0e2 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -2606,18 +2606,7 @@ Partial Class Clientes If DdlTipoCliente.SelectedValue = "1" Then If TxtContacto.Text.Trim() = "" Then InformacionCompleta = False If TxtRepresentanteLegal.Text.Trim() = "" Then InformacionCompleta = False - 'si es el concepto de pagaré - Dim tPagare As Integer = 0 - For Each dRow As GridViewRow In GvDocumentosCliente.Rows - Dim CveDocumentacion As Integer = dRow.DataKey("CveDocumentacion").ToEntero() - If CveDocumentacion = 265 Then tPagare = 1 - Next - If tPagare = 0 Then InformacionCompleta = False - tPagare = 0 'valida que cuando menos tenga una cuenta - For Each dRow As GridViewRow In GvBancosCuentas.Rows - tPagare = 1 - Next - If tPagare = 0 Then InformacionCompleta = False + End If End If From 9b977b4da13fe7b742e5c0597e84c5a7a75cd3d2 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Mon, 21 Apr 2025 16:39:29 -0700 Subject: [PATCH 3/5] --Cambios PV Cobranza --- Ventas/PVCobranza.aspx | 35 +++++++++++++++++++++++++++-------- Ventas/PVCobranza.aspx.vb | 16 +++++++++++----- 2 files changed, 38 insertions(+), 13 deletions(-) diff --git a/Ventas/PVCobranza.aspx b/Ventas/PVCobranza.aspx index eea7c457a..8535b6756 100644 --- a/Ventas/PVCobranza.aspx +++ b/Ventas/PVCobranza.aspx @@ -1539,8 +1539,6 @@ } $("#LblTotalAnticipos").text(FormatoNumero(FnSumaValoresAnt(), 2)); - - // $get('HdnVentaSaldo').value = Total - FnSumaValoresAnt(); } function FnSumaValoresAnt() { @@ -1589,7 +1587,12 @@ $get("TxtCambio").value = FormatoNumero(cambio); } else { - $get("TxtFaltante").value = FormatoNumero(cambio); + if (cambio == 'NaN') { + $get("TxtFaltante").value = "0.00"; + } else { + $get("TxtFaltante").value = FormatoNumero(cambio); + } + $get("ChkSobFaltante").checked = true; $get("TxtCambio").value = ""; } @@ -1618,8 +1621,15 @@ } function ValidaSobranteFaltante() { - if (ToDouble($get("TxtFaltante").value) > 1) { - alert("El sobrante/faltante no debe ser mayor a 1"); + + let sobFaltantePermitido = 1; + + if (<%= If(UsuarioActual.Empresa.CveEmpresa = 189, 1, 0)%> == 1) { + sobFaltantePermitido = 10; + } + + if (ToDouble($get("TxtFaltante").value) > sobFaltantePermitido) { + alert("El sobrante/faltante no debe ser mayor a " + sobFaltantePermitido); $get("TxtFaltante").value = ""; $get("ChkSobFaltante").checked = false; } else { @@ -1630,11 +1640,20 @@ function CargaSobranteFaltante() { $('#ChkSobFaltante').change(function () { if (this.checked == true) { - if (ToDouble($get("TxtCambio").value) > 1) { - alert("El sobrante/faltante no debe ser mayor a 1") + let sobFaltantePermitido = 1; + + if (<%= If(UsuarioActual.Empresa.CveEmpresa = 189, 1, 0)%> == 1) { + sobFaltantePermitido = 10; + } + if (ToDouble($get("TxtCambio").value) > sobFaltantePermitido) { + alert("El sobrante/faltante no debe ser mayor a " + sobFaltantePermitido) $get("ChkSobFaltante").checked = false; } else { - $get("TxtFaltante").value = $get("TxtCambio").value; + if ($get("TxtCambio").value == 'NaN') { + $get("TxtFaltante").value = "0.00"; + } else { + $get("TxtFaltante").value = $get("TxtCambio").value; + } } } diff --git a/Ventas/PVCobranza.aspx.vb b/Ventas/PVCobranza.aspx.vb index 68f1cf8a0..ddad5f0c7 100644 --- a/Ventas/PVCobranza.aspx.vb +++ b/Ventas/PVCobranza.aspx.vb @@ -593,13 +593,19 @@ Partial Class Ventas_PVCobranza Faltante = Math.Abs(TxtFaltante.Text.ToDecimal()) End If - If Faltante > 1 Then - Alert("El faltante no puede ser mayor a 1.00", TipoMensaje.MsgAdvertencia) + Dim sobFaltantePermitido = 1 + + If UsuarioActual.CveEmpresa = 189 Then + sobFaltantePermitido = 10 + End If + + If Faltante > sobFaltantePermitido Then + Alert($"El faltante no puede ser mayor a {sobFaltantePermitido}", TipoMensaje.MsgAdvertencia) Exit Sub End If - If Sobrante > 1 Then - Alert("El sobrante no puede ser mayor a 1.00", TipoMensaje.MsgAdvertencia) + If Sobrante > sobFaltantePermitido Then + Alert($"El sobrante no puede ser mayor a {sobFaltantePermitido}", TipoMensaje.MsgAdvertencia) Exit Sub End If @@ -956,7 +962,7 @@ Partial Class Ventas_PVCobranza GuardaLog(ex.ToString()) End Try - If MsgError = "" AndAlso Not ChkSobFaltante.Checked Then + If MsgError = "" Then If ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=5, CveVenta:=CveVenta) Then If ObjConta.ValorPolizaDescuadre > 0 Then GuardaLogAD($"Ventas/Ventas-NCGeneradas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") From ececb24483d834ece60d1b43e5c4e68a6a92bcdf Mon Sep 17 00:00:00 2001 From: Luis Quijada Date: Tue, 22 Apr 2025 12:42:12 -0700 Subject: [PATCH 4/5] Cancelacion OP --- OP/OP.aspx | 79 ++++++++++++++++++++++++++++++- OP/OP.aspx.vb | 129 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 207 insertions(+), 1 deletion(-) diff --git a/OP/OP.aspx b/OP/OP.aspx index 4bb7a8c47..82f0c1184 100644 --- a/OP/OP.aspx +++ b/OP/OP.aspx @@ -776,6 +776,16 @@
+
+
+ +
+
+ + +