-- corrección manejo de lote/cad por sucursal
This commit is contained in:
@@ -269,14 +269,6 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
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
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -997,39 +989,36 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = False
|
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If (ValidaLoteCaducidad) OrElse (UsuarioActual.CveEmpresa <> 119) Then
|
If CBool(e.Row.DBCampo("AplicaCaducidad")) Then
|
||||||
If CBool(e.Row.DBCampo("AplicaCaducidad")) Then
|
e.Row.FCTextBox("TxtCaducidad").Visible = True
|
||||||
e.Row.FCTextBox("TxtCaducidad").Visible = True
|
e.Row.FCLinkButton("LnkCaducidad").Visible = True
|
||||||
e.Row.FCLinkButton("LnkCaducidad").Visible = True
|
e.Row.FCTextBox("TxtCaducidad").ReadOnly = True
|
||||||
e.Row.FCTextBox("TxtCaducidad").ReadOnly = True
|
CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = False
|
||||||
CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = False
|
|
||||||
|
|
||||||
'si aplica caducidad y viene vacía (posible por venta anterior), que se active su registro
|
'si aplica caducidad y viene vacía (posible por venta anterior), que se active su registro
|
||||||
If e.Row.FCTextBox("TxtCaducidad").Text = "" OrElse e.Row.FCTextBox("TxtCaducidad").Text.ToDate <= MinFecha Then
|
If e.Row.FCTextBox("TxtCaducidad").Text = "" OrElse e.Row.FCTextBox("TxtCaducidad").Text.ToDate <= MinFecha Then
|
||||||
e.Row.FCTextBox("TxtCaducidad").ReadOnly = False
|
e.Row.FCTextBox("TxtCaducidad").ReadOnly = False
|
||||||
CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = True
|
CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = True
|
||||||
e.Row.FCTextBox("TxtCaducidad").Enabled = True
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
e.Row.FCTextBox("TxtCaducidad").Visible = False
|
|
||||||
e.Row.FCLinkButton("LnkCaducidad").Visible = False
|
|
||||||
e.Row.FCTextBox("TxtCaducidad").Enabled = True
|
e.Row.FCTextBox("TxtCaducidad").Enabled = True
|
||||||
End If
|
End If
|
||||||
|
Else
|
||||||
|
e.Row.FCTextBox("TxtCaducidad").Visible = False
|
||||||
|
e.Row.FCLinkButton("LnkCaducidad").Visible = False
|
||||||
|
e.Row.FCTextBox("TxtCaducidad").Enabled = True
|
||||||
|
End If
|
||||||
|
|
||||||
If CBool(e.Row.DBCampo("AplicaLote")) Then
|
If CBool(e.Row.DBCampo("AplicaLote")) Then
|
||||||
e.Row.FCTextBox("TxtLote").Visible = True
|
e.Row.FCTextBox("TxtLote").Visible = True
|
||||||
'si aplica caducidad y viene vacía (posible por venta anterior), que se active su registro
|
'si aplica caducidad y viene vacía (posible por venta anterior), que se active su registro
|
||||||
If e.Row.FCTextBox("TxtLote").Text = "" Then
|
If e.Row.FCTextBox("TxtLote").Text = "" Then
|
||||||
e.Row.FCTextBox("TxtLote").ReadOnly = False
|
e.Row.FCTextBox("TxtLote").ReadOnly = False
|
||||||
e.Row.FCTextBox("TxtLote").Enabled = True
|
e.Row.FCTextBox("TxtLote").Enabled = True
|
||||||
Else
|
|
||||||
e.Row.FCTextBox("TxtLote").ReadOnly = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
e.Row.FCTextBox("TxtLote").Visible = False
|
e.Row.FCTextBox("TxtLote").ReadOnly = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
e.Row.FCTextBox("TxtLote").Visible = False
|
||||||
End If
|
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))
|
||||||
@@ -1708,11 +1697,9 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
If (Not ValidaLoteCaducidad) OrElse (UsuarioActual.CveEmpresa <> 119) Then
|
ValidaSeccion = False
|
||||||
ValidaSeccion = False
|
ValidaCaducidad = False
|
||||||
ValidaCaducidad = False
|
ValidaLote = 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)
|
||||||
@@ -1855,11 +1842,6 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
FechaCaducidad = If(CBool(Dr("AplicaCaducidad")) AndAlso Dr("FechaCaducidad").ToString() <> "", Dr("FechaCaducidad").ToString().ToDate, MinFecha)
|
FechaCaducidad = If(CBool(Dr("AplicaCaducidad")) AndAlso Dr("FechaCaducidad").ToString() <> "", Dr("FechaCaducidad").ToString().ToDate, MinFecha)
|
||||||
Lote = If(CBool(Dr("AplicaLote")), Dr("Lote").ToString().Trim, "-1")
|
Lote = If(CBool(Dr("AplicaLote")), Dr("Lote").ToString().Trim, "-1")
|
||||||
|
|
||||||
If Not ValidaLoteCaducidad Then
|
|
||||||
FechaCaducidad = MinFecha
|
|
||||||
Lote = "-1"
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Dr("CantidadGV").ToString().ToDecimal > 0 Then
|
If Dr("CantidadGV").ToString().ToDecimal > 0 Then
|
||||||
If CBool(Dr("AplicaSerie")) Then
|
If CBool(Dr("AplicaSerie")) Then
|
||||||
DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Dr("Consec")))
|
DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Dr("Consec")))
|
||||||
|
|||||||
@@ -28,14 +28,6 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
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 CveTipoAlmacen As Integer
|
Private Property CveTipoAlmacen As Integer
|
||||||
Get
|
Get
|
||||||
Return CType(ViewState("CveTipoAlmacen"), Integer)
|
Return CType(ViewState("CveTipoAlmacen"), Integer)
|
||||||
@@ -1537,8 +1529,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = False
|
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If (ValidaLoteCaducidad) OrElse (UsuarioActual.CveEmpresa <> 119) Then
|
If CBool(e.Row.DBCampo("AplicaCaducidad")) Then
|
||||||
If CBool(e.Row.DBCampo("AplicaCaducidad")) Then
|
|
||||||
e.Row.FCTextBox("TxtCaducidad").Visible = True
|
e.Row.FCTextBox("TxtCaducidad").Visible = True
|
||||||
e.Row.FCLinkButton("LnkCaducidad").Visible = True
|
e.Row.FCLinkButton("LnkCaducidad").Visible = True
|
||||||
e.Row.FCTextBox("TxtCaducidad").Text = Now.ToShortDateString
|
e.Row.FCTextBox("TxtCaducidad").Text = Now.ToShortDateString
|
||||||
@@ -1548,12 +1539,10 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
e.Row.FCLinkButton("LnkCaducidad").Visible = False
|
e.Row.FCLinkButton("LnkCaducidad").Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CBool(e.Row.DBCampo("AplicaLote")) Then
|
If CBool(e.Row.DBCampo("AplicaLote")) Then
|
||||||
e.Row.FCTextBox("TxtLote").Visible = True
|
e.Row.FCTextBox("TxtLote").Visible = True
|
||||||
Else
|
Else
|
||||||
e.Row.FCTextBox("TxtLote").Visible = False
|
e.Row.FCTextBox("TxtLote").Visible = False
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
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))
|
||||||
@@ -2271,12 +2260,6 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
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