From ef83e55fbc133069c5bf06c2db55dbad3386948c Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 12 Mar 2022 14:59:01 -0700 Subject: [PATCH] =?UTF-8?q?--=20prepoliza=20de=20garant=C3=ADa?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Inventarios/EntregaAlmacen.aspx.vb | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index db6535764..90a42351d 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -2333,8 +2333,23 @@ Partial Class Inventarios_EntregaAlmacen TotalGarantia += (RowGarantia("Cantidad").ToString().ToDecimal() * PU) Next - 'se registra - If ContabilizaMovimientoAlmacen(ObjConta, TxtFecha.Text.ToDate, HLFolio.Text, "EntregaAlmacen", CveMovimiento, CveMovimientoEntrada, TotalGarantia, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, True) <= 0 Then + ''se registra + 'If ContabilizaMovimientoAlmacen(ObjConta, TxtFecha.Text.ToDate, HLFolio.Text, "EntregaAlmacen", -1, CveMovimientoGarantia, TotalGarantia, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, True) <= 0 Then + ' ErrorMovInv = True + 'End If + + Dim CvePrePolizaTraspaso As Integer = ObjConta.AddPrePolizas("EA/Gar", 53, 0, 0, 1, TxtFecha.Text.ToDate, "Entrada Garantía", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + If CvePrePolizaTraspaso > 0 Then + + + If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaTraspaso, False, TotalGarantia, TxtObservaciones.Text, 68, TxtObservaciones.Text, TxtFecha.Text.ToDate, -1, -1, CveMovimientoAlmacen:=CveMovimientoGarantia, Contabilizable:=True, ImporteMX:=TotalGarantia) Then + ErrorMovInv = True + End If + + If Not ErrorMovInv AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePolizaTraspaso, True, TotalGarantia, TxtObservaciones.Text, 95, TxtObservaciones.Text, TxtFecha.Text.ToDate, -1, -1, CveMovimientoAlmacen:=CveMovimientoGarantia, Contabilizable:=True, ImporteMX:=TotalGarantia) Then + ErrorMovInv = True + End If + Else ErrorMovInv = True End If End If