From 1f848776c98fc81df3008c2ad7b40164f75f28de Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Wed, 10 Apr 2024 20:00:10 -0700 Subject: [PATCH] --Regresar inventario a factura global --- App_Code/Modelos.vb | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index 0d02c285a..a97e3fa58 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -4326,20 +4326,30 @@ Namespace Modelos 'TEMPORAL. PARA OPTIMIZAR LOS TIEMPOS PARA LA GENERACION DE LA FACTURA GLOBAL - If factura.EsFacturaGlobal Then - If Not ObjInventario.ActualizarEsDevolucionVenta(factura.CveVenta, 2) Then - OcurrioError = True - End If - Else - If RemisionesLista IsNot Nothing AndAlso factura.TipoDocto = "Ing" AndAlso RemisionesLista.Count > 0 Then - For Each CveRemision As Integer In RemisionesLista - 'El almacen general es el Primer Almacen de Material en la Sucursal - If Not TraspasoAlmacen(ObjInventario, ObjVentas, CveRemision, ObjConta, True, 9, factura.EsFacturaGlobal) Then - OcurrioError = True - Exit For - End If - Next - End If + 'If factura.EsFacturaGlobal Then + ' If Not ObjInventario.ActualizarEsDevolucionVenta(factura.CveVenta, 2) Then + ' OcurrioError = True + ' End If + 'Else + ' If RemisionesLista IsNot Nothing AndAlso factura.TipoDocto = "Ing" AndAlso RemisionesLista.Count > 0 Then + ' For Each CveRemision As Integer In RemisionesLista + ' 'El almacen general es el Primer Almacen de Material en la Sucursal + ' If Not TraspasoAlmacen(ObjInventario, ObjVentas, CveRemision, ObjConta, True, 9, factura.EsFacturaGlobal) Then + ' OcurrioError = True + ' Exit For + ' End If + ' Next + ' End If + 'End If + + If RemisionesLista IsNot Nothing AndAlso factura.TipoDocto = "Ing" AndAlso RemisionesLista.Count > 0 Then + For Each CveRemision As Integer In RemisionesLista + 'El almacen general es el Primer Almacen de Material en la Sucursal + If Not TraspasoAlmacen(ObjInventario, ObjVentas, CveRemision, ObjConta, True, 9, factura.EsFacturaGlobal) Then + OcurrioError = True + Exit For + End If + Next End If If factura.TipoDocto = "Rem" AndAlso factura.ServicioDomicilio Then