This commit is contained in:
rmolina
2019-12-10 19:03:31 -07:00
9 changed files with 319 additions and 304 deletions

View File

@@ -2261,10 +2261,38 @@ Partial Class Inventarios_RecepcionEntrega
End If
End If
'QUEMAR REMISIONES
If Not ErrorMovInv And EsDevolucionVenta = 1 And TipoDocto = "Ing" Then
Dim DtDevRem As New DataTable
'CARGA REMISIONES DE LA VENTA DEVUELTA
If ObjInventario.GetDevolucionRemisionesFacturadas(CveVentaSurtir) Then
DtDevRem = ObjInventario.DtResultados.FiltraParametros("CantidadAlmacen = 0")
Else
ErrorMovInv = True
End If
If Not ErrorMovInv Then
If DtDevRem.Rows.Count > 0 Then
For Each DrMovtos As DataRow In DtDevRem.FiltraParametros("", "CveRem", {"CveRem"}).Rows
If Not ObjInventario.ActualizarEsDevolucionVenta(DrMovtos("CveRem").ToString.ToEntero, 2) Then
TextoError = "Ocurrió un error al hacer la devolución hacia la remision. Por favor vuelva a intentar."
ErrorMovInv = True
Exit For
End If
Next
End If
Else
TextoError = "Ocurrió un error al hacer la devolucion a remisión. Por favor vuelva a intentar."
ErrorMovInv = True
End If
End If
'QUEMA DEVOLUCION | QUEMA = LA QUITA DE PENDIENTE POR RECIBIR (DEVOLVER)
If Not ErrorMovInv And EsDevolucionVenta = 1 Then
If Not ObjVentas.UpdateVentasDevolucionAlmacen(2, CveVentaSurtir) Then
TextoError = "Ocurrió un error al hacer la devolucion. Por favor vuelva a intentar."
TextoError = "Ocurrió un error al hacer la devolución. Por favor vuelva a intentar."
ErrorMovInv = True
End If
End If