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