Campos Lote/FechaCaducidad
This commit is contained in:
@@ -126,7 +126,7 @@
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UppEntrega" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvD" DataKeyNames="CveUM,CvePS,CveSeccionAlmacen,Serie,Lote,FechaCaducidad,CveMovimientoDetalle,CveMovimiento" runat="server" AutoGenerateColumns="False" EmptyDataText="No hay movimientos pendientes" CssClass="table table-hover Widthall" GridLines="None">
|
||||
<asp:GridView ID="GvD" DataKeyNames="CveUM,CvePS,CveSeccionAlmacen,Serie,Lote,FechaCaducidad,CveMovimientoDetalle,CveMovimiento, AplicaLote, AplicaCaducidad" runat="server" AutoGenerateColumns="False" EmptyDataText="No hay movimientos pendientes" CssClass="table table-hover Widthall" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center">
|
||||
<%--<HeaderTemplate>
|
||||
@@ -145,10 +145,28 @@
|
||||
<asp:BoundField HeaderText="Disponible" DataField="Cantidad" DataFormatString="{0:#,##0.######}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Unidad" DataField="UnidadMedida" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-Width="40%" />
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="15%" />
|
||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="15%" />
|
||||
<asp:BoundField HeaderText="F. Caducidad" DataField="FechaCaducidad" ItemStyle-Width="15%" />
|
||||
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-Width="35%" />
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="10%" Visible="false"/>
|
||||
<asp:TemplateField HeaderText="Lote" ItemStyle-Width="10%" HeaderStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlLote" runat="server" Text='<%# Eval("Lote", "{0}") %>'></asp:Literal>
|
||||
<asp:Textbox ID="TxtLote" runat="server" Visible="false" Width="70px" Text='<%# Eval("Lote", "{0}") %>'></asp:Textbox>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha" ItemStyle-Width="25%" HeaderStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaCaducidad" runat="server" Text='<%# Eval("FechaCaducidad", "{0:d}") %>'></asp:Literal>
|
||||
<asp:Textbox ID="TxtFechaCaducidad" runat="server" Visible="false" Width="75px" Text='<%# Eval("FechaCaducidad", "{0:d}") %>'></asp:Textbox>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaCad" runat="server" ControlToValidate="TxtFechaCaducidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="GrpRecibir"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCFechaCad" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaCad" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaCad" runat="server" TargetControlID="TxtFechaCaducidad" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<asp:CompareValidator ID="CVFechaCad" runat="server" ControlToValidate="TxtFechaCaducidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpRecibir"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEFechaCad" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaCad" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
|
||||
@@ -66,7 +66,12 @@ Partial Class Inventarios_PrestamosdeProveedor
|
||||
CveMovimiento = Dr("CveMovimiento").ToString.ToEntero
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
GvD.Columns(6).Visible = ObjInv.DtResultados.MAX("Serie") <> ""
|
||||
GvD.Columns(7).Visible = ObjInv.DtResultados.MAX("Lote") <> ""
|
||||
GvD.Columns(8).Visible = ObjInv.DtResultados.MAX("FechaCaducidad").ToDate > MinFecha
|
||||
GvD.Columns(8).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||
|
||||
ObjInv.Dispose()
|
||||
GvD.DataBind()
|
||||
@@ -90,18 +95,35 @@ Partial Class Inventarios_PrestamosdeProveedor
|
||||
Else
|
||||
If TxtFolioEntrega.Text <> "" Then
|
||||
e.Row.FCCheckBox("Chk").Visible = True
|
||||
e.Row.FCTextBox("TxtCantidad").Enabled = True
|
||||
e.Row.FCTextBox("TxtCantidad").Enabled = True
|
||||
|
||||
If e.Row.DataKey("AplicaLote").ToString = "True" Then
|
||||
e.Row.FCLiteral("LtlLote").Visible = False
|
||||
e.Row.FCTextBox("TxtLote").Visible = True
|
||||
|
||||
End If
|
||||
|
||||
If e.Row.DataKey("AplicaCaducidad").ToString = "True" Then
|
||||
e.Row.FCLiteral("LtlFechaCaducidad").Visible = False
|
||||
e.Row.FCTextBox("TxtFechaCaducidad").Visible = True
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
e.Row.FCTextBox("TxtCantidad").Visible = True
|
||||
e.Row.FCTextBox("TxtCantidad").Attributes.Add("onkeyup", String.Format("ValidaCantidad(this,{0});", e.Row.DBCampo("Cantidad")))
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
''FUNCIONALIDAD PISTOLA DE CODIGOS
|
||||
'If UsuarioActual.Empresa.Funcionalidad(132) = "1" And e.Row.DBCampo("CodigoBarras").Trim <> "" Then
|
||||
' e.Row.FCTextBox("TxtCantidad").Enabled = False
|
||||
'End If
|
||||
|
||||
End If
|
||||
|
||||
''FUNCIONALIDAD PISTOLA DE CODIGOS
|
||||
'If UsuarioActual.Empresa.Funcionalidad(132) = "1" And e.Row.DBCampo("CodigoBarras").Trim <> "" Then
|
||||
' e.Row.FCTextBox("TxtCantidad").Enabled = False
|
||||
'End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnRecibir_Click(sender As Object, e As EventArgs)
|
||||
@@ -169,7 +191,7 @@ Partial Class Inventarios_PrestamosdeProveedor
|
||||
If gvr.FCCheckBox("Chk").Checked AndAlso gvr.FCTextBox("TxtCantidad").Text.ToString.ToDecimal > 0 Then
|
||||
CveMovimientoDetalleEntrada = gvr.DataKey("CveMovimientoDetalle").ToString.ToEntero
|
||||
CvePS = gvr.DataKey("CvePS").ToString.ToEntero
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, gvr.FCTextBox("TxtCantidad").Text.ToString.ToDecimal, gvr.DataKey("CveUM").ToString.ToEntero, gvr.DataKey("CvePS").ToString.ToEntero, 0, -1, CveMovimientoDetalleEntrada:=CveMovimientoDetalleEntrada, Serie:=gvr.DataKey("Serie").ToString, Lote:=gvr.DataKey("Lote").ToString, FechaCaducidad:=gvr.DataKey("FechaCaducidad").ToString.ToDate) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, gvr.FCTextBox("TxtCantidad").Text.ToString.ToDecimal, gvr.DataKey("CveUM").ToString.ToEntero, gvr.DataKey("CvePS").ToString.ToEntero, 0, -1, CveMovimientoDetalleEntrada:=CveMovimientoDetalleEntrada, Serie:=gvr.DataKey("Serie").ToString, Lote:=gvr.FCTextBox("TxtLote").ToString, FechaCaducidad:=gvr.FCTextBox("TxtFechaCaducidad").ToString.ToDate) Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un error al guardar los movimientos de salida"
|
||||
Exit For
|
||||
|
||||
Reference in New Issue
Block a user