This commit is contained in:
2021-03-05 13:15:50 -07:00
6 changed files with 180 additions and 129 deletions

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<AutoRefresh>0</AutoRefresh>
<DataSources>
<DataSource Name="DataSet">
@@ -62,7 +62,7 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox1</rd:DefaultName>
<Top>1.9287cm</Top>
<Top>1.7382cm</Top>
<Left>2.98488cm</Left>
<Height>0.6cm</Height>
<Width>8.50604cm</Width>
@@ -92,7 +92,7 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox1</rd:DefaultName>
<Top>3.34953cm</Top>
<Top>3.15903cm</Top>
<Left>2.98488cm</Left>
<Height>0.6cm</Height>
<Width>14.64437cm</Width>
@@ -121,8 +121,8 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox1</rd:DefaultName>
<Top>1.9287cm</Top>
<Left>13.14954cm</Left>
<Top>1.3572cm</Top>
<Left>12.83204cm</Left>
<Height>0.6cm</Height>
<Width>2.36771cm</Width>
<ZIndex>2</ZIndex>
@@ -144,7 +144,7 @@
<TextRun>
<Value>=Parameters!Importe.Value</Value>
<Style>
<FontSize>8pt</FontSize>
<FontSize>9pt</FontSize>
</Style>
</TextRun>
</TextRuns>
@@ -154,7 +154,7 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox1</rd:DefaultName>
<Top>3.38128cm</Top>
<Top>3.15903cm</Top>
<Left>17.62925cm</Left>
<Height>0.6cm</Height>
<Width>3.12778cm</Width>
@@ -163,6 +163,7 @@
<Border>
<Style>None</Style>
</Border>
<VerticalAlign>Bottom</VerticalAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
@@ -197,7 +198,7 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox1</rd:DefaultName>
<Top>1.96045cm</Top>
<Top>1.4207cm</Top>
<Left>15.85886cm</Left>
<Height>0.6cm</Height>
<Width>4.89817cm</Width>
@@ -228,10 +229,10 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox1</rd:DefaultName>
<Top>10.41495cm</Top>
<Top>10.09745cm</Top>
<Left>2.98488cm</Left>
<Height>0.73229cm</Height>
<Width>17.39115cm</Width>
<Height>1.7cm</Height>
<Width>10.74213cm</Width>
<ZIndex>5</ZIndex>
<Style>
<Border>
@@ -259,7 +260,7 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox1</rd:DefaultName>
<Top>4.56988cm</Top>
<Top>4.15713cm</Top>
<Left>2.98488cm</Left>
<Height>0.6cm</Height>
<Width>16.08307cm</Width>
@@ -276,7 +277,7 @@
</Textbox>
<Rectangle Name="Rectangle1">
<KeepTogether>true</KeepTogether>
<Top>2.22824cm</Top>
<Top>1.72024cm</Top>
<Left>2.98488cm</Left>
<Height>0.99076cm</Height>
<Width>8.50604cm</Width>
@@ -287,13 +288,39 @@
</Border>
</Style>
</Rectangle>
<Rectangle Name="Rectangle2">
<KeepTogether>true</KeepTogether>
<Top>3.41684cm</Top>
<Left>2.98488cm</Left>
<Height>0.99076cm</Height>
<Width>8.50604cm</Width>
<ZIndex>8</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
</Style>
</Rectangle>
<Rectangle Name="Rectangle3">
<KeepTogether>true</KeepTogether>
<Top>4.88413cm</Top>
<Left>2.98488cm</Left>
<Height>0.99076cm</Height>
<Width>8.50604cm</Width>
<ZIndex>9</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
</Style>
</Rectangle>
<Rectangle Name="Rectangle4">
<KeepTogether>true</KeepTogether>
<Top>5.91016cm</Top>
<Left>2.98488cm</Left>
<Height>0.99076cm</Height>
<Width>8.50604cm</Width>
<ZIndex>8</ZIndex>
<ZIndex>10</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -306,7 +333,7 @@
<Left>2.98488cm</Left>
<Height>0.99076cm</Height>
<Width>8.50604cm</Width>
<ZIndex>9</ZIndex>
<ZIndex>11</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -319,7 +346,7 @@
<Left>2.98488cm</Left>
<Height>0.99076cm</Height>
<Width>8.50604cm</Width>
<ZIndex>10</ZIndex>
<ZIndex>12</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -332,7 +359,7 @@
<Left>2.98488cm</Left>
<Height>0.99076cm</Height>
<Width>8.50604cm</Width>
<ZIndex>11</ZIndex>
<ZIndex>13</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -436,10 +463,10 @@
</TablixRowHierarchy>
<DataSetName>DataSet1</DataSetName>
<Top>12.24622cm</Top>
<Left>0.61298cm</Left>
<Left>0.58123cm</Left>
<Height>0.8825cm</Height>
<Width>3.21438cm</Width>
<ZIndex>12</ZIndex>
<ZIndex>14</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -543,10 +570,10 @@
</TablixRowHierarchy>
<DataSetName>DataSet1</DataSetName>
<Top>12.24622cm</Top>
<Left>4.42661cm</Left>
<Left>4.68061cm</Left>
<Height>0.8825cm</Height>
<Width>9.3004cm</Width>
<ZIndex>13</ZIndex>
<ZIndex>15</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -653,10 +680,10 @@
</TablixRowHierarchy>
<DataSetName>DataSet1</DataSetName>
<Top>12.24622cm</Top>
<Left>14.89295cm</Left>
<Left>15.84545cm</Left>
<Height>0.87916cm</Height>
<Width>2.5cm</Width>
<ZIndex>14</ZIndex>
<ZIndex>16</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -763,10 +790,10 @@
</TablixRowHierarchy>
<DataSetName>DataSet1</DataSetName>
<Top>12.24622cm</Top>
<Left>17.6897cm</Left>
<Left>18.3247cm</Left>
<Height>0.87916cm</Height>
<Width>2.84396cm</Width>
<ZIndex>15</ZIndex>
<ZIndex>17</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -801,7 +828,7 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox9</rd:DefaultName>
<Top>0.53975cm</Top>
<Top>1.36525cm</Top>
<Left>3.13986cm</Left>
<Height>0.6cm</Height>
<Width>0.85958cm</Width>
@@ -832,7 +859,7 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox9</rd:DefaultName>
<Top>0.53975cm</Top>
<Top>1.36525cm</Top>
<Left>5.21284cm</Left>
<Height>0.6cm</Height>
<Width>0.88604cm</Width>
@@ -864,7 +891,7 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox9</rd:DefaultName>
<Top>0.53975cm</Top>
<Top>1.36525cm</Top>
<Left>7.41418cm</Left>
<Height>0.6cm</Height>
<Width>0.88604cm</Width>
@@ -897,7 +924,7 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox9</rd:DefaultName>
<Top>0.508cm</Top>
<Top>1.36525cm</Top>
<Left>14.00924cm</Left>
<Height>0.6cm</Height>
<Width>2.5cm</Width>
@@ -930,7 +957,7 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox9</rd:DefaultName>
<Top>0.508cm</Top>
<Top>1.36525cm</Top>
<Left>18.00832cm</Left>
<Height>0.6cm</Height>
<Width>2.36771cm</Width>
@@ -1016,59 +1043,6 @@
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters>
<ReportParametersLayout>
<GridLayoutDefinition>
<NumberOfColumns>2</NumberOfColumns>
<NumberOfRows>5</NumberOfRows>
<CellDefinitions>
<CellDefinition>
<ColumnIndex>0</ColumnIndex>
<RowIndex>0</RowIndex>
<ParameterName>Folio</ParameterName>
</CellDefinition>
<CellDefinition>
<ColumnIndex>1</ColumnIndex>
<RowIndex>0</RowIndex>
<ParameterName>Fecha</ParameterName>
</CellDefinition>
<CellDefinition>
<ColumnIndex>0</ColumnIndex>
<RowIndex>1</RowIndex>
<ParameterName>Beneficiario</ParameterName>
</CellDefinition>
<CellDefinition>
<ColumnIndex>1</ColumnIndex>
<RowIndex>1</RowIndex>
<ParameterName>ImporteLetra</ParameterName>
</CellDefinition>
<CellDefinition>
<ColumnIndex>0</ColumnIndex>
<RowIndex>2</RowIndex>
<ParameterName>Importe</ParameterName>
</CellDefinition>
<CellDefinition>
<ColumnIndex>1</ColumnIndex>
<RowIndex>2</RowIndex>
<ParameterName>Observaciones</ParameterName>
</CellDefinition>
<CellDefinition>
<ColumnIndex>0</ColumnIndex>
<RowIndex>3</RowIndex>
<ParameterName>Tipo</ParameterName>
</CellDefinition>
<CellDefinition>
<ColumnIndex>1</ColumnIndex>
<RowIndex>3</RowIndex>
<ParameterName>TotalCargo</ParameterName>
</CellDefinition>
<CellDefinition>
<ColumnIndex>0</ColumnIndex>
<RowIndex>4</RowIndex>
<ParameterName>TotalAbono</ParameterName>
</CellDefinition>
</CellDefinitions>
</GridLayoutDefinition>
</ReportParametersLayout>
<Language>es-MX</Language>
<rd:ReportUnitType>Cm</rd:ReportUnitType>
<rd:ReportID>ccd758f2-6f27-4a1e-af76-588dcd11f8b2</rd:ReportID>

View File

@@ -95,10 +95,10 @@
<Width>2.17093cm</Width>
</TablixColumn>
<TablixColumn>
<Width>1.95cm</Width>
<Width>2.0251cm</Width>
</TablixColumn>
<TablixColumn>
<Width>1.84392cm</Width>
<Width>1.76882cm</Width>
</TablixColumn>
<TablixColumn>
<Width>1.88335cm</Width>
@@ -308,7 +308,10 @@
</Paragraphs>
<rd:DefaultName>Textbox19</rd:DefaultName>
<Style>
<Border />
<Border>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<BackgroundColor>Silver</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>

View File

@@ -1073,13 +1073,13 @@
<div class="modal-header ">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">
<asp:Literal ID="Literal2" runat="server">Ajuste Inventario Fisico</asp:Literal></h4>
<asp:Literal ID="Literal2" runat="server">Ajuste Inventario Físico</asp:Literal></h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-md-6">
<div style="text-align: center">
<label for="<%= DdlAlmacenInventarioFisico.ClientID.ToString()%>">Almacen:</label>
<label for="<%= DdlAlmacenInventarioFisico.ClientID.ToString()%>">Almacén:</label>
<asp:DropDownList ID="DdlAlmacenInventarioFisico" runat="server" DataTextField="Almacen" DataValueField="CveAlmacen" Width="60%" CssClass="form-control input-sm select2me" AppendDataBoundItems="true"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVAlmacenInvFisico" runat="server" InitialValue="-1" ControlToValidate="DdlAlmacenInventarioFisico" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Almacen''</b> es necesario, por favor ingréselo." ValidationGroup="InvFisico"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="CERFVAlmacenInvFisico" runat="server" HighlightCssClass="vco" TargetControlID="RFVAlmacenInvFisico" Width="350px"></ajax:ValidatorCalloutExtender>
@@ -1183,14 +1183,14 @@
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
</td>
<td runat="server" id="TrSerieEntrada" visible="false">
<asp:TextBox ID="TxtSerieEntrada" runat="server" Width="50px"></asp:TextBox>
<td runat="server" id="TrSerieEntrada" visible="false" >
<asp:TextBox ID="TxtSerieEntrada" runat="server" Width="50px" CssClass="form-control input-sm"></asp:TextBox>
</td>
<td runat="server" id="TrLoteEntrada" visible="false">
<asp:TextBox ID="TxtLoteEntrada" runat="server" Width="50px"></asp:TextBox>
<asp:TextBox ID="TxtLoteEntrada" runat="server" Width="70px" CssClass="form-control input-sm"></asp:TextBox>
</td>
<td runat="server" id="TrCaducidadEntrada" visible="false">
<asp:TextBox ID="TxtCaducidadEntrada" runat="server" Width="80px"></asp:TextBox>
<asp:TextBox ID="TxtCaducidadEntrada" runat="server" Width="80px" CssClass="form-control input-sm"></asp:TextBox>
<asp:LinkButton ID="ImgFechaCadEntrada" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
<asp:RequiredFieldValidator ID="RFVFechaCadEntrada" runat="server" ControlToValidate="TxtCaducidadEntrada" 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="AddPSInvFisico"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCFechaCadEntrada" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaCadEntrada" Width="350px"></ajax:ValidatorCalloutExtender>
@@ -1265,7 +1265,7 @@
<th style="width: 10%" runat="server" id="ThSeccionSalida" visible="false">Sección almacén</th>
<th style="width: 10%" runat="server" id="ThSerieSalida" visible="false">Serie</th>
<th style="width: 10%" runat="server" id="ThLoteSalida" visible="false">Lote</th>
<th style="width: 10%" runat="server" id="ThCaducidadSalida" visible="false">Caducidad</th>
<th style="width: 25%" runat="server" id="ThCaducidadSalida" visible="false">Caducidad</th>
<th style="width: 73px;"></th>
</tr>
<tr align="center">
@@ -1284,14 +1284,14 @@
</asp:DropDownList>
</td>
<td runat="server" id="TrSerieSalida" visible="false">
<asp:TextBox ID="TxtSerieSalida" runat="server" Width="50px"></asp:TextBox>
<asp:TextBox ID="TxtSerieSalida" runat="server" Width="50px" CssClass="form-control input-sm"></asp:TextBox>
</td>
<td runat="server" id="TrLoteSalida" visible="false">
<asp:TextBox ID="TxtLoteSalida" runat="server" Width="50px"></asp:TextBox>
<asp:TextBox ID="TxtLoteSalida" runat="server" Width="70px" CssClass="form-control input-sm"></asp:TextBox>
</td>
<td runat="server" id="TrCaducidadSalida" visible="false">
<asp:TextBox ID="TxtCaducidadSalida" runat="server" Width="50px"></asp:TextBox>
<asp:LinkButton ID="ImgFechaCadSalida" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
<asp:TextBox ID="TxtCaducidadSalida" runat="server" Width="75px" CssClass="form-control input-sm"></asp:TextBox>
<asp:LinkButton ID="ImgFechaCadSalida" class="btn default input-sm" Text="<i class='fa fa-calendar'></i>" runat="server" ></asp:LinkButton>
<asp:RequiredFieldValidator ID="RFVFechaCadSalida" runat="server" ControlToValidate="TxtCaducidadSalida" 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="AddPSInvFisicoSalida"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCFechaCadSalida" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaCadSalida" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:MaskedEditExtender ID="MEEFechaCadSalida" runat="server" TargetControlID="TxtCaducidadSalida" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>

View File

@@ -3819,16 +3819,21 @@ Partial Class Inventarios_EntradasSalidas
#Region "SALIDAS"
Private Sub BtnAgregarSalida_Click(sender As Object, e As EventArgs) Handles BtnAgregarSalida.Click
Dim ObjProductosServicios As New ClsProductosServicios()
Dim ObjInventario As New ClsInventarios
Dim CveUM As Integer
Dim Mensaje As String = ""
Dim FechaCaducidad As Date
Dim lote As String
If ObjProductosServicios.GetPS(DdlPSSalida.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa) Then
If ObjProductosServicios.DtResultados.Rows.Count > 0 Then
CveUM = ObjProductosServicios.CveUnidadMedida.ToString.ToEntero
End If
End If
ObjProductosServicios.Dispose()
Dim ObjInventario As New ClsInventarios
If ObjInventario.GetExistenciasPS(DdlPSSalida.SelectedValue.ToEntero, CveUM, UsuarioActual.CveEmpresa, DdlAlmacenInventarioFisico.SelectedValue.ToEntero, PendientePorSurtir:=1) >= TxtCantidadSalidaInv.Text.ToDouble Then
FechaCaducidad = If(ObjProductosServicios.AplicaCaducidad, TxtCaducidadSalida.Text.ToDate, MinFecha)
lote = If(ObjProductosServicios.AplicaLote, TxtLoteSalida.Text.ToString, "-1")
If ObjInventario.GetExistenciasPS(DdlPSSalida.SelectedValue.ToEntero, CveUM, UsuarioActual.CveEmpresa, DdlAlmacenInventarioFisico.SelectedValue.ToEntero, PendientePorSurtir:=1, Lote:=lote, FechaCaducidad:=FechaCaducidad) >= TxtCantidadSalidaInv.Text.ToDouble Then
If Not DdlPSSalida.SelectedValue.ToEntero > 0 Then
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
Alert("Es necesario especificar el producto.", TipoMensaje.MsgAdvertencia)
@@ -3837,11 +3842,14 @@ Partial Class Inventarios_EntradasSalidas
AddPSSalida(DdlPSSalida.SelectedValue.ToEntero, TxtCantidadSalidaInv.Text.ToDouble)
Else
Mensaje = String.Format("No hay existencias suficientes del producto: {0}", DdlPSSalida.SelectedValue.ToEntero)
Mensaje = String.Format("No hay existencias suficientes del producto: {0}", ObjProductosServicios.PS)
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
Alert(Mensaje, TipoMensaje.MsgError)
End If
ObjInventario.Dispose()
ObjProductosServicios.Dispose()
End Sub
Protected Sub AddPSSalida(CvePS As Integer, Cantidad As Double)
@@ -3898,7 +3906,7 @@ Partial Class Inventarios_EntradasSalidas
GvSalidas.Columns(3).Visible = DtTemp.MAX("Serie") <> ""
GvSalidas.Columns(4).Visible = DtTemp.MAX("Lote") <> ""
GvSalidas.Columns(5).Visible = DtTemp.MAX("FechaCaducidad").ToDate > MinFecha
GvSalidas.Columns(5).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Elaboración")
GvSalidas.Columns(5).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
End If
End Sub
@@ -4030,7 +4038,7 @@ Partial Class Inventarios_EntradasSalidas
GvSalidasCambioVigencia.Columns(3).Visible = DtTemp.MAX("Serie") <> ""
GvSalidasCambioVigencia.Columns(4).Visible = DtTemp.MAX("Lote") <> ""
GvSalidasCambioVigencia.Columns(5).Visible = DtTemp.MAX("FechaCaducidad").ToDate > MinFecha
GvSalidasCambioVigencia.Columns(5).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Elaboración")
GvSalidasCambioVigencia.Columns(5).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
End If
UpGvCambioSalidas.Update()
End Sub
@@ -4423,7 +4431,7 @@ Partial Class Inventarios_EntradasSalidas
'activa caducidad
ThCaducidadEntrada.Visible = AplicaCaducidad
ThCaducidadEntrada.InnerText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Elaboración")
ThCaducidadEntrada.InnerText = UsuarioActual.Empresa.Funcionalidad(147)
TrCaducidadEntrada.Visible = AplicaCaducidad
Else
@@ -4457,7 +4465,7 @@ Partial Class Inventarios_EntradasSalidas
'activa caducidad
ThCaducidadSalida.Visible = AplicaCaducidad
ThCaducidadSalida.InnerText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Elaboración")
ThCaducidadSalida.InnerText = UsuarioActual.Empresa.Funcionalidad(147)
TrCaducidadSalida.Visible = AplicaCaducidad
Else

View File

@@ -311,7 +311,9 @@
<%--<asp:BoundField HeaderText="Direccion Envio" HeaderStyle-HorizontalAlign="Left" DataField="DireccionEnvio" ItemStyle-Width="20%" />--%>
<asp:BoundField HeaderText="Observaciones" DataField="Observaciones" ItemStyle-Width="20%" />
<asp:BoundField HeaderText="Precio" HeaderStyle-HorizontalAlign="Right" DataFormatString="{0:c}" ItemStyle-HorizontalAlign="Right" DataField="Precio" Visible="false" ItemStyle-Width="5%" />
<asp:BoundField HeaderText="Serie" DataField="Serie" Visible="false" ItemStyle-Width="5%" />
<asp:BoundField HeaderText="Serie" DataField="Serie" Visible="false" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center"/>
<asp:BoundField HeaderText="Lote" DataField="Lote" Visible="false" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center"/>
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" Visible="false" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}"/>
<asp:TemplateField HeaderText="Eliminar" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="5%">
<ItemTemplate>
<asp:LinkButton ID="imgD" runat="server" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="Si" />
@@ -433,7 +435,7 @@
</div>
</div>
<div id="ModalPS" class="modal ADS fade" role="dialog">
<div id="ModalPS" class="modal ADS fade" role="dialog" data-backdrop="static" >
<div class="modal-dialog" style="width: 450px;">
<asp:UpdatePanel runat="server" class="modal-content" ID="UpPS" UpdateMode="Conditional">
<ContentTemplate>
@@ -486,6 +488,29 @@
</div>
</div>
<div class="row marginRowLeft">
<div class="col-md-4 form-group form-md-line-input input-iconright" id="divLote" runat="server" visible="false">
<asp:TextBox ID="TxtLote" runat="server" CssClass="form-control"></asp:TextBox>
<label for="<%= TxtLote.ClientID.ToString()%>">Lote:</label>
</div>
<div class="col-md-3 form-group form-md-line-input input-iconright" id="divCaducidad" runat="server" visible="false">
<asp:TextBox ID="TxtCaducidad" runat="server" CssClass="form-control"></asp:TextBox>
<label for="<%= TxtCaducidad.ClientID.ToString()%>">Fecha Elaboracion:</label>
</div>
<div class="col-md-1 form-group form-md-line-input input-iconright" id="divCaducidad2" runat="server" visible="false">
<asp:LinkButton ID="ImgFechaCad" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
<asp:RequiredFieldValidator ID="RFVFechaCad" runat="server" ControlToValidate="TxtCaducidad" 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="AddPSInvFisico"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCFechaCad" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaCad" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:MaskedEditExtender ID="MEEFechaCad" runat="server" TargetControlID="TxtCaducidad" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEFechaCad" TargetControlID="TxtCaducidad" PopupButtonID="ImgFechaCad" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:CompareValidator ID="CVFechaCad" runat="server" ControlToValidate="TxtCaducidad" 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="AddPSInvFisico"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCEFechaCad" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaCad" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
</div>
<div class="modal-footer">

View File

@@ -95,7 +95,9 @@ Partial Class Inventarios_TrasladoSolicitud
TempDT.Columns.Add("CveContratoDetalle", Type.GetType("System.Int32"))
'TempDT.Columns.Add("CveContratoDetalle", Type.GetType("System.Int32"))
'TempDT.Columns.Add("CveDireccionEnvio", Type.GetType("System.Int32"))
TempDT.Columns.Add("Serie", Type.GetType("System.String"))
TempDT.Columns.Add("Serie", Type.GetType("System.String"))
TempDT.Columns.Add("Lote", Type.GetType("System.String"))
TempDT.Columns.Add("FechaCaducidad", Type.GetType("System.DateTime"))
TempDT.Columns.Add()
End Sub
@@ -322,6 +324,7 @@ Partial Class Inventarios_TrasladoSolicitud
RegistraScript(String.Format("$('#{0}').modal();", "ModalPS"))
End Sub
Private Sub BtnAgregarPS_Click(sender As Object, e As EventArgs) Handles BtnAgregarPS.Click
Dim Existencia As Boolean
If Not DdlProductoServicio.SelectedValue.ToEntero > 0 Then
Alert("Tiene que seleccionar un producto.", TipoMensaje.MsgAdvertencia)
Exit Sub
@@ -329,35 +332,63 @@ Partial Class Inventarios_TrasladoSolicitud
If Not AddPSTemporal() Then
Exit Sub
End If
TxtCantidad.Text = ""
DdlProductoServicio.SelectedText = ""
DdlProductoServicio.SelectedValue = "-1"
DdlUM.SelectedIndex = 0
GvDatos.DataSource = TempDT
GvDatos.DataBind()
If ChkSeguirAgregando.Checked Then
TxtCantidad.Focus()
Else
RegistraScript("$('#ModalPS').hide();", "EscondeAgregar")
End If
UpPS.Update()
UpDatos.Update()
End If
'If ObjInventario.GetExistenciasPS(DdlProductoServicio.SelectedValue.ToEntero, DdlUM.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, PendientePorSurtir:=1, Lote:=TxtLote.Text.ToString, FechaCaducidad:=TxtCaducidad.Text.ToString) >= TxtCantidad.Text.ToDouble Then
TxtCantidad.Text = ""
DdlProductoServicio.SelectedText = ""
DdlProductoServicio.SelectedValue = "-1"
DdlUM.SelectedIndex = 0
TxtCaducidad.Text = ""
TxtSerie.Text = ""
TxtLote.Text = ""
GvDatos.DataSource = TempDT
GvDatos.DataBind()
If ChkSeguirAgregando.Checked Then
TxtCantidad.Focus()
Else
RegistraScript("$('#ModalPS').hide();", "EscondeAgregar")
End If
UpPS.Update()
UpDatos.Update()
End Sub
Private Function AddPSTemporal() As Boolean
Dim Row As DataRow = TempDT.NewRow()
Dim Lote As String
Dim FechaCaducidad As Date
Row("Cantidad") = TxtCantidad.Text.Trim.ToDouble
Row("CvePS") = DdlProductoServicio.SelectedValue.ToEntero
Row("CodigoPS") = DdlProductoServicio.SelectedText
Row("Precio") = 0
Row("CveUM") = DdlUM.SelectedValue.ToEntero
Row("UnidadMedida") = DdlUM.SelectedItem.Text
Row("Observaciones") = ""
Row("Observaciones") = ""
If divLote.Visible Then
Row("Lote") = TxtLote.Text
GvDatos.Columns(6).Visible = True
Lote = TxtLote.Text.ToString
Else
Row("Lote") = "-1"
Lote = "-1"
End If
If divCaducidad.Visible Then
Row("FechaCaducidad") = TxtCaducidad.Text
GvDatos.Columns(7).Visible = True
FechaCaducidad = TxtCaducidad.Text.ToDate
Else
Row("FechaCaducidad") = MinFecha
FechaCaducidad = MinFecha
End If
If Div4.Visible Then
Row("Serie") = TxtSerie.Text
@@ -366,8 +397,10 @@ Partial Class Inventarios_TrasladoSolicitud
Row("Serie") = "-1"
End If
Dim ObjInventarios As New ClsInventarios
Dim Existencia As Double = ObjInventarios.GetExistenciasPS(DdlProductoServicio.SelectedValue.ToEntero, DdlUM.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"))
Dim Existencia As Double = ObjInventarios.GetExistenciasPS(DdlProductoServicio.SelectedValue.ToEntero, DdlUM.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), Lote:=Lote, FechaCaducidad:=FechaCaducidad)
ObjInventarios.Dispose()
If Existencia - TxtCantidad.Text.Trim.ToDouble - TempDT.SUM("Cantidad", $"CvePS = {DdlProductoServicio.SelectedValue.ToEntero} AND CveUM = {DdlUM.SelectedValue.ToEntero}") < 0 Then
@@ -988,6 +1021,14 @@ Partial Class Inventarios_TrasladoSolicitud
DdlUM.SelectedValueExist(drPS("CveUnidadMedida").ToString)
Dim AplicaSerie As Boolean = drPS("AplicaSerie").ToString = "True"
Div4.Visible = AplicaSerie
Dim AplicaLote As Boolean = drPS("AplicaLote").ToString = "True"
divLote.Visible = AplicaLote
Dim AplicaCaducidad As Boolean = drPS("AplicaCaducidad").ToString = "True"
divCaducidad.Visible = AplicaCaducidad
divCaducidad2.Visible = AplicaCaducidad
End If
UpPS.Update()
UpDatos.Update()