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 Set
|
||||||
End Property
|
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
|
'Private Property DtDocumentos As DataTable
|
||||||
' Get
|
' Get
|
||||||
' Return CType(ViewState("DtDocumentos"), DataTable)
|
' Return CType(ViewState("DtDocumentos"), DataTable)
|
||||||
@@ -871,6 +880,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
RealizarTraspasoAlmacenDevolucion = False
|
RealizarTraspasoAlmacenDevolucion = False
|
||||||
RealizarMovimientoVirtual = False
|
RealizarMovimientoVirtual = False
|
||||||
SumarImporteUsados = False
|
SumarImporteUsados = False
|
||||||
|
ValidarRecepcionUsados = False
|
||||||
BtnGuardar.Enabled = True
|
BtnGuardar.Enabled = True
|
||||||
CargaAlmacenes(-1)
|
CargaAlmacenes(-1)
|
||||||
|
|
||||||
@@ -925,6 +935,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
RealizarTraspasoAlmacenDevolucion = False
|
RealizarTraspasoAlmacenDevolucion = False
|
||||||
RealizarMovimientoVirtual = False
|
RealizarMovimientoVirtual = False
|
||||||
SumarImporteUsados = False
|
SumarImporteUsados = False
|
||||||
|
ValidarRecepcionUsados = False
|
||||||
CveAlmacenDevolucionProveedor = -1
|
CveAlmacenDevolucionProveedor = -1
|
||||||
|
|
||||||
Dim ObjCompras As New ClsCompras
|
Dim ObjCompras As New ClsCompras
|
||||||
@@ -981,10 +992,12 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
If NumProductos > 0 AndAlso NumUsados > 0 Then
|
If NumProductos > 0 AndAlso NumUsados > 0 Then
|
||||||
DtRecepcion = ObjInventario.DtResultados.FiltraParametros("EsUsado = False")
|
DtRecepcion = ObjInventario.DtResultados.FiltraParametros("EsUsado = False")
|
||||||
SumarImporteUsados = True
|
SumarImporteUsados = True
|
||||||
|
ValidarRecepcionUsados = True
|
||||||
'SI LA COMPRA TIENE PUROS USADOS, MOSTRAR LOS USADOS Y CARGAR LOS ALMACENES
|
'SI LA COMPRA TIENE PUROS USADOS, MOSTRAR LOS USADOS Y CARGAR LOS ALMACENES
|
||||||
ElseIf NumProductos = 0 AndAlso NumUsados > 0 Then
|
ElseIf NumProductos = 0 AndAlso NumUsados > 0 Then
|
||||||
CargaSoloUsados = True
|
CargaSoloUsados = True
|
||||||
SumarImporteUsados = True
|
SumarImporteUsados = True
|
||||||
|
ValidarRecepcionUsados = True
|
||||||
DtRecepcion = ObjInventario.DtResultados.Copy()
|
DtRecepcion = ObjInventario.DtResultados.Copy()
|
||||||
If TipoMovimiento <> 3 Then 'sino es devolucion/NC
|
If TipoMovimiento <> 3 Then 'sino es devolucion/NC
|
||||||
CargaAlmacenes(DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero, "22", CveTipoCompra)
|
CargaAlmacenes(DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero, "22", CveTipoCompra)
|
||||||
@@ -997,8 +1010,10 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
If ObjCompras.GetCompraDetalle(pCveCompra) Then
|
If ObjCompras.GetCompraDetalle(pCveCompra) Then
|
||||||
If ObjCompras.DtResultados.COUNT("Cantidad", "CveClasificacion=20519") > 0 Then
|
If ObjCompras.DtResultados.COUNT("Cantidad", "CveClasificacion=20519") > 0 Then
|
||||||
SumarImporteUsados = True
|
SumarImporteUsados = True
|
||||||
|
ValidarRecepcionUsados = True
|
||||||
Else
|
Else
|
||||||
SumarImporteUsados = False
|
SumarImporteUsados = False
|
||||||
|
ValidarRecepcionUsados = False
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -2403,6 +2418,20 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
Dim CvePrePoliza = -1
|
Dim CvePrePoliza = -1
|
||||||
Dim MensajeContabilidad = ""
|
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
|
Try
|
||||||
'RECARGA TC CUANDO ES RECEPCION CON OC Y DOLARES
|
'RECARGA TC CUANDO ES RECEPCION CON OC Y DOLARES
|
||||||
If CveOCSurtir > 0 And CveMoneda <> 1 Then
|
If CveOCSurtir > 0 And CveMoneda <> 1 Then
|
||||||
@@ -2825,7 +2854,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
'VERIFICA SI TIENE ALMACEN VIRTUAL
|
'VERIFICA SI TIENE ALMACEN VIRTUAL
|
||||||
If CveAlmacenVirtual > 0 Then
|
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
|
DtPSVirtual = ObjInventario.DtResultados
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -3020,7 +3049,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
CveMovimientoRef = CveMovimiento
|
CveMovimientoRef = CveMovimiento
|
||||||
End If
|
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
|
DtPSVirtual = ObjInventario.DtResultados
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user