Validacion de amortizaciones,quemar remisiones,eliminar usados en PV,bitacora en ventas

This commit is contained in:
2019-12-10 15:44:35 -07:00
parent 8668218f75
commit dc70dee790
5 changed files with 299 additions and 301 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