From 0c40bf9b216d52559a9e9f8ae10e8966cf0ac28f Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 3 Jun 2021 09:27:27 -0700 Subject: [PATCH] mejora en registro y considera importes negativos --- Contabilidad/RegPrePolizaS.aspx.vb | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index d8ace96b3..193be8c97 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -911,7 +911,7 @@ Partial Class ContabilidadC_RegPrePolizaS If idCuentaContabilizacion = 1 AndAlso (IdCtaContable = 0) Then idCuentaContabilizacion = 0 End If - If Importe > 0 Then + If Importe <> 0 Then Dim tCveCuenta As Integer = gvr.DataKey("CveCuenta").ToEntero 'If gvr.datakey("CveConcepto") = "299" Then @@ -929,15 +929,9 @@ Partial Class ContabilidadC_RegPrePolizaS Exit For End If End If - Next - - 'If CvePeriodo > 0 Then - ' If Not ObjNom.UpdateProvisionNomina(CvePeriodo, CvePrePoliza, UsuarioActual.CveEmpresa) Then - ' MsgError = "No se pudo actualizar el periodo de la nĂ³mina" - ' End If - 'End If - - If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 1) Then + Next + + If MsgError = "" AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 1) Then If ObjMov.ValorPolizaDescuadre > 0 Then GuardaLogAD($"Contabilidad/RegPrePolizas | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") MsgError = ObjMov.MensajePolizaDescuadre @@ -986,7 +980,8 @@ Partial Class ContabilidadC_RegPrePolizaS GvMov.DataBind() TxtFecha.Text = "" TxtObservaciones.Text = "" - Else + Else + Alert(MsgError.ToString, ModExtensiones.TipoMensaje.MsgError) ObjIE.RollBack() If Conta IsNot Nothing Then Conta.RollBack() End If