SMS 2024.02.08 Paquetes. verificar la existencia del producto, considerando lote/caducidad
This commit is contained in:
@@ -2661,94 +2661,6 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox14">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Sucursal Tijuana</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>9pt</FontSize>
|
||||
<TextDecoration>None</TextDecoration>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Beneficiario: ELECTRICA SERVEC S DE RL DE CV </Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
<TextDecoration>None</TextDecoration>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Banco: SANTANDER </Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
<TextDecoration>None</TextDecoration>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>CLABE: 014 760 655 074 603 318 </Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
<TextDecoration>None</TextDecoration>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Cuenta: 65507460331 </Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
<TextDecoration>None</TextDecoration>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Top>8.27176cm</Top>
|
||||
<Left>9.76877cm</Left>
|
||||
<Height>1.89191cm</Height>
|
||||
<Width>9.18009cm</Width>
|
||||
<ZIndex>20</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Image Name="Image1">
|
||||
<Source>Embedded</Source>
|
||||
<Value>RFIRMAELECTRONICAEDITABLE</Value>
|
||||
@@ -2757,7 +2669,7 @@
|
||||
<Left>0.51012cm</Left>
|
||||
<Height>1.73059cm</Height>
|
||||
<Width>3.63914cm</Width>
|
||||
<ZIndex>21</ZIndex>
|
||||
<ZIndex>20</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -2771,7 +2683,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Cuentas Bancarias</Value>
|
||||
<Value>Cuenta Bancaria</Value>
|
||||
<Style />
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -2784,8 +2696,8 @@
|
||||
<Top>7.75847cm</Top>
|
||||
<Left>0.25136cm</Left>
|
||||
<Height>0.53798cm</Height>
|
||||
<Width>18.6975cm</Width>
|
||||
<ZIndex>22</ZIndex>
|
||||
<Width>9.06118cm</Width>
|
||||
<ZIndex>21</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -3236,7 +3148,7 @@
|
||||
<Left>0.15747cm</Left>
|
||||
<Height>2.0799cm</Height>
|
||||
<Width>20.85172cm</Width>
|
||||
<ZIndex>23</ZIndex>
|
||||
<ZIndex>22</ZIndex>
|
||||
<Visibility>
|
||||
<Hidden>=Microsoft.VisualBasic.Interaction.IIF(First(Fields!SerieFolio.Value, "DataSet4") <> "", False, True)</Hidden>
|
||||
</Visibility>
|
||||
@@ -3277,7 +3189,7 @@
|
||||
<Left>16.84664cm</Left>
|
||||
<Height>0.49387cm</Height>
|
||||
<Width>4.14557cm</Width>
|
||||
<ZIndex>24</ZIndex>
|
||||
<ZIndex>23</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
|
||||
@@ -161,11 +161,31 @@
|
||||
<asp:GridView ID="GvSeriesPaqueteArmado" runat="server" AutoGenerateColumns="false" CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="#" DataField="Row" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:TemplateField HeaderText="Serie" ItemStyle-Width="90%" ItemStyle-HorizontalAlign="Center">
|
||||
<asp:TemplateField HeaderText="Serie" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox Text='<%# Eval("Serie")%>' ID="TxtSerie" runat="server" Width="90%" />
|
||||
<asp:TextBox Text='<%# Eval("Serie")%>' ID="TxtSerie" runat="server" Width="150px" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Lote" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox Text='<%# Eval("Lote")%>' ID="TxtLote" runat="server" Width="150px" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha Caducidad" ItemStyle-Width="90%" ItemStyle-HorizontalAlign="Left">
|
||||
<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" >
|
||||
<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>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
@@ -417,25 +437,89 @@
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<asp:Panel runat="server" ID="PnlSeriePaqueteDesarmado" DefaultButton="BtnAgregarSerieDesarmado">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2">Serie</div>
|
||||
<div class="col-md-3">
|
||||
<asp:TextBox runat="server" ID="TxtSerieDesarmado" Text="" CssClass="form-control input-sm" />
|
||||
<asp:RequiredFieldValidator ID="RFVSerieDesarmado" runat="server" ControlToValidate="TxtSerieDesarmado" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Serie''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregaSeriePaqueteDesarmado"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCESerieDesarmado" runat="server" HighlightCssClass="vco" TargetControlID="RFVSerieDesarmado" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<div class="col-md-3" runat="server" id="DvDesArmadoSerie" visible="false">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox runat="server" ID="TxtSerieDesarmado" Text="" CausesValidation="true" CssClass="form-control" />
|
||||
<asp:RequiredFieldValidator ID="RfvTxtSerieDesarmado" runat="server" ControlToValidate="TxtSerieDesarmado" CssClass="help-block errorimput"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Serie''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregaSeriePaqueteDesarmado"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtSerieDesarmado.ClientID.ToString()%>">Serie:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3" runat="server" id="DvDesArmadoLote" visible="false">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox runat="server" ID="TxtLoteDesarmado" Text="" CausesValidation="true" CssClass="form-control" />
|
||||
<asp:RequiredFieldValidator ID="RfvTxtLoteDesarmado" runat="server" ControlToValidate="TxtLoteDesarmado" CssClass="help-block errorimput"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Lote''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregaSeriePaqueteDesarmado"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtLoteDesarmado.ClientID.ToString()%>">Lote:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4 col-md-offset-3 text-right">
|
||||
|
||||
<div class="col-md-3" runat="server" id="DvDesArmadoCaducidad" visible="false">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px; margin-top: -10px !important;" runat="server" id="DvFechaCaducidad">
|
||||
|
||||
<label for="<%= TxtDesarmadoCaducidad.ClientID.ToString()%>" style="color: #888888;">Fecha Caducidad:</label>
|
||||
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px; margin-top: -5px !important;">
|
||||
<asp:TextBox ID="TxtDesarmadoCaducidad" 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>
|
||||
</div>
|
||||
|
||||
<ajax:MaskedEditExtender ID="MEECaducidad" runat="server" TargetControlID="TxtDesarmadoCaducidad" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CECaducidad" TargetControlID="TxtDesarmadoCaducidad" PopupButtonID="LnkCaducidad" PopupPosition="TopLeft" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtDesarmadoCaducidad" runat="server" ControlToValidate="TxtDesarmadoCaducidad" 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="GrpAgregaSeriePaqueteDesarmado"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECaducidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVTxtDesarmadoCaducidad"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<%-- <div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px; margin-top: -10px !important;">
|
||||
<label for="<%= TxtFechaNacimiento.ClientID.ToString()%>" style="color: #888888;">Fecha de Nacimiento: </label>
|
||||
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px; margin-top: -5px !important;">
|
||||
<asp:TextBox ID="TxtFechaNacimiento" CssClass="form-control" MaxLength="20" runat="server" Width="100px" Height="28px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkFechaNacimiento" class="btn default" Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<ajax:MaskedEditExtender ID="MEEFechaNacimiento" runat="server" TargetControlID="TxtFechaNacimiento" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaNacimiento" PopupButtonID="LnkFechaNacimiento" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaNacimiento" runat="server" ControlToValidate="TxtFechaNacimiento" Display="None" ErrorMessage="El campo <b>''Fecha de Nacimiento''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardarMedico"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaNacimiento" runat="server" ControlToValidate="TxtFechaNacimiento" Display="None" ErrorMessage="El campo <b>''Fecha de Nacimiento''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardarMedico"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaNacimiento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaNacimiento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>--%>
|
||||
|
||||
GvDatosDesarmado
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-3 text-right">
|
||||
<asp:Button Text="Agregar" CssClass="btn btn-primary" ID="BtnAgregarSerieDesarmado" OnClick="BtnAgregarSerieDesarmado_Click" ValidationGroup="GrpAgregaSeriePaqueteDesarmado" runat="server" />
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</asp:Panel>
|
||||
|
||||
<br />
|
||||
|
||||
<asp:GridView ID="GvSeriesPaqueteDesarmado" runat="server" DataKeyNames="Serie" AutoGenerateColumns="false" CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
|
||||
<asp:GridView ID="GvSeriesPaqueteDesarmado" runat="server" DataKeyNames="Serie,Lote,FechaCaducidad" AutoGenerateColumns="false" CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="#" DataField="Row" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="70%" />
|
||||
<asp:BoundField HeaderText="#" DataField="Row" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="30%" />
|
||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="30%" />
|
||||
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-Width="30%" DataFormatString="{0:dd/MM/yyyy}" />
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lnkRemove" runat="server" CssClass="btn btn-circle btn-xs red" Text="<i class='icon-trash'></i>" CommandName="Delete" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea eliminar?" data-btn-ok-label="si"></asp:LinkButton>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.IO.Packaging
|
||||
Imports Extensiones
|
||||
Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
Inherits ClsPaginas
|
||||
@@ -89,12 +90,32 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property AplicaSerie As Boolean
|
||||
Private Property AplicaLotePaquete As Boolean
|
||||
Get
|
||||
Return CType(ViewState("AplicaSerie"), Boolean)
|
||||
Return CType(ViewState("AplicaLotePaquete"), Boolean)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("AplicaSerie") = value
|
||||
ViewState("AplicaLotePaquete") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Property AplicaCaducidadPaquete As Boolean
|
||||
Get
|
||||
Return CType(ViewState("AplicaCaducidadPaquete"), Boolean)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("AplicaCaducidadPaquete") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Property AplicaSeriePaquete As Boolean
|
||||
Get
|
||||
Return CType(ViewState("AplicaSeriePaquete"), Boolean)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("AplicaSeriePaquete") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -245,6 +266,12 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
|
||||
#Region " PROCESAR - VERIFICAR EXISTENCIAS "
|
||||
Protected Sub BtnVerificarExistenciasArmado_Click(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
AplicaSeriePaquete = False
|
||||
AplicaLotePaquete = False
|
||||
AplicaCaducidadPaquete = False
|
||||
|
||||
TipoMovimiento = 1
|
||||
Limpia(TipoMovimiento)
|
||||
|
||||
@@ -289,24 +316,43 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
If ErrorExistencias Then
|
||||
Alert(TextoExistencias, TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
AplicaSerie = CBool(drP("AplicaSerie"))
|
||||
AplicaSeriePaquete = CBool(drP("AplicaSerie"))
|
||||
AplicaLotePaquete = CBool(drP("AplicaLote"))
|
||||
AplicaCaducidadPaquete = CBool(drP("AplicaCaducidad"))
|
||||
BtnGuadarArmado.Visible = True
|
||||
End If
|
||||
|
||||
If AplicaSerie Then
|
||||
|
||||
|
||||
|
||||
If AplicaSeriePaquete Or AplicaLotePaquete Or AplicaCaducidadPaquete Then
|
||||
DivSeriesPaqueteArmado.Visible = True
|
||||
Dim Dt As New DataTable
|
||||
Dt.Columns.Add("Row", GetType(Integer))
|
||||
Dt.Columns.Add("Serie", GetType(String))
|
||||
Dt.Columns.Add("Lote", GetType(String))
|
||||
Dt.Columns.Add("FechaCaducidad", GetType(Date))
|
||||
|
||||
For index = 1 To TxtCantidadArmado.Text.ToEntero
|
||||
Dim Row = Dt.NewRow
|
||||
Row("Row") = index
|
||||
Row("Serie") = ""
|
||||
Row("Lote") = ""
|
||||
Row("FechaCaducidad") = MinFecha
|
||||
Dt.Rows.Add(Row)
|
||||
Next
|
||||
|
||||
GvSeriesPaqueteArmado.Columns(1).Visible = AplicaSeriePaquete
|
||||
GvSeriesPaqueteArmado.Columns(2).Visible = AplicaLotePaquete
|
||||
GvSeriesPaqueteArmado.Columns(3).Visible = AplicaCaducidadPaquete
|
||||
|
||||
GvSeriesPaqueteArmado.DataSource = Dt
|
||||
GvSeriesPaqueteArmado.DataBind()
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
UpSeriesPaqueteArmado.Update()
|
||||
|
||||
CvePaqueteArmado = DdlPaqueteArmado.SelectedValue.ToEntero
|
||||
@@ -328,10 +374,16 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
UpGeneralesArmado.Update()
|
||||
End Sub
|
||||
Protected Sub BtnVerificarExistenciasDesarmado_Click(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
DvDesArmadoCaducidad.Visible = False
|
||||
DvDesArmadoLote.Visible = False
|
||||
DvDesArmadoSerie.Visible = False
|
||||
|
||||
DtDatosDetalle.Clear()
|
||||
BtnGuadarDesarmado.Visible = False
|
||||
TotalDesarmado.Visible = False
|
||||
AplicaSerie = False
|
||||
AplicaSeriePaquete = False
|
||||
TxtSerieDesarmado.Text = ""
|
||||
CvePaqueteDesarmado = -1
|
||||
TipoMovimiento = 2
|
||||
@@ -362,7 +414,9 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
Alert($"No hay existencia suficiente del paquete <b>""{DdlPaqueteDesarmado.SelectedItem.Text}""</b> para desarmar. Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
Else
|
||||
AplicaSerie = CBool(drP("AplicaSerie"))
|
||||
AplicaSeriePaquete = CBool(drP("AplicaSerie"))
|
||||
AplicaLotePaquete = CBool(drP("AplicaLote"))
|
||||
AplicaCaducidadPaquete = CBool(drP("AplicaCaducidad"))
|
||||
End If
|
||||
|
||||
|
||||
@@ -391,13 +445,23 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
Next
|
||||
End If
|
||||
|
||||
If AplicaSerie Then
|
||||
If AplicaSeriePaquete Or AplicaLotePaquete Or AplicaCaducidadPaquete Then
|
||||
|
||||
DvDesArmadoCaducidad.Visible = AplicaSeriePaquete
|
||||
DvDesArmadoLote.Visible = AplicaLotePaquete
|
||||
DvDesArmadoSerie.Visible = AplicaCaducidadPaquete
|
||||
|
||||
GvSeriesPaqueteDesarmado.Columns(1).Visible = AplicaSeriePaquete
|
||||
GvSeriesPaqueteDesarmado.Columns(2).Visible = AplicaLotePaquete
|
||||
GvSeriesPaqueteDesarmado.Columns(3).Visible = AplicaCaducidadPaquete
|
||||
|
||||
DivSeriesPaqueteDesarmado.Visible = True
|
||||
CreaDtSeriesDesarmado()
|
||||
DtSeriesDesarmado.Clear()
|
||||
|
||||
GvSeriesPaqueteDesarmado.DataSource = DtSeriesDesarmado
|
||||
GvSeriesPaqueteDesarmado.DataBind()
|
||||
|
||||
End If
|
||||
UpSeriesPaqueteDesarmado.Update()
|
||||
|
||||
@@ -454,42 +518,118 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
Case 1 ' ARMADO
|
||||
For Each gvr As GridViewRow In GvDatosArmado.Rows
|
||||
If gvr.DataKey("AplicaSerie") = "True" Then
|
||||
If gvr.DataKey("Cantidad").ToEntero <> DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", gvr.DataKey("Consec"))).Rows.Count Then
|
||||
Alert("Es necesario ingresas todas las series de los componentes.", TipoMensaje.MsgAdvertencia)
|
||||
|
||||
''If gvr.DataKey("Cantidad").ToEntero <> DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", gvr.DataKey("Consec"))).Rows.Count Then
|
||||
'' Alert("Es necesario ingresas todas las series de los componentes.", TipoMensaje.MsgAdvertencia)
|
||||
'' Exit Sub
|
||||
''End If
|
||||
'If gvr.FCTextBox("TxtSerie") Then
|
||||
|
||||
'End If
|
||||
|
||||
'If gvr.FCTextBox("TxtSerie").Text.Trim = "" Then
|
||||
' Alert("Es necesario ingresas todas las series de los componentes.", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
'End If
|
||||
|
||||
End If
|
||||
|
||||
If gvr.DataKey("AplicaLote") = "True" Then
|
||||
If gvr.FCTextBox("TxtLote").Text.Trim = "" Then
|
||||
Alert("Es necesario ingresas todos los lotes de los componentes.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
If gvr.DataKey("AplicaCaducidad") = "True" Then
|
||||
|
||||
If gvr.FCTextBox("TxtCaducidad").Text.ToDate <= MinFecha Then
|
||||
Alert("Es necesario ingresas todos las fechas de caducidad de los componentes.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
Case 2 ' DESARMADO
|
||||
For Each gvr As GridViewRow In GvDatosDesarmado.Rows
|
||||
|
||||
If gvr.DataKey("AplicaSerie") = "True" Then
|
||||
If gvr.DataKey("Cantidad").ToEntero <> DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", gvr.DataKey("Consec"))).Rows.Count Then
|
||||
|
||||
'If gvr.DataKey("AplicaSerie") = "True" Then
|
||||
' 'If gvr.DataKey("Cantidad").ToEntero <> DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", gvr.DataKey("Consec"))).Rows.Count Then
|
||||
' ' Alert("Es necesario ingresas todas las series de los componentes.", TipoMensaje.MsgAdvertencia)
|
||||
' ' Exit Sub
|
||||
' 'End If
|
||||
'End If
|
||||
|
||||
If gvr.FCTextBox("Serie").Text.Trim = "" Then
|
||||
Alert("Es necesario ingresas todas las series de los componentes.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If gvr.DataKey("AplicaLote") = "True" Then
|
||||
If gvr.FCTextBox("TxtLote").Text.Trim = "" Then
|
||||
Alert("Es necesario ingresas todos los lotes de los componentes.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
If gvr.DataKey("AplicaCaducidad") = "True" Then
|
||||
|
||||
If gvr.FCTextBox("TxtCaducidad").Text.ToDate <= MinFecha Then
|
||||
Alert("Es necesario ingresas todos las fechas de caducidad de los componentes.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Next
|
||||
End Select
|
||||
|
||||
'VALIDA SI EL PAQUETE ES DE SERIE QUE SE INGRESEN TODAS LAS SERIES (CANTIDAD)
|
||||
If AplicaSerie Then
|
||||
If AplicaSeriePaquete Or AplicaLotePaquete Or AplicaCaducidadPaquete Then
|
||||
Select Case (Tipo)
|
||||
Case 1 ' ARMADO
|
||||
For Each gvr As GridViewRow In GvSeriesPaqueteArmado.Rows
|
||||
If gvr.FCTextBox("TxtSerie").Text.Trim = "" Then
|
||||
Alert("Es necesario indicar las series del paquete a armar.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
|
||||
If AplicaSeriePaquete Then
|
||||
If gvr.FCTextBox("TxtSerie").Text.Trim = "" Then
|
||||
Alert("Es necesario indicar las series del paquete a armar.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
If AplicaLotePaquete Then
|
||||
If gvr.FCTextBox("TxtLote").Text.Trim = "" Then
|
||||
Alert("Es necesario indicar los lotes del paquete a armar.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
If AplicaCaducidadPaquete Then
|
||||
If gvr.FCTextBox("TxtCaducidad").Text.ToDate <= MinFecha Then
|
||||
Alert("Es necesario indicar fechas de caducidad validas del paquete a armar.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
Case 2 ' DESARMADO
|
||||
|
||||
If TxtCantidadDesarmado.Text.ToEntero <> DtSeriesDesarmado.Rows.Count Then
|
||||
Alert("Es necesario indicar las series del paquete a desarmar.", TipoMensaje.MsgAdvertencia)
|
||||
Alert("Es necesario indicar las series, lotes o Fecha de caducidad del paquete a desarmar.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
End Select
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Dim TextoError As New StringBuilder
|
||||
If Tipo = 1 Then
|
||||
Dim ObjInventarioVal As New ClsInventarios
|
||||
@@ -572,7 +712,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
End If
|
||||
|
||||
|
||||
Exit Sub
|
||||
|
||||
|
||||
|
||||
Dim ObjInventario As New ClsInventarios
|
||||
@@ -669,12 +809,17 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
End If
|
||||
|
||||
|
||||
If AplicaSerie Then
|
||||
If AplicaSeriePaquete Then
|
||||
Dim ContadorPaquete = 1
|
||||
Dim DtSeriesComponentes As New DataTable
|
||||
For Each Gvr As GridViewRow In GvSeriesPaqueteArmado.Rows
|
||||
'AGREGA MOVTO DETALLE DE LA ENTRADA DEL PAQUETE
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, 1, CveUMTemp, CvePSTemp, PUTemp, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Gvr.FCTextBox("TxtSerie").Text.Trim) Then
|
||||
|
||||
Dim Serie As String = Gvr.FCTextBox("TxtSerie").Text.Trim
|
||||
Dim Lote As String = Gvr.FCTextBox("TxtLote").Text.Trim
|
||||
Dim FechaCaducidad As Date = If(Gvr.FCTextBox("TxtCaducidad").Text.ToDate <= MinFecha, MinFecha, Gvr.FCTextBox("TxtCaducidad").Text.ToDate)
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, 1, CveUMTemp, CvePSTemp, PUTemp, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad) Then
|
||||
TieneError = True
|
||||
MensajeError = "Ocurrió un error al guardar los detalles con serie del movimiento de entrada"
|
||||
Exit For
|
||||
@@ -736,10 +881,17 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
'If AplicaSeccion Then
|
||||
' CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenDesarmado, CvePaqueteDesarmado).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
||||
'End If
|
||||
If AplicaSerie Then
|
||||
If AplicaSeriePaquete Or AplicaLotePaquete Or AplicaCaducidadPaquete Then
|
||||
|
||||
|
||||
For Each Gvr As GridViewRow In GvSeriesPaqueteDesarmado.Rows
|
||||
|
||||
Dim Serie As String = If(AplicaSeriePaquete, Gvr.DataKey("Serie").Trim, "-1")
|
||||
Dim Lote As String = If(AplicaLotePaquete, Gvr.DataKey("Lote").Trim, "-1")
|
||||
Dim FechaCaducidad As Date = If(AplicaCaducidadPaquete, Gvr.DataKey("FechaCaducidad").Trim.ToDate, MinFecha)
|
||||
|
||||
'AGREGA MOVTO DETALLE DE LA SALIDA DEL PAQUETE
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, 1, CveUMTemp, CvePSTemp, 0, CveSeccionAlmacen:=-3, Serie:=Gvr.DataKey("Serie").ToString) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, 1, CveUMTemp, CvePSTemp, 0, CveSeccionAlmacen:=-3, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad) Then
|
||||
TieneError = True
|
||||
MensajeError = "Ocurrió un error al guardar los detalles con serie del movimiento de salida"
|
||||
Exit For
|
||||
@@ -751,6 +903,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
MensajeError = "Ocurrió un error al guardar los detalles con serie del movimiento de salida"
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Next
|
||||
Else
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, TxtCantidadDesarmado.Text.ToDecimal, CveUMTemp, CvePSTemp, 0, CveSeccionAlmacen:=CveSeccionAlmacen) Then
|
||||
@@ -878,7 +1031,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
Private Sub Limpia(Tipo As Integer)
|
||||
|
||||
DtDatosDetalle.Clear()
|
||||
AplicaSerie = False
|
||||
AplicaSeriePaquete = False
|
||||
|
||||
|
||||
'If Tipo = 1 Then
|
||||
@@ -1441,6 +1594,11 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
Dt.Columns.Add("Row", GetType(Integer))
|
||||
Dt.Columns.Add("Serie", GetType(String))
|
||||
|
||||
'Dim DrPS As DataRow = Nothing
|
||||
'DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=_DdlPaqueteArmado.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
'Dim AplicaSerie
|
||||
|
||||
|
||||
For Each Row As DataRow In DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", CType(sender, LinkButton).CommandArgument.ToEntero)).Rows
|
||||
If i > TxtCantidadArmado.Text.ToEntero Then
|
||||
Exit For
|
||||
@@ -1456,6 +1614,9 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
|
||||
GvSeriesPaqueteArmado.DataSource = Dt
|
||||
GvSeriesPaqueteArmado.DataBind()
|
||||
|
||||
|
||||
|
||||
UpSeriesPaqueteArmado.Update()
|
||||
End Sub
|
||||
|
||||
@@ -1465,15 +1626,23 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
DtSeriesDesarmado = New DataTable
|
||||
DtSeriesDesarmado.Columns.Add("Row", GetType(Integer))
|
||||
DtSeriesDesarmado.Columns.Add("Serie", GetType(String))
|
||||
DtSeriesDesarmado.Columns.Add("Lote", GetType(String))
|
||||
DtSeriesDesarmado.Columns.Add("FechaCaducidad", GetType(Date))
|
||||
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub BtnAgregarSerieDesarmado_Click(sender As Object, e As EventArgs)
|
||||
Dim Serie = TxtSerieDesarmado.Text.Trim
|
||||
Dim Serie As String = If(AplicaSeriePaquete, TxtSerieDesarmado.Text.Trim, "-1")
|
||||
Dim Lote As String = If(AplicaLotePaquete, TxtLoteDesarmado.Text.Trim, "-1")
|
||||
Dim FechaCaducidad As Date = If(AplicaCaducidadPaquete, TxtDesarmadoCaducidad.Text.ToDate, MinFecha)
|
||||
|
||||
'VERIFICA EXISTENCIAS
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
Dim CveUMTemp = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePaqueteDesarmado).FiltroPrimeroValor("CveUM").ToEntero
|
||||
Dim Existencia = ObjInventarios.GetExistenciasPS(CvePaqueteDesarmado, CveUMTemp, UsuarioActual.CveEmpresa, CveAlmacenDesarmado, FechaMovto:=TxtFechaDesarmado.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Serie, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente))
|
||||
Dim Existencia = ObjInventarios.GetExistenciasPS(CvePaqueteDesarmado, CveUMTemp, UsuarioActual.CveEmpresa, CveAlmacenDesarmado, FechaMovto:=TxtFechaDesarmado.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Serie,
|
||||
CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), Lote:=Lote, FechaCaducidad:=FechaCaducidad)
|
||||
|
||||
If Existencia < 1 Then
|
||||
Alert($"No hay existencia suficiente con la Serie definida <b>""{Serie}""</b>. Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia)
|
||||
@@ -1495,9 +1664,15 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
Dim Row = DtSeriesDesarmado.NewRow
|
||||
Row("Row") = DtSeriesDesarmado.MAX("Row").ToEntero + 1
|
||||
Row("Serie") = TxtSerieDesarmado.Text.Trim
|
||||
Row("Lote") = TxtLoteDesarmado.Text.Trim
|
||||
Row("FechaCaducidad") = TxtDesarmadoCaducidad.Text.ToDate
|
||||
|
||||
DtSeriesDesarmado.Rows.Add(Row)
|
||||
|
||||
TxtSerieDesarmado.Text = ""
|
||||
TxtLoteDesarmado.Text = ""
|
||||
TxtDesarmadoCaducidad.Text = ""
|
||||
|
||||
|
||||
If DtSeriesDesarmado.Rows.Count >= TxtCantidadDesarmado.Text.ToEntero Then
|
||||
BtnAgregarSerieDesarmado.Enabled = False
|
||||
|
||||
Reference in New Issue
Block a user