Correcciones en almacenes virtuales
This commit is contained in:
@@ -942,6 +942,9 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
DivCodigoSeriePS.Visible = False
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa = 140 Then
|
||||
DivVirtualAdvertencia.Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
Else
|
||||
@@ -2209,6 +2212,53 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Next
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
'VIRTUAL
|
||||
Dim DtTamanios As New DataTable("DtTamanios")
|
||||
DtTamanios.Columns.Add(New DataColumn("CvePS", GetType(Integer)))
|
||||
DtTamanios.Columns.Add(New DataColumn("Cantidad", GetType(Decimal)))
|
||||
DtTamanios.Columns.Add(New DataColumn("PU", GetType(Decimal)))
|
||||
DtTamanios.Columns.Add(New DataColumn("CveUM", GetType(Integer)))
|
||||
|
||||
If ObjAcum.TamañoGet(-1, UsuarioActual.CveEmpresa) Then
|
||||
For Each GvRow As GridViewRow In GvInv.Rows
|
||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||
For Each Tam As DataRow In ObjAcum.DtResultados.Rows
|
||||
If Tam("CveTamaño").ToString() = GvRow.DataKey("CveTamaño") Then
|
||||
Dim Row As DataRow = DtTamanios.NewRow()
|
||||
|
||||
Row("CvePS") = Tam("CvePSCargo").ToString().ToEntero()
|
||||
Row("Cantidad") = GvRow.FCTextBox("TbCantidadF").Text.ToDecimal()
|
||||
Row("PU") = GvRow.DataKey("PU").ToDecimal()
|
||||
Row("CveUM") = GvRow.DataKey("CveUM").ToEntero()
|
||||
|
||||
DtTamanios.Rows.Add(Row)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
If DtTamanios IsNot Nothing AndAlso DtTamanios.Rows.Count > 0 Then
|
||||
Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {DdlAlmacen.SelectedValue}").ToEntero()
|
||||
|
||||
Dim CveAlmacenVirutal As Integer = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 24).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={CveSubProyecto}").ToEntero()
|
||||
|
||||
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirutal, If(TipoMovimiento > 1, 13, 2), 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompraSurtir, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim)
|
||||
FolioVirtual = ObjInventario.Folio
|
||||
|
||||
For Each RowUsado As DataRow In DtTamanios.Rows
|
||||
Dim CvePS = RowUsado("CvePS").ToString().ToEntero()
|
||||
Dim CantidadUsado As Double = RowUsado("Cantidad").ToString().ToDouble()
|
||||
Dim PU As Double = RowUsado("PU").ToString().ToDouble()
|
||||
Dim CveUM As Integer = RowUsado("CveUM").ToString().ToEntero()
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtual, CantidadUsado, CveUM, CvePS, PU, -1, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
'DEVENGAR AC
|
||||
|
||||
Reference in New Issue
Block a user