BDH. Validacion de correcion de usados al recibir parcialmente
This commit is contained in:
@@ -412,6 +412,15 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property ValidarRecepcionUsados As Boolean
|
||||
Get
|
||||
Return If(IsNothing(ViewState("ValidarRecepcionUsados")), False, CBool(ViewState("ValidarRecepcionUsados")))
|
||||
End Get
|
||||
Set
|
||||
ViewState("ValidarRecepcionUsados") = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'Private Property DtDocumentos As DataTable
|
||||
' Get
|
||||
' Return CType(ViewState("DtDocumentos"), DataTable)
|
||||
@@ -871,6 +880,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
RealizarTraspasoAlmacenDevolucion = False
|
||||
RealizarMovimientoVirtual = False
|
||||
SumarImporteUsados = False
|
||||
ValidarRecepcionUsados = False
|
||||
BtnGuardar.Enabled = True
|
||||
CargaAlmacenes(-1)
|
||||
|
||||
@@ -925,6 +935,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
RealizarTraspasoAlmacenDevolucion = False
|
||||
RealizarMovimientoVirtual = False
|
||||
SumarImporteUsados = False
|
||||
ValidarRecepcionUsados = False
|
||||
CveAlmacenDevolucionProveedor = -1
|
||||
|
||||
Dim ObjCompras As New ClsCompras
|
||||
@@ -981,10 +992,12 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
If NumProductos > 0 AndAlso NumUsados > 0 Then
|
||||
DtRecepcion = ObjInventario.DtResultados.FiltraParametros("EsUsado = False")
|
||||
SumarImporteUsados = True
|
||||
ValidarRecepcionUsados = True
|
||||
'SI LA COMPRA TIENE PUROS USADOS, MOSTRAR LOS USADOS Y CARGAR LOS ALMACENES
|
||||
ElseIf NumProductos = 0 AndAlso NumUsados > 0 Then
|
||||
CargaSoloUsados = True
|
||||
SumarImporteUsados = True
|
||||
ValidarRecepcionUsados = True
|
||||
DtRecepcion = ObjInventario.DtResultados.Copy()
|
||||
If TipoMovimiento <> 3 Then 'sino es devolucion/NC
|
||||
CargaAlmacenes(DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero, "22", CveTipoCompra)
|
||||
@@ -997,8 +1010,10 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
If ObjCompras.GetCompraDetalle(pCveCompra) Then
|
||||
If ObjCompras.DtResultados.COUNT("Cantidad", "CveClasificacion=20519") > 0 Then
|
||||
SumarImporteUsados = True
|
||||
ValidarRecepcionUsados = True
|
||||
Else
|
||||
SumarImporteUsados = False
|
||||
ValidarRecepcionUsados = False
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -2403,6 +2418,20 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Dim CvePrePoliza = -1
|
||||
Dim MensajeContabilidad = ""
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
'VALIDA SI SE VAN A RECIBIR TODOS LOS PRODUCTOS
|
||||
If ValidarRecepcionUsados Then
|
||||
For Each gvr As GridViewRow In GvInv.Rows
|
||||
If gvr.FCTextBox("TbCantidadF").Text.ToDecimal() <> gvr.DataKey("CantidadC").ToDecimal() Then
|
||||
ValidarRecepcionUsados = False
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Try
|
||||
'RECARGA TC CUANDO ES RECEPCION CON OC Y DOLARES
|
||||
If CveOCSurtir > 0 And CveMoneda <> 1 Then
|
||||
@@ -2825,7 +2854,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
|
||||
'VERIFICA SI TIENE ALMACEN VIRTUAL
|
||||
If CveAlmacenVirtual > 0 Then
|
||||
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimiento, UsuarioActual.CveEmpresa, CveCompra:=CveCompraSurtir, ValidaUsadosCompra:=SumarImporteUsados) Then
|
||||
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimiento, UsuarioActual.CveEmpresa, CveCompra:=CveCompraSurtir, ValidaUsadosCompra:=ValidarRecepcionUsados) Then
|
||||
DtPSVirtual = ObjInventario.DtResultados
|
||||
End If
|
||||
|
||||
@@ -3020,7 +3049,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
CveMovimientoRef = CveMovimiento
|
||||
End If
|
||||
|
||||
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoRef, UsuarioActual.CveEmpresa, CveCompra:=CveCompraSurtir, ValidaUsadosCompra:=SumarImporteUsados) Then
|
||||
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoRef, UsuarioActual.CveEmpresa, CveCompra:=CveCompraSurtir, ValidaUsadosCompra:=ValidarRecepcionUsados) Then
|
||||
DtPSVirtual = ObjInventario.DtResultados
|
||||
End If
|
||||
|
||||
|
||||
Reference in New Issue
Block a user