-condiion de seguridad

This commit is contained in:
rrene
2020-03-19 13:13:54 -07:00
parent 4a037cbb55
commit f01c46f54b

View File

@@ -1877,6 +1877,11 @@ Partial Class Inventarios_RecepcionEntrega
Dim Almacen1 = DdlAlmacen.SelectedValue.ToEntero
If TipoDocto = "Rem" AndAlso CveAlmacenTraspasoDestino = 0 Then
ErrorMovInv = True
TextoError = "Ocurrió un error. no se tiene definido el almacen destino"
End If
'DEVOLUCION REMISION
If TipoMovimiento = 2 And TipoDocto = "Rem" Then
ConceptoMovimiento = 8
@@ -1903,6 +1908,12 @@ Partial Class Inventarios_RecepcionEntrega
For Each Dr1 As DataRow In DtTraspasos.Rows
CveMovimientoSalida = Dr1("CveMovimientoEntrada").ToString.ToEntero
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
If ObjInventario.DtResultados.Rows.Count = 0 Then
ErrorMovInv = True
TextoError = "Ocurrió un error, no se tienen registros que ingresar"
Exit Sub
End If
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDouble, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString) Then
ErrorMovInv = True
@@ -2212,7 +2223,7 @@ Partial Class Inventarios_RecepcionEntrega
End If
' COMIENZA: VIRTUAL
If TipoDocto.Contiene("Ing", "Dev") AndAlso UsuarioActual.Empresa.Funcionalidad(573) = "1" AndAlso CveMovimiento > 0 Then
If Not ErrorMovInv AndAlso TipoDocto.Contiene("Ing", "Dev") AndAlso UsuarioActual.Empresa.Funcionalidad(573) = "1" AndAlso CveMovimiento > 0 Then
Dim DtPSVirtual As New DataTable("DtTamanios")
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimiento, UsuarioActual.CveEmpresa) Then