virutal
This commit is contained in:
@@ -1886,14 +1886,18 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
Dim CveConceptoMovimientoVirtual As Integer = -1
|
||||
Dim CveAlmacenVirtual As Integer = -1
|
||||
Dim CveMovimientoRelacionadoVirtual As Integer = -1
|
||||
Dim ValidaVirtual As Boolean = False
|
||||
|
||||
If TipoMovimiento = 1 Then
|
||||
For Each GvRow As GridViewRow In GvDatos.Rows
|
||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
For Each Tam As DataRow In DtTamanios.Rows
|
||||
If Tam("CveTamaño").ToString() = GvRow.DataKey("CveTamaño") Then
|
||||
Dim CvePSCargo = Tam("CvePSCargo").ToString().ToEntero()
|
||||
If GvRow.datakey("CveTamaño").tostring.toentero > 0 Then
|
||||
ValidaVirtual = True ' si tiene tamaño, debe de tener virtual
|
||||
Dim drr As DataRow = DtTamanios.FiltroPrimero(String.Format("CveTamaño={0}", GvRow.DataKey("CveTamaño")))
|
||||
If drr IsNot Nothing Then
|
||||
|
||||
Dim CvePSCargo = drr("CvePSCargo").ToString().ToEntero()
|
||||
Dim Row As DataRow = DtPSVirtual.NewRow()
|
||||
Row("CvePS") = CvePSCargo
|
||||
Row("Cantidad") = GvRow.FCTextBox("TbCantidadF").Text.ToDecimal()
|
||||
@@ -1901,9 +1905,9 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
Row("CveUM") = GvRow.DataKey("CveUM").ToEntero()
|
||||
|
||||
DtPSVirtual.Rows.Add(Row)
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
Next
|
||||
@@ -1911,6 +1915,7 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
CveAlmacenVirtual = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 24).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={CveSubProyecto}").ToEntero()
|
||||
|
||||
ElseIf TipoMovimiento = 2 Then
|
||||
ValidaVirtual = True
|
||||
Dim CveMovimientoSalidaDev As Integer = -1
|
||||
If ObjInventario.GetInv_Mov(CveVentaSurtir, UsuarioActual.CveEmpresa) Then
|
||||
Dim RowMovimiento As DataRow = ObjInventario.DtResultados.FiltroPrimero("CvePS IS NULL AND CveTipoAlmacen = 24 AND CveConcepto = 3 AND CveVenta > 0")
|
||||
@@ -1955,11 +1960,14 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
End If
|
||||
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un error al procesar el movimiento en almacen virtual. Por favor vuelva a intentar."
|
||||
If ValidaVirtual Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un error al procesar el movimiento en almacen virtual. Por favor vuelva a intentar."
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
If DtPSVirtual.Rows.Count = 0 Then
|
||||
If DtPSVirtual.Rows.Count = 0 AndAlso ValidaVirtual = True Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "No se tienen productos para el almacen virtual."
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user