valida lote/caducidad
This commit is contained in:
@@ -28,6 +28,15 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
ViewState("EstatusFinalOK") = value
|
ViewState("EstatusFinalOK") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private Property ValidaLoteCaducidad As Boolean
|
||||||
|
Get
|
||||||
|
Return CType(ViewState("ValidaLoteCaducidad"), Boolean)
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
ViewState("ValidaLoteCaducidad") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
Private Property DtInv As DataTable
|
Private Property DtInv As DataTable
|
||||||
Get
|
Get
|
||||||
If ViewState("DtInv") Is Nothing Then
|
If ViewState("DtInv") Is Nothing Then
|
||||||
@@ -966,6 +975,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
Dim DtRecepcion As DataTable = Nothing
|
Dim DtRecepcion As DataTable = Nothing
|
||||||
Dim NumUsados = ObjInventario.DtResultados.COUNT("EsUsado", "EsUsado = True").ToEntero()
|
Dim NumUsados = ObjInventario.DtResultados.COUNT("EsUsado", "EsUsado = True").ToEntero()
|
||||||
Dim NumProductos = ObjInventario.DtResultados.COUNT("EsUsado", "EsUsado = False").ToEntero()
|
Dim NumProductos = ObjInventario.DtResultados.COUNT("EsUsado", "EsUsado = False").ToEntero()
|
||||||
|
Dim CveSubProyecto As Integer
|
||||||
|
|
||||||
'SI LA COMPRA TIENE PRODUCTOS Y USADOS SOLO MOSTRAR LOS PRODUCTOS
|
'SI LA COMPRA TIENE PRODUCTOS Y USADOS SOLO MOSTRAR LOS PRODUCTOS
|
||||||
If NumProductos > 0 AndAlso NumUsados > 0 Then
|
If NumProductos > 0 AndAlso NumUsados > 0 Then
|
||||||
@@ -994,6 +1004,11 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
CveSubProyecto = DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero
|
||||||
|
If UsuarioActual.CveEmpresa = 119 AndAlso CveSubProyecto = 10276 Then
|
||||||
|
ValidaLoteCaducidad = True
|
||||||
|
End If
|
||||||
|
|
||||||
CveAlmacenDevolucionProveedor = DtRecepcion.Rows(0)("CveAlmacenDevolucionProveedor").ToString.ToEntero
|
CveAlmacenDevolucionProveedor = DtRecepcion.Rows(0)("CveAlmacenDevolucionProveedor").ToString.ToEntero
|
||||||
|
|
||||||
'SI ES MOTOBATERIA NO GENERA MOVIMIENTO VIRTUAL
|
'SI ES MOTOBATERIA NO GENERA MOVIMIENTO VIRTUAL
|
||||||
@@ -1439,21 +1454,25 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = False
|
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CBool(e.Row.DBCampo("AplicaCaducidad")) Then
|
If (ValidaLoteCaducidad) OrElse (UsuarioActual.CveEmpresa <> 119) Then
|
||||||
e.Row.FCTextBox("TxtCaducidad").Visible = True
|
If CBool(e.Row.DBCampo("AplicaCaducidad")) Then
|
||||||
e.Row.FCLinkButton("LnkCaducidad").Visible = True
|
e.Row.FCTextBox("TxtCaducidad").Visible = True
|
||||||
e.Row.FCTextBox("TxtCaducidad").Text = Now.ToShortDateString
|
e.Row.FCLinkButton("LnkCaducidad").Visible = True
|
||||||
e.Row.FCTextBox("TxtDividir").Visible = True
|
e.Row.FCTextBox("TxtCaducidad").Text = Now.ToShortDateString
|
||||||
Else
|
e.Row.FCTextBox("TxtDividir").Visible = True
|
||||||
e.Row.FCTextBox("TxtCaducidad").Visible = False
|
Else
|
||||||
e.Row.FCLinkButton("LnkCaducidad").Visible = False
|
e.Row.FCTextBox("TxtCaducidad").Visible = False
|
||||||
|
e.Row.FCLinkButton("LnkCaducidad").Visible = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
If CBool(e.Row.DBCampo("AplicaLote")) Then
|
||||||
|
e.Row.FCTextBox("TxtLote").Visible = True
|
||||||
|
Else
|
||||||
|
e.Row.FCTextBox("TxtLote").Visible = False
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CBool(e.Row.DBCampo("AplicaLote")) Then
|
|
||||||
e.Row.FCTextBox("TxtLote").Visible = True
|
|
||||||
Else
|
|
||||||
e.Row.FCTextBox("TxtLote").Visible = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
e.Row.FCButton("BtnDividir").Attributes.Add("onclick", String.Format("Dividir('{0}');", e.Row.FCTextBox("TxtDividir").ClientID))
|
e.Row.FCButton("BtnDividir").Attributes.Add("onclick", String.Format("Dividir('{0}');", e.Row.FCTextBox("TxtDividir").ClientID))
|
||||||
e.Row.FCButton("BtnDividir").CommandArgument = e.Row.RowIndex.ToString
|
e.Row.FCButton("BtnDividir").CommandArgument = e.Row.RowIndex.ToString
|
||||||
@@ -2162,6 +2181,13 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
End If
|
End If
|
||||||
Index += 1
|
Index += 1
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
If (Not ValidaLoteCaducidad) OrElse (UsuarioActual.CveEmpresa <> 119) Then
|
||||||
|
ValidaSeccion = False
|
||||||
|
ValidaCaducidad = False
|
||||||
|
ValidaLote = False
|
||||||
|
End If
|
||||||
|
|
||||||
If ValidaSeccion Then
|
If ValidaSeccion Then
|
||||||
Alert("La sección de almacen no ha sido especificada en todos los productos.", TipoMensaje.MsgAdvertencia)
|
Alert("La sección de almacen no ha sido especificada en todos los productos.", TipoMensaje.MsgAdvertencia)
|
||||||
Return False
|
Return False
|
||||||
|
|||||||
Reference in New Issue
Block a user