-- seccion/serie/lote/caducidad

This commit is contained in:
rrene
2020-06-10 14:09:44 -07:00
parent 993c443c98
commit d8e90f6cb3
2 changed files with 21 additions and 18 deletions

View File

@@ -565,7 +565,7 @@
<asp:Button ID="BtnVinculaAFEdit" ClientIDMode="Static" OnClick="BtnVinculaAFEdit_Click" Style="display: none;" runat="server" /> <asp:Button ID="BtnVinculaAFEdit" ClientIDMode="Static" OnClick="BtnVinculaAFEdit_Click" Style="display: none;" runat="server" />
<asp:HiddenField runat="server" ID="HdnCodAFEdit" Value="-1" ClientIDMode="Static" /> <asp:HiddenField runat="server" ID="HdnCodAFEdit" Value="-1" ClientIDMode="Static" />
<asp:GridView ID="GvM" runat="server" GridLines="none" CssClass="tabla_correcto grides Widthall mysmallbtn" ShowHeader="True" EmptyDataText="Aún no hay registros." DataKeyNames="No,CveMovimientoDetalle,Cantidad,CvePS,CveUM,PU,Observaciones,CodigoPS,UnidadMedida,CveAF,Serie,CveSeccionAlmacen" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="True" ShowHeaderWhenEmpty="True"> <asp:GridView ID="GvM" runat="server" GridLines="none" CssClass="tabla_correcto grides Widthall mysmallbtn" ShowHeader="True" EmptyDataText="Aún no hay registros." DataKeyNames="No,CveMovimientoDetalle,Cantidad,CvePS,CveUM,PU,Observaciones,CodigoPS,UnidadMedida,CveAF,Serie,Lote,FechaCaducidad,CveSeccionAlmacen" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="True" ShowHeaderWhenEmpty="True">
<Columns> <Columns>
<asp:TemplateField HeaderText="" ItemStyle-Font-Size="6pt"> <asp:TemplateField HeaderText="" ItemStyle-Font-Size="6pt">
<EditItemTemplate> <EditItemTemplate>
@@ -1365,6 +1365,10 @@
</asp:DropDownList> </asp:DropDownList>
<label for="<%= DdlSeccionAlmacen.ClientID.ToString()%>">Sección Almacén</label> <label for="<%= DdlSeccionAlmacen.ClientID.ToString()%>">Sección Almacén</label>
</div> </div>
<div runat="server" id="divCaducidad" class="form-group form-md-line-input input-iconright" visible="false">
<asp:TextBox ID="TxtnFechaCaducidad" CssClass="form-control input-sm" runat="server" Width="80px" ></asp:TextBox>
<label for="<%= TxtnFechaCaducidad.ClientID.ToString()%>">Fecha Caducidad</label>
</div>
<br /> <br />
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtObservacionesdetalle" CssClass="form-control input-sm" runat="server" MaxLength="200"></asp:TextBox> <asp:TextBox ID="TxtObservacionesdetalle" CssClass="form-control input-sm" runat="server" MaxLength="200"></asp:TextBox>

View File

@@ -270,14 +270,6 @@ Partial Class Inventarios_EntradasSalidas
End Set End Set
End Property End Property
Public Property FechaCaducidadAux() As String
Get
Return ViewState("FechaCaducidadAux").ToString
End Get
Set(value As String)
ViewState("FechaCaducidadAux") = value
End Set
End Property
#End Region #End Region
@@ -352,7 +344,7 @@ Partial Class Inventarios_EntradasSalidas
If CveMovimiento > 0 Then If CveMovimiento > 0 Then
PermisoVerImportes() PermisoVerImportes()
End If End If
FechaCaducidadAux = MinFecha.ToString
End If End If
End Sub End Sub
@@ -1166,13 +1158,15 @@ Partial Class Inventarios_EntradasSalidas
AddNew(DdlProducto2.SelectedValue.ToEntero, DdlProducto2.SelectedText, DdlUnidad.SelectedValue.ToEntero, DdlUnidad.SelectedItem.Text, txtCantidad.Text.ToDouble, AddNew(DdlProducto2.SelectedValue.ToEntero, DdlProducto2.SelectedText, DdlUnidad.SelectedValue.ToEntero, DdlUnidad.SelectedItem.Text, txtCantidad.Text.ToDouble,
txtPrecio.Text.ToDouble, TxtnSerie.Text.Replace(" ", String.Empty), LblCodigo.Text, HdnCodigoAF.Value, HdnCveActivoFijo.Value, TxtObservacionesdetalle.Text, txtPrecio.Text.ToDouble, TxtnSerie.Text.Replace(" ", String.Empty), LblCodigo.Text, HdnCodigoAF.Value, HdnCveActivoFijo.Value, TxtObservacionesdetalle.Text,
TxtnLote.Text.Trim, FechaCaducidadAux.ToDate, DdlSeccionAlmacen.SelectedValue.ToEntero, DdlSeccionAlmacen.SelectedItem.Text) TxtnLote.Text.Trim, TxtnFechaCaducidad.Text.ToDate, DdlSeccionAlmacen.SelectedValue.ToEntero, DdlSeccionAlmacen.SelectedItem.Text)
LimpiarAgregar() LimpiarAgregar()
txtCantidad.Text = "" txtCantidad.Text = ""
TxtnLote.Text = "" TxtnLote.Text = ""
LblCodigo.Text = "" LblCodigo.Text = ""
TxtnSerie.Text = "" TxtnSerie.Text = ""
TxtnLote.Text = ""
TxtnFechaCaducidad.Text = ""
HdnCodigoAF.Value = "-1" HdnCodigoAF.Value = "-1"
HdnCveActivoFijo.Value = "-1" HdnCveActivoFijo.Value = "-1"
RegistraScript("CodigoAF = "";") RegistraScript("CodigoAF = "";")
@@ -2162,25 +2156,23 @@ Partial Class Inventarios_EntradasSalidas
If dr IsNot Nothing Then If dr IsNot Nothing Then
If CBool(dr("AplicaSerie")) Then If CBool(dr("AplicaSerie")) Then
'LblSerieLote.Visible = True
TxtnSerie.Visible = True TxtnSerie.Visible = True
divSerie.Visible = True divSerie.Visible = True
'TrSerieLote.Visible = True
'TrSerieLote2.Visible = True
End If End If
If CBool(dr("AplicaLote")) Then If CBool(dr("AplicaLote")) Then
TxtnLote.Visible = True TxtnLote.Visible = True
divLote.Visible = True divLote.Visible = True
'TrLote.Visible = True
'TrLote2.Visible = True
End If End If
If CBool(dr("AplicaSeccion")) Then If CBool(dr("AplicaSeccion")) Then
divSeccionAlmacen.Visible = True divSeccionAlmacen.Visible = True
End If End If
If CBool(dr("AplicaCaducidad")) Then
divCaducidad.Visible = True
End If
End If End If
End If End If
@@ -2383,6 +2375,8 @@ Partial Class Inventarios_EntradasSalidas
CveAFEdit = GvRow.DataKey("CveAF").ToEntero CveAFEdit = GvRow.DataKey("CveAF").ToEntero
txtPrecio.Text = GvRow.DataKey("PU").ToDouble.FormatoNumero txtPrecio.Text = GvRow.DataKey("PU").ToDouble.FormatoNumero
TxtnSerie.Text = GvRow.DataKey("Serie") TxtnSerie.Text = GvRow.DataKey("Serie")
TxtnLote.Text = GvRow.DataKey("Lote")
TxtnFechaCaducidad.Text = GvRow.DataKey("FechaCaducidad").ToDate.ToShortDateString
TxtObservacionesdetalle.Text = GvRow.DataKey("Observaciones") TxtObservacionesdetalle.Text = GvRow.DataKey("Observaciones")
DdlSeccionAlmacen.SelectedValueExist(GvRow.DataKey("CveSeccionAlmacen")) DdlSeccionAlmacen.SelectedValueExist(GvRow.DataKey("CveSeccionAlmacen"))
LkAgregarDetalle.Text = "Actualizar" LkAgregarDetalle.Text = "Actualizar"
@@ -2409,6 +2403,8 @@ Partial Class Inventarios_EntradasSalidas
CveAFEdit = GvRow.DataKey("CveAF").ToEntero CveAFEdit = GvRow.DataKey("CveAF").ToEntero
txtPrecio.Text = GvRow.DataKey("PU").ToDouble.FormatoNumero txtPrecio.Text = GvRow.DataKey("PU").ToDouble.FormatoNumero
TxtnSerie.Text = GvRow.DataKey("Serie") TxtnSerie.Text = GvRow.DataKey("Serie")
TxtnLote.Text = GvRow.DataKey("Lote")
TxtnFechaCaducidad.Text = GvRow.DataKey("FechaCaducidad")
TxtObservacionesdetalle.Text = GvRow.DataKey("Observaciones") TxtObservacionesdetalle.Text = GvRow.DataKey("Observaciones")
DdlSeccionAlmacen.SelectedValueExist(GvRow.DataKey("CveSeccionAlmacen")) DdlSeccionAlmacen.SelectedValueExist(GvRow.DataKey("CveSeccionAlmacen"))
Dim Origen As Integer = GlobalDTInvConceptos.FiltroPrimeroValor("Origen", String.Format("CveConcepto = {0}", DdlConcepto.SelectedValue)).ToEntero Dim Origen As Integer = GlobalDTInvConceptos.FiltroPrimeroValor("Origen", String.Format("CveConcepto = {0}", DdlConcepto.SelectedValue)).ToEntero
@@ -3998,12 +3994,13 @@ Partial Class Inventarios_EntradasSalidas
TxtnSerie.Text = Serie TxtnSerie.Text = Serie
TxtnLote.Text = Lote TxtnLote.Text = Lote
DdlSeccionAlmacen.SelectedValue = CveSeccionAlmacen.ToString DdlSeccionAlmacen.SelectedValue = CveSeccionAlmacen.ToString
FechaCaducidadAux = If(Caducidad = "", MinFecha.ToString, Caducidad) TxtnFechaCaducidad.Text = If(Caducidad = "", MinFecha.ToString, Caducidad)
AgregarPS() AgregarPS()
txtPrecio.Text = "" txtPrecio.Text = ""
DdlUnidad.SelectedItem.Text = "" DdlUnidad.SelectedItem.Text = ""
TxtnSerie.Text = "" TxtnSerie.Text = ""
TxtnLote.Text = "" TxtnLote.Text = ""
TxtnFechaCaducidad.Text = ""
DdlSeccionAlmacen.SelectedValue = "-1" DdlSeccionAlmacen.SelectedValue = "-1"
NumAgregados = NumAgregados + 1 NumAgregados = NumAgregados + 1
@@ -4228,6 +4225,8 @@ Partial Class Inventarios_EntradasSalidas
ElProductoChange() ElProductoChange()
txtPrecio.Text = "" txtPrecio.Text = ""
TxtnSerie.Text = "" TxtnSerie.Text = ""
TxtnLote.Text = ""
TxtnFechaCaducidad.Text = ""
TxtObservacionesdetalle.Text = "" TxtObservacionesdetalle.Text = ""
DdlSeccionAlmacen.SelectedValue = "-1" DdlSeccionAlmacen.SelectedValue = "-1"
LkAgregarDetalle.Text = "Agregar" LkAgregarDetalle.Text = "Agregar"