SMS 2024.02.08 EntregaAlmacen.aspx nueva columna con combo de los lote/caducidades del ps
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style type="text/css">
|
||||
<%-- <style type="text/css">
|
||||
.gvInventario tr td:nth-child(4) {
|
||||
width: 6% !important;
|
||||
}
|
||||
@@ -42,7 +42,16 @@
|
||||
.btn.default:hover {
|
||||
background-color: lightgray;
|
||||
}
|
||||
</style>--%>
|
||||
<style type="text/css">
|
||||
|
||||
.customCalendarStyle
|
||||
{
|
||||
position: relative; /* Asegura que z-index funcione */
|
||||
z-index: 9999;
|
||||
}
|
||||
</style>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Entrega Almacén (Surtir Mercancia)
|
||||
@@ -472,145 +481,174 @@
|
||||
|
||||
</div>
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet light xspadding bordered ">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Salida de Inventario</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form-horizontal form-row-sepe formnombottom">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<%--AGREGAR POR CODIGO DE BARRAS--%>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="row" runat="server" id="DivCodigoSeriePS" visible="false">
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="col-md-2 pull-right">
|
||||
<div class="btn-group" style="float: right;">
|
||||
<asp:Button ID="BtnVerSugerencias" CssClass="btn green-haze btn-outline btn-circle btn-sm" OnClick="BtnVerSugerencias_Click" runat="server" Text="Ver Sugerencias" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4 pull-right">
|
||||
<table style="float: right;">
|
||||
<tr>
|
||||
<td><i class="fa fa-barcode" style="font-size: 1.8em; margin-top: 8px;" aria-hidden="true" data-toggle="tooltip" title="Código Barras"></i></td>
|
||||
<td>
|
||||
<asp:Panel ID="PanelCodigo" runat="server" DefaultButton="BtnCodigoPS">
|
||||
<asp:TextBox ID="TxtCodigoPS" ClientIDMode="Static" Text="" runat="server" />
|
||||
<asp:Button Text="" ID="BtnCodigoPS" OnClick="BtnCodigoPS_Click" Style="display: none" runat="server" />
|
||||
</asp:Panel>
|
||||
</td>
|
||||
<td runat="server" visible="false" id="TdSeriePS">
|
||||
<asp:Panel ID="PanelSerie" runat="server" DefaultButton="BtnSeriePS">
|
||||
<asp:TextBox ID="TxtSeriePS" Text="" runat="server" />
|
||||
<asp:Button Text="" ID="BtnSeriePS" OnClick="BtnSeriePS_Click" Style="display: none" runat="server" />
|
||||
</asp:Panel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="portlet light smmallpadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Salida de Inventario</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" >
|
||||
|
||||
<%--AGREGAR POR CODIGO DE BARRAS--%>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="row" runat="server" id="DivCodigoSeriePS" visible="false">
|
||||
|
||||
<%--GV DATOS--%>
|
||||
<asp:GridView ID="GvDatos" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" ShowFooter="True" ShowHeader="true" ShowHeaderWhenEmpty="True"
|
||||
DataKeyNames="Consec,CvePS,Codigo,CodigoBarras,CveUM,CantidadC,CantidadF,UM,PS,CveClasificacion,CveCategoria,CveVentaDetalle,CveTamaño,AplicaSeccion, AplicaSerie,AplicaLote,AplicaCaducidad" HeaderStyle-CssClass="Titulos" CssClass="table table-striped table-hover Widthall ScrollAD gvInventario mysmallbtn" data-heighterror="450" data-freezerows="1" GridLines="None">
|
||||
<HeaderStyle Height="30px" />
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="cbInv" runat="server" Checked="true" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center" Width="2.5%" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Cant. Venta" DataField="CantidadC" DataFormatString="{0:#,##0.######}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="5%" />
|
||||
|
||||
<asp:BoundField HeaderText="Cant. Surtida" DataField="CantidadS" DataFormatString="{0:#,##0.######}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:TemplateField HeaderText="Cant. a Surtir">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TbCantidadF" runat="server" Width="50px" Mask="9,999.99" DataFormatString="{0:#,##0.######}" Style="text-align: right" Text='<%# Eval("CantidadF", "{0:#,##0.######}") %>'></asp:TextBox>
|
||||
<asp:Button Text="Serie" ID="BtnSerie" OnClick="BtnSerie_Click" CssClass="btn btn-primary btn-xs" runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Unidad" DataField="UM" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" />
|
||||
<%-- <asp:HyperLinkField HeaderText="Producto o Servicio" Target="_blank" DataTextField="CodigoPS" DataNavigateUrlFields="CvePS" DataNavigateUrlFormatString="/Ventas/ProductosServicios.aspx?CvePS={0}" ItemStyle-HorizontalAlign="Left" />--%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
||||
<HeaderTemplate>
|
||||
<asp:Literal ID="LtlHeaderPS" Text="Producto o Servicio" runat="server"></asp:Literal>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplPS" runat="server" Target="_blank" Text='<%# Eval("CodigoPS", "{0}") %>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Observación" DataField="ObservacionesDetalle" ItemStyle-Width="7.5%" />
|
||||
|
||||
<asp:TemplateField HeaderText="Sección" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7.5%" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="SeccionAlmacen" DataValueField="CveSeccionAlmacen" CssClass="select2me" Style="width: 85% !important" runat="server" CausesValidation="true" Visible="false">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Lote" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7.5%" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtLote" CssClass="form-control input-sm" runat="server" Visible="false" Text='<%# Eval("Lote") %>' Width="100px" Enabled="false"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha Caducidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" Visible="false">
|
||||
<ItemTemplate>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtCaducidad" Text='<%# Eval("FechaCaducidad") %>' CssClass="form-control input-sm ADSMaskDate" Style="width: 78px" runat="server" Visible="false" Enabled="false"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="LnkCaducidad" class="btn default" Visible="false" Enabled="false"> <i class="fa fa-calendar"></i> </asp:LinkButton>
|
||||
|
||||
<ajax:MaskedEditExtender ID="MEECaducidad" runat="server" TargetControlID="TxtCaducidad" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" Enabled="false" ID="CECaducidad" TargetControlID="TxtCaducidad" PopupButtonID="LnkCaducidad" PopupPosition="BottomLeft" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVCaducidad" runat="server" ControlToValidate="TxtCaducidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Caducidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECaducidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVCaducidad"></ajax:ValidatorCalloutExtender>
|
||||
</span>
|
||||
<div class="col-md-2 pull-right">
|
||||
<div class="btn-group" style="float: right;">
|
||||
<asp:Button ID="BtnVerSugerencias" CssClass="btn green-haze btn-outline btn-circle btn-sm" OnClick="BtnVerSugerencias_Click" runat="server" Text="Ver Sugerencias" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4 pull-right">
|
||||
<table style="float: right;">
|
||||
<tr>
|
||||
<td><i class="fa fa-barcode" style="font-size: 1.8em; margin-top: 8px;" aria-hidden="true" data-toggle="tooltip" title="Código Barras"></i></td>
|
||||
<td>
|
||||
<asp:Panel ID="PanelCodigo" runat="server" DefaultButton="BtnCodigoPS">
|
||||
<asp:TextBox ID="TxtCodigoPS" ClientIDMode="Static" Text="" runat="server" />
|
||||
<asp:Button Text="" ID="BtnCodigoPS" OnClick="BtnCodigoPS_Click" Style="display: none" runat="server" />
|
||||
</asp:Panel>
|
||||
</td>
|
||||
<td runat="server" visible="false" id="TdSeriePS">
|
||||
<asp:Panel ID="PanelSerie" runat="server" DefaultButton="BtnSeriePS">
|
||||
<asp:TextBox ID="TxtSeriePS" Text="" runat="server" />
|
||||
<asp:Button Text="" ID="BtnSeriePS" OnClick="BtnSeriePS_Click" Style="display: none" runat="server" />
|
||||
</asp:Panel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Dividir" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Center" Visible="True">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox runat="server" ID="TxtDividir" Width="30px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="SoloNumeros2" runat="server" TargetControlID="TxtDividir" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<asp:Button runat="server" ID="BtnDividir" Text="Dividir" OnClick="Dividir" Style="display: none;" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<asp:HiddenField runat="server" ClientIDMode="Static" ID="HdnCantidadMovimiento" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<%--BOTON GUARDAR--%>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<div align="center">
|
||||
<asp:Label Text="Venta totalmente Surtida" ID="LbSurtida" Font-Size="Small" Visible="false" CssClass="label label-sm label-success" runat="server" />
|
||||
<br />
|
||||
<br />
|
||||
<asp:Button ID="BtnGuardar" OnClick="BtnGuardar_Click" runat="server" CssClass="btn btn-primary" Text="Guardar" Width="150px" ValidationGroup="GrpGuardar" />
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<%--GV DATOS--%>
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False"
|
||||
DataKeyNames="Consec,CvePS,Codigo,CodigoBarras,CveUM,CantidadC,CantidadF,UM,PS,CveClasificacion,CveCategoria,CveVentaDetalle,CveTamaño,AplicaSeccion, AplicaSerie,AplicaLote,AplicaCaducidad"
|
||||
CssClass="" GridLines="None" >
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="cbInv" runat="server" Checked="true" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center" Width="2.5%" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Cant. Venta" DataField="CantidadC" DataFormatString="{0:#,##0.######}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="5%" />
|
||||
|
||||
<asp:BoundField HeaderText="Cant. Surtida" DataField="CantidadS" DataFormatString="{0:#,##0.######}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:TemplateField HeaderText="Cant. a Surtir">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TbCantidadF" runat="server" Width="50px" Mask="9,999.99" DataFormatString="{0:#,##0.######}" Style="text-align: right" Text='<%# Eval("CantidadF", "{0:#,##0.######}") %>'></asp:TextBox>
|
||||
<asp:Button Text="Serie" ID="BtnSerie" OnClick="BtnSerie_Click" CssClass="btn btn-primary btn-xs" runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Unidad" DataField="UM" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" />
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
||||
<HeaderTemplate>
|
||||
<asp:Literal ID="LtlHeaderPS" Text="Producto o Servicio" runat="server"></asp:Literal>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplPS" runat="server" Target="_blank" Text='<%# Eval("CodigoPS", "{0}") %>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Observación" DataField="ObservacionesDetalle" ItemStyle-Width="7.5%" />
|
||||
|
||||
<asp:TemplateField HeaderText="Sección" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7.5%" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="SeccionAlmacen" DataValueField="CveSeccionAlmacen" CssClass="select2me" Style="width: 85% !important" runat="server" CausesValidation="true" Visible="false">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%--8--%>
|
||||
<asp:TemplateField HeaderText="Lote/caducidades" ItemStyle-HorizontalAlign="Left" Visible="false" ItemStyle-Width="150px">
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlCaducidadProducto" CssClass="select2me" Width="150px" runat="server" CausesValidation="true" AutoPostBack="true" OnSelectedIndexChanged="DdlCaducidadProducto_SelectedIndexChanged">
|
||||
<asp:ListItem Selected="True" Text="-" Value="|"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--9--%>
|
||||
<asp:TemplateField HeaderText="Lote" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7.5%" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtLote" CssClass="form-control input-sm" runat="server" Visible="false" Text='<%# Eval("Lote") %>' Width="100px" Enabled="false"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha Caducidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" Visible="false">
|
||||
<ItemTemplate>
|
||||
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;" runat="server" visible="false" id="DvFechaCaducidad" >
|
||||
<asp:TextBox ID="TxtCaducidad" Text="" CssClass="form-control input-sm ADSMaskDate" Style="width: 87px" runat="server" ></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="LnkCaducidad" class="btn default" > <i class="fa fa-calendar"></i> </asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEECaducidad" runat="server" TargetControlID="TxtCaducidad" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CECaducidad" TargetControlID="TxtCaducidad" PopupButtonID="LnkCaducidad" PopupPosition="TopLeft" Format="dd/MM/yyyy"
|
||||
> </ajax:CalendarExtender>
|
||||
|
||||
|
||||
<asp:RequiredFieldValidator ID="RFVCaducidad" runat="server" ControlToValidate="TxtCaducidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Caducidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECaducidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVCaducidad"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Dividir" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Center" Visible="True">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox runat="server" ID="TxtDividir" Width="30px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="SoloNumeros2" runat="server" TargetControlID="TxtDividir" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<asp:Button runat="server" ID="BtnDividir" Text="Dividir" OnClick="Dividir" Style="display: none;" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<asp:HiddenField runat="server" ClientIDMode="Static" ID="HdnCantidadMovimiento" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
<%--BOTON GUARDAR--%>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<div align="center">
|
||||
<asp:Label Text="Venta totalmente Surtida" ID="LbSurtida" Font-Size="Small" Visible="false" CssClass="label label-sm label-success" runat="server" />
|
||||
<br />
|
||||
<br />
|
||||
<asp:Button ID="BtnGuardar" OnClick="BtnGuardar_Click" runat="server" CssClass="btn btn-primary" Text="Guardar" Width="150px" ValidationGroup="GrpGuardar" />
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<%--AGREGA POR SERIE--%>
|
||||
@@ -702,8 +740,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="DivLote" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<asp:UpdatePanel ID="UpLoteBatch" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
|
||||
@@ -7,6 +7,8 @@ Imports System.IO
|
||||
Imports System.Web.Management
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports MoreLinq
|
||||
Imports Telerik.Web.UI
|
||||
|
||||
Partial Class Inventarios_EntregaAlmacen
|
||||
Inherits ClsPaginas
|
||||
@@ -715,9 +717,9 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
End If
|
||||
|
||||
If DtDatos.SUM("CantidadS") <= 0 Then
|
||||
GvDatos.CssClass = "table table-striped table-hover Widthall ScrollAD gvInventario gvEscondeColumna"
|
||||
GvDatos.CssClass = "table table-striped table-hover Widthall gvInventario gvEscondeColumna"
|
||||
Else
|
||||
GvDatos.CssClass = "table table-striped table-hover Widthall ScrollAD gvInventario"
|
||||
GvDatos.CssClass = "table table-striped table-hover Widthall gvInventario"
|
||||
End If
|
||||
|
||||
If CveAlmacenTraspasoDestino > 0 And Not (TipoMovimiento = 2 And TipoDocto.Contiene("Rem", "Ped")) Then
|
||||
@@ -920,9 +922,9 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
CveVentaSurtir = -1
|
||||
CveOSSurtir = -1
|
||||
If DtDatos.SUM("CantidadS") <= 0 Then
|
||||
GvDatos.CssClass = "table table-striped table-hover Widthall ScrollAD gvInventario gvEscondeColumna"
|
||||
GvDatos.CssClass = "table table-striped table-hover Widthall gvInventario gvEscondeColumna"
|
||||
Else
|
||||
GvDatos.CssClass = "table table-striped table-hover Widthall ScrollAD gvInventario"
|
||||
GvDatos.CssClass = "table table-striped table-hover Widthall gvInventario"
|
||||
End If
|
||||
|
||||
If CveAlmacenTraspasoDestino > 0 Then
|
||||
@@ -1000,9 +1002,16 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
End If
|
||||
|
||||
If AplicaSeccion Then GvDatos.Columns(7).Visible = True
|
||||
If AplicaLote Then GvDatos.Columns(8).Visible = True
|
||||
If AplicaCaducidad Then GvDatos.Columns(9).Visible = True
|
||||
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvDatos.Columns(9).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||
If AplicaLote Then GvDatos.Columns(9).Visible = True
|
||||
If AplicaCaducidad Then GvDatos.Columns(10).Visible = True
|
||||
|
||||
If AplicaLote Or AplicaCaducidad Then
|
||||
GvDatos.Columns(8).Visible = True
|
||||
End If
|
||||
|
||||
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then
|
||||
GvDatos.Columns(10).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||
End If
|
||||
'GvDatos.Columns(9).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) <> "", UsuarioActual.Empresa.Funcionalidad(147), "")
|
||||
|
||||
'SugerirFecha()
|
||||
@@ -1117,24 +1126,29 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
End If
|
||||
Else
|
||||
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = False
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim DvFechaCaducidad As HtmlGenericControl = TryCast(e.Row.FindControl("DvFechaCaducidad"), HtmlGenericControl)
|
||||
|
||||
If CBool(e.Row.DBCampo("AplicaCaducidad")) Then
|
||||
e.Row.FCTextBox("TxtCaducidad").Visible = True
|
||||
e.Row.FCLinkButton("LnkCaducidad").Visible = True
|
||||
If CBool(e.Row.DBCampo("AplicaCaducidad")) Then
|
||||
DvFechaCaducidad.Visible = True
|
||||
' e.Row.FCTextBox("TxtCaducidad").Visible = True
|
||||
'e.Row.FCLinkButton("LnkCaducidad").Visible = 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
|
||||
If (e.Row.FCTextBox("TxtCaducidad").Text = "" OrElse e.Row.FCTextBox("TxtCaducidad").Text.ToDate <= MinFecha) OrElse UsuarioActual.TienePermisoProceso(364) OrElse UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||
e.Row.FCTextBox("TxtCaducidad").ReadOnly = False
|
||||
CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = True
|
||||
e.Row.FCTextBox("TxtCaducidad").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").Visible = False
|
||||
'e.Row.FCLinkButton("LnkCaducidad").Visible = False
|
||||
'e.Row.FCTextBox("TxtCaducidad").Enabled = True
|
||||
DvFechaCaducidad.Visible = False
|
||||
End If
|
||||
|
||||
If CBool(e.Row.DBCampo("AplicaLote")) Then
|
||||
@@ -1190,8 +1204,60 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
End If
|
||||
|
||||
|
||||
If Boolean.Parse(e.Row.DataKey("AplicaLote")) Or Boolean.Parse(e.Row.DataKey("AplicaCaducidad")) Then
|
||||
|
||||
CargarCaducidadProducto(e.Row.DataKey("CvePS").ToEntero, e.Row.FCDropDownList("DdlCaducidadProducto"))
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlCaducidadProducto_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, DropDownList)).NamingContainer, GridViewRow)
|
||||
|
||||
Dim AplicaLote As Boolean = Boolean.Parse(GvRow.DataKey("AplicaLote"))
|
||||
Dim AplicaCaducidad As Boolean = Boolean.Parse(GvRow.DataKey("AplicaCaducidad"))
|
||||
Dim DdlCaducidadProducto As DropDownList = GvRow.FCDropDownList("DdlCaducidadProducto")
|
||||
|
||||
Dim ArrayCaducidad As String() = DdlCaducidadProducto.SelectedValue.Split("|"c)
|
||||
Dim Lote As String = ArrayCaducidad(0)
|
||||
Dim FechaCaducidad As String = ArrayCaducidad(1)
|
||||
|
||||
|
||||
|
||||
If AplicaLote Then
|
||||
GvRow.FCTextBox("TxtLote").Text = Lote
|
||||
End If
|
||||
|
||||
If AplicaCaducidad Then
|
||||
GvRow.FCTextBox("TxtCaducidad").Text = FechaCaducidad
|
||||
End If
|
||||
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargarCaducidadProducto(CvePS As Integer, ByRef DdlLoteFechaCaducidad As DropDownList)
|
||||
|
||||
Dim almacenes As String = DdlAlmacen.SelectedValue
|
||||
If almacenes = "" Then
|
||||
almacenes = "-1"
|
||||
End If
|
||||
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
|
||||
If ObjInventarios.GetExistenciasCaducidad(CvePS, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, almacenes) Then
|
||||
|
||||
For Each dr As DataRow In ObjInventarios.DtResultados.Rows
|
||||
DdlLoteFechaCaducidad.Items.Add(New ListItem($"Lote: {dr("Lote").ToString} - Caducidad: {dr("FechaCaducidad").ToString.ToDate.ToString("dd/MM/yyyy")}", $"{dr("Lote").ToString}|{dr("FechaCaducidad").ToString.ToDate.ToString("dd/MM/yyyy")}"))
|
||||
Next
|
||||
|
||||
End If
|
||||
ObjInventarios.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDocumentos(tCveVenta As Integer)
|
||||
@@ -4458,6 +4524,8 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Return Respuesta
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -499,7 +499,7 @@
|
||||
|
||||
</div>--%>
|
||||
|
||||
GvDatosDesarmado
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user