corrección de código
This commit is contained in:
@@ -3009,10 +3009,8 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
Row("CveUM") = GvRow.DataKey("CveUM").ToEntero()
|
Row("CveUM") = GvRow.DataKey("CveUM").ToEntero()
|
||||||
DtPSVirtual.Rows.Add(Row)
|
DtPSVirtual.Rows.Add(Row)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
@@ -3065,36 +3063,32 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacen.SelectedValue.ToEntero()).FiltroPrimeroValor("CveAlmacenVirtual").ToEntero()
|
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacen.SelectedValue.ToEntero()).FiltroPrimeroValor("CveAlmacenVirtual").ToEntero()
|
||||||
|
|
||||||
|
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, 13, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompraSurtir, -1, -1, -1, CveMovimientoRelacionado:=CveMovimientoRef, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="RA/VD")
|
||||||
|
|
||||||
If CveMovimientoVirtual > 0 Then
|
If CveMovimientoVirtual > 0 Then
|
||||||
|
FolioVirtual = ObjInventario.Folio
|
||||||
|
|
||||||
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, 13, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompraSurtir, -1, -1, -1, CveMovimientoRelacionado:=CveMovimientoRef, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="RA/VD")
|
For Each RowUsado As DataRow In DtPSVirtual.Rows
|
||||||
|
Dim CvePS = RowUsado("CvePS").ToString().ToEntero()
|
||||||
|
Dim CantidadUsado As Decimal = RowUsado("Cantidad").ToString().ToDecimal()
|
||||||
|
Dim PU As Decimal = RowUsado("Cargo").ToString().ToDecimal()
|
||||||
|
Dim CveUM As Integer = RowUsado("CveUM").ToString().ToEntero()
|
||||||
|
|
||||||
If CveMovimientoVirtual > 0 Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtual, CantidadUsado, CveUM, CvePS, PU, -1, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||||
FolioVirtual = ObjInventario.Folio
|
ErrorMovInv = True
|
||||||
|
Exit For
|
||||||
For Each RowUsado As DataRow In DtPSVirtual.Rows
|
|
||||||
Dim CvePS = RowUsado("CvePS").ToString().ToEntero()
|
|
||||||
Dim CantidadUsado As Decimal = RowUsado("Cantidad").ToString().ToDecimal()
|
|
||||||
Dim PU As Decimal = RowUsado("Cargo").ToString().ToDecimal()
|
|
||||||
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
|
|
||||||
|
|
||||||
If SumarImporteUsados Then
|
|
||||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoVirtual, UsuarioActual.CveEmpresa) Then
|
|
||||||
ImporteIngresoAdicional = ObjInventario.DtResultados.SUMD("TotalOriginal")
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
Else
|
If SumarImporteUsados Then
|
||||||
ErrorMovInv = True
|
If ObjInventario.GetMovimientosDetalle(CveMovimientoVirtual, UsuarioActual.CveEmpresa) Then
|
||||||
|
ImporteIngresoAdicional = ObjInventario.DtResultados.SUMD("TotalOriginal")
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
|
||||||
|
|
||||||
|
Else
|
||||||
|
ErrorMovInv = True
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
End If
|
End If
|
||||||
|
|||||||
Reference in New Issue
Block a user