Validar al obtener registros
This commit is contained in:
@@ -1921,6 +1921,9 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un error al obtener los registros"
|
||||
End If
|
||||
If ErrorMovInv Then Exit For
|
||||
Next
|
||||
@@ -2001,7 +2004,7 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
TextoError = "No se pudo generar el movimiento de entrada correctamente"
|
||||
ErrorMovInv = True
|
||||
Else
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDouble, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, EsInterno:=EsInterno, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero()) Then
|
||||
ErrorMovInv = True
|
||||
@@ -2009,6 +2012,9 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un error al guardar los movimientos de entrada"
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Reference in New Issue
Block a user