merge manual
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="EntradasSalidas.aspx.vb" Inherits="Inventarios_EntradasSalidas" EnableEventValidation="false" %>
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="EntradasSalidas.aspx.vb" Inherits="Inventarios_EntradasSalidas" EnableEventValidation="false" %>
|
||||
|
||||
|
||||
<%@ Register Assembly="eWorld.UI" Namespace="eWorld.UI" TagPrefix="ew" %>
|
||||
@@ -86,6 +86,10 @@
|
||||
<asp:LinkButton runat="server" ID="LnkCambioInventarioFisico" CssClass="" data-toggle="tooltip" data-placement="left" OnClick="LnkCambioInventarioFisico_Click"
|
||||
Text="<i class='fa fa-truck'></i> Inventario Fisico"></asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="LnkCambioVigencia" Visible="false" CssClass="" data-toggle="tooltip" data-placement="left" OnClick="LnkCambioVigencia_Click"
|
||||
Text="<i class='fa fa-truck'></i> Cambiar Vigencias"></asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="LnkAgregarProducto" CssClass="" data-toggle="tooltip" data-placement="left" Text="<i class='fa fa-plus'></i> Agregar Producto"></asp:LinkButton>
|
||||
</li>
|
||||
@@ -151,6 +155,7 @@
|
||||
<div class="caption uppercase" style="position: relative;">
|
||||
<i class="fa fa-info-circle"></i>Información del movimiento
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style='display:none;'")%>>
|
||||
@@ -198,7 +203,7 @@
|
||||
<div class="col-md-2">
|
||||
<asp:Label ID="LblVendedor" runat="server" Text=""></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" id="DivDepartamentoEntrega" runat="server" visible="False">
|
||||
@@ -289,6 +294,7 @@
|
||||
<label class="col-md-1 truncate" style="width: 110px">
|
||||
Observaciones:
|
||||
|
||||
|
||||
</label>
|
||||
<div class="col-md-5">
|
||||
<asp:TextBox ID="TxtObservaciones" TextMode="MultiLine" Rows="2" CssClass="form-control input-sm" runat="server" MaxLength="232"></asp:TextBox>
|
||||
@@ -346,6 +352,7 @@
|
||||
<div class="caption uppercase" style="position: relative;">
|
||||
<i class="fa fa-info-circle"></i>Agregar Producto
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
@@ -421,6 +428,7 @@
|
||||
<div class="caption uppercase" style="position: relative;">
|
||||
<i class="fa fa-info-circle"></i>Información de registro
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
@@ -428,6 +436,7 @@
|
||||
<label class="col-md-3 truncate">
|
||||
Usuario:
|
||||
|
||||
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<asp:Label ID="LblUsuarioRegistro" runat="server"></asp:Label>
|
||||
@@ -438,6 +447,7 @@
|
||||
<label class="col-md-3 truncate">
|
||||
Fecha:
|
||||
|
||||
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<asp:Label ID="LblFechaRegistro" runat="server"></asp:Label>
|
||||
@@ -447,6 +457,7 @@
|
||||
<label class="col-md-3 truncate">
|
||||
Referencia:
|
||||
|
||||
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<asp:HyperLink ID="HplCompra" Target="_blank" runat="server" Visible="False" CssClass="Texto">Ver Compra</asp:HyperLink>
|
||||
@@ -460,6 +471,7 @@
|
||||
<label class="col-md-3 truncate">
|
||||
Consignación:
|
||||
|
||||
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<asp:HyperLink ID="HLConsignacion" Target="_blank" NavigateUrl="#" Text="" runat="server" />
|
||||
@@ -470,6 +482,7 @@
|
||||
<label class="col-md-3 truncate">
|
||||
Tipo Cambio:
|
||||
|
||||
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<asp:Label Text="" ID="LbTipoCambio" runat="server" />
|
||||
@@ -479,6 +492,7 @@
|
||||
<label class="col-md-3 truncate">
|
||||
Mto. Rel.:
|
||||
|
||||
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<asp:HyperLink ID="lnkMtoRelaioando" CssClass="Texto" runat="server" Target="_blank">ver</asp:HyperLink>
|
||||
@@ -497,6 +511,7 @@
|
||||
<div class="caption uppercase" style="position: relative;">
|
||||
<i class="fa fa-info-circle"></i>Tipo de Cambio
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
@@ -558,8 +573,8 @@
|
||||
<td runat="server" visible="false" id="TdSeccionPSAdd">
|
||||
<asp:Panel ID="Panel3" runat="server" DefaultButton="BtnSeccionPSAdd">
|
||||
<asp:DropDownList ID="DdlSeccionPSAdd" DataTextField="SeccionAlmacen" AppendDataBoundItems="true" DataValueField="CveSeccionAlmacen" Class="form-control input-sm select2me" Style="width: 95% !important" runat="server" CausesValidation="true">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Button Text="" ID="BtnSeccionPSAdd" Style="display: none" runat="server" />
|
||||
</asp:Panel>
|
||||
</td>
|
||||
@@ -777,10 +792,8 @@
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
<%-- EMPIEZA: BITACORA --%>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
@@ -890,6 +903,7 @@
|
||||
<div class="col-md-5" style="text-align: right;">
|
||||
Cantidad
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<asp:TextBox ClientIDMode="Static" ID="TxtCantidadEspecial" Text="" runat="server"></asp:TextBox>
|
||||
@@ -1087,7 +1101,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<asp:RequiredFieldValidator ID="RFVTxtFechaInvFisico" runat="server" ControlToValidate="TxtFechaInvFisico" 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="InvFisico"></asp:RequiredFieldValidator>
|
||||
@@ -1313,7 +1327,158 @@
|
||||
<div class="modal-footer">
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="text-align: center;">
|
||||
<asp:Button ID="BtnAplicarCambioInvFisico" runat="server" CssClass="btn btn-primary" Text="Aplicar" ValidationGroup="InvFisico"/>
|
||||
<asp:Button ID="BtnAplicarCambioInvFisico" runat="server" CssClass="btn btn-primary" Text="Aplicar" ValidationGroup="InvFisico" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
<div id="DivModalCambiarVigencias" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog modal-lg" style="width: 50%">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalCambiarVigencias" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="Literal4" runat="server">Cambiar Vigencias</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<label class="col-md-2 truncate" style="width: 120px">Almacen:</label>
|
||||
<div class="col-md-4">
|
||||
<asp:DropDownList ID="DdlAlmacenCambioVigencias" runat="server" DataTextField="Almacen" DataValueField="CveAlmacen" Width="60%" CssClass="form-control input-sm select2me" AppendDataBoundItems="true"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlAlmacenCambioVigencia" runat="server" InitialValue="-1" ControlToValidate="DdlAlmacenCambioVigencias" 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="VGCambioVigencia"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEDdlAlmacenCambioVigencia" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlAlmacenCambioVigencia" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<label class="col-md-2 truncate" style="width: 120px">Fecha:</label>
|
||||
<div class="col-md-4">
|
||||
<div style="display: inline-block; vertical-align: text-bottom;">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px; text-align: center">
|
||||
<asp:TextBox ID="TxtFechaCambio" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 118px" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFechaCambio" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaCambio" runat="server" ControlToValidate="TxtFechaCambio" 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="VGCambioVigencia"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaCambio" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="TxtFechaCambio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaCambio" PopupButtonID="ImgFechaCambio" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="CVFechaCambio" runat="server" ControlToValidate="TxtFechaCambio" 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="VGCambioVigencia"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaCambio" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<label class="col-md-2 truncate" style="width: 120px">Descripción:</label>
|
||||
<div class="col-md-6">
|
||||
<asp:TextBox ID="TxtObsCambioVigencia" runat="server" Width="100%" CssClass="form-control input-sm" TextMode="MultiLine"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<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">Traspaso de Vigencia</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:UpdatePanel runat="server" ID="UpCambioSalida" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table border="0" class="Widthall grides">
|
||||
<tbody>
|
||||
<tr class="Titulos">
|
||||
<th style="width: 63px">Cant</th>
|
||||
<th style="width: 200px">Producto</th>
|
||||
<th style="width: 10%" runat="server" id="Th5" visible="false">Sección almacén</th>
|
||||
<th style="width: 10%" runat="server" id="Th6" visible="false">Serie</th>
|
||||
<th style="width: 10%" runat="server" id="Th7" visible="false">Lote</th>
|
||||
<th style="width: 10%" runat="server" id="Th8" visible="false">Caducidad</th>
|
||||
<th style="width: 73px;"></th>
|
||||
</tr>
|
||||
<tr align="center">
|
||||
<td>
|
||||
<asp:TextBox ID="TxtCantCambio" CssClass="form-control input-sm" Width="55px" MaxLength="15" runat="server" ValidationGroup="AddPSCambioSalida"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender3" runat="server" TargetControlID="TxtCantCambio" FilterType="Custom, Numbers" ValidChars="." />
|
||||
</td>
|
||||
<td>
|
||||
<div class="psagregar">
|
||||
<ADS:Dropdownlost runat="server" ID="DdlPSCambioSalida" CssStyle="width:100%" CssClassDdl="select2me" DataTextField="PSCodigo" DataValueField="CvePS" />
|
||||
</div>
|
||||
</td>
|
||||
<td runat="server" id="Td5" visible="false">
|
||||
<asp:DropDownList ID="DdlSeccionCambio" DataTextField="Seccion" AppendDataBoundItems="true" DataValueField="CveSeccion" Class="form-control input-sm select2me" Style="width: 95% !important" runat="server" CausesValidation="true">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
<td runat="server" id="Td6" visible="false">
|
||||
<asp:TextBox ID="TxtSerieCambio" runat="server" Width="50px"></asp:TextBox>
|
||||
</td>
|
||||
<td runat="server" id="Td7" visible="false">
|
||||
<asp:TextBox ID="TxtLoteCambio" runat="server" Width="50px"></asp:TextBox>
|
||||
</td>
|
||||
<td runat="server" id="Td8" visible="false">
|
||||
<asp:TextBox ID="TxtCaducidadCambio" runat="server" Width="50px"></asp:TextBox>
|
||||
</td>
|
||||
<td align="center">
|
||||
<asp:LinkButton ID="LnkAddSalidaCambio" runat="server" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-plus'></i>" ValidationGroup="AddPSCambioSalida" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:UpdatePanel runat="server" ID="UpGvCambioSalidas" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvSalidasCambioVigencia" runat="server" GridLines="none" CssClass="tabla_correcto grides Widthall mysmallbtn" AutoGenerateColumns="False" ShowHeaderWhenEmpty="False" OnRowDataBound="GvSalidasCambioVigencia_RowDataBound">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Cantidad" ReadOnly="true" DataField="Cantidad" ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="PS de Salida" ReadOnly="true" DataField="CodigoPS" ItemStyle-Width="300px" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Sección Alm" ReadOnly="true" DataField="SeccionAlmacen" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Serie" ReadOnly="true" DataField="Serie" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Lote" ReadOnly="true" DataField="Lote" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Fecha Caducidad" ReadOnly="true" DataField="FechaCaducidad" DataFormatString="{0:d}" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="PS de Entrada (PS de Vigencia)" ReadOnly="true" DataField="CodigoPSVigencia" ItemStyle-Width="300px" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkRemoveInvFisicoSalida" runat="server" AlternateText="Eliminar" OnClick="DeleteRowCambioVigencia" CommandArgument='<%# Eval("No")%>' CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea eliminar el concepto?" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="text-align: center;">
|
||||
<asp:Button ID="BtnGuardarCambiosVigencia" runat="server" CssClass="btn btn-primary" Text="Aplicar" ValidationGroup="VGCambioVigencia" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1409,6 +1574,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LbDescargarExcelConceptos" />
|
||||
@@ -1523,7 +1689,6 @@
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="divDescripcion" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpDescripcion" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
@@ -1551,8 +1716,6 @@
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript">
|
||||
@@ -1714,4 +1877,3 @@
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
@@ -43,6 +43,23 @@ Partial Class Inventarios_EntradasSalidas
|
||||
ViewState("DtMovimientosSalidaInvFisico") = value
|
||||
End Set
|
||||
End Property
|
||||
Public Property DtMovimientosEntradaCambioVigencias() As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtMovimientosEntradaCambioVigencias"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtMovimientosEntradaCambioVigencias") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property DtMovimientosCambioVigencias() As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtMovimientosCambioVigencias"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtMovimientosCambioVigencias") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property CveMovimiento() As Integer
|
||||
Get
|
||||
@@ -365,11 +382,13 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
End If
|
||||
|
||||
'HABILITA EL CAMBIO DE VIGENCIAS
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
LnkCambioVigencia.Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
#Region " PERMISOS PAGINAS "
|
||||
@@ -469,9 +488,16 @@ Partial Class Inventarios_EntradasSalidas
|
||||
CargaGVM(dt)
|
||||
|
||||
DtMovimientos = dt.Clone
|
||||
|
||||
DtMovimientosEntradaInvFisico = dt.Clone
|
||||
DtMovimientosSalidaInvFisico = dt.Clone
|
||||
|
||||
DtMovimientosCambioVigencias = dt.Clone
|
||||
DtMovimientosCambioVigencias.Columns.Add("CvePSVigencia", Type.GetType("System.Int32"))
|
||||
DtMovimientosCambioVigencias.Columns.Add("CodigoPSVigencia", Type.GetType("System.String"))
|
||||
DtMovimientosCambioVigencias.Columns.Add("CveUMVigencia", Type.GetType("System.Int32"))
|
||||
|
||||
|
||||
End Sub
|
||||
Private Sub CargaCombos()
|
||||
'Llenar el dropdownlist de Secciones
|
||||
@@ -514,15 +540,19 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
End If
|
||||
DdlAlmacenInventarioFisico.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen NOT IN (9,11)") 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
||||
DdlAlmacenCambioVigencias.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen NOT IN (9,11)")
|
||||
|
||||
DdlAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlAlmacenInventarioFisico.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlAlmacenCambioVigencias.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
DdlAlmacen.SelectedValue = "-1"
|
||||
DdlAlmacenInventarioFisico.SelectedValue = "-1"
|
||||
DdlAlmacenCambioVigencias.SelectedValue = "-1"
|
||||
|
||||
DdlAlmacen.DataBind()
|
||||
DdlAlmacenInventarioFisico.DataBind()
|
||||
DdlAlmacenCambioVigencias.DataBind()
|
||||
|
||||
If IsNothing(Request("CveMovimiento")) Then
|
||||
DdlAlmacen.SelectedValueExist(UsuarioActual.CveAlmacen)
|
||||
@@ -545,6 +575,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
DdlProducto2.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
||||
DdlPS.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
||||
DdlPSSalida.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
||||
DdlPSCambioSalida.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
||||
|
||||
If UsuarioActual.CveEmpresa = 66 Then
|
||||
DdlProducto2.ddlWS.Attributes.Add("data-pagina", "Inventarios")
|
||||
@@ -554,14 +585,17 @@ Partial Class Inventarios_EntradasSalidas
|
||||
DdlProducto2.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoPS = 2")
|
||||
DdlPS.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoPS = 2")
|
||||
DdlPSSalida.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoPS = 2")
|
||||
DdlPSCambioSalida.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoPS = 2")
|
||||
|
||||
DdlProducto2.DataBind()
|
||||
DdlPS.DataBind()
|
||||
DdlPSSalida.DataBind()
|
||||
DdlPSCambioSalida.DataBind()
|
||||
|
||||
DdlProducto2.ddl.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlPS.ddl.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlPSSalida.ddl.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlPSCambioSalida.ddl.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -2651,6 +2685,25 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
|
||||
#Region " CONTABILIZAR "
|
||||
|
||||
Public Function ContabilizaMovimientoAlmacen(ByRef ObjConta As ClsContabilidad, Fecha As Date, Concepto As String, Modulo As String, CveMovimientoSalida As Integer, CveMovimientoEntrada As Integer, Importe As Decimal, CveUsuario As Integer, CveEmpresa As Integer, Contabilizable As Boolean) As Integer
|
||||
Dim Retorno As Integer = -1
|
||||
Dim ErrorMovInv As Boolean = False
|
||||
|
||||
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas(Modulo, 53, 0, 0, 1, Fecha, Concepto, CveUsuario, CveEmpresa)
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Importe, "", 68, Concepto, Fecha, -1, -1, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=Importe, Contabilizable:=Contabilizable) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Importe, "", 68, Concepto, Fecha, -1, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=Importe, Contabilizable:=Contabilizable) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
If Not ErrorMovInv Then Retorno = CvePrePoliza
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Protected Sub BtnContabilizar_Click(sender As Object, e As EventArgs) Handles BtnContabilizar.Click
|
||||
Dim ObjContaAC As ClsContPAQi = Nothing
|
||||
Dim ObjInventario As New ClsInventarios
|
||||
@@ -3607,6 +3660,10 @@ Partial Class Inventarios_EntradasSalidas
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivModalCambioFisico"))
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkCambioVigencia_Click(sender As Object, e As EventArgs)
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivModalCambiarVigencias"))
|
||||
End Sub
|
||||
|
||||
#Region "ENTRADAS"
|
||||
Private Sub BtnAgregarEntrada_Click(sender As Object, e As EventArgs) Handles BtnAgregarEntrada.Click
|
||||
If Not DdlPS.SelectedValue.ToEntero > 0 Then
|
||||
@@ -3807,6 +3864,127 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
CargaGvSalidas(DtMovimientosSalidaInvFisico)
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "CAMBIO VIGENCIA"
|
||||
Private Sub LnkAddSalidaCambio_Click(sender As Object, e As EventArgs) Handles LnkAddSalidaCambio.Click
|
||||
If Not DdlPSCambioSalida.SelectedValue.ToEntero > 0 Then
|
||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||
Alert("Es necesario especificar el producto.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
AddPSCambioSalida(DdlPSCambioSalida.SelectedValue.ToEntero, TxtCantCambio.Text.ToDouble)
|
||||
End Sub
|
||||
|
||||
Protected Sub AddPSCambioSalida(CvePS As Integer, Cantidad As Double)
|
||||
If DdlAlmacenCambioVigencias.SelectedValue.ToEntero <= 0 Then Alert("Seleccione un almacen", TipoMensaje.MsgAdvertencia) : RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") : DdlPSCambioSalida.SelectedText = "" : Exit Sub
|
||||
|
||||
Dim Valido As Boolean = True
|
||||
|
||||
If Valido Then
|
||||
Dim CveClasificacion As Integer
|
||||
Dim CveUM As Double
|
||||
Dim CodigoPS As String = ""
|
||||
Dim PS As String = ""
|
||||
|
||||
Dim CveSeccionAlmacen As Integer = DdlSeccionAlmacenSalida.SelectedValue.ToEntero
|
||||
Dim Serie As String = If(TxtSerieSalida.Text = "", "", TxtSerieSalida.Text)
|
||||
Dim Lote As String = If(TxtLoteSalida.Text = "", "", TxtLoteSalida.Text)
|
||||
Dim Caducidad As String = If(TxtCaducidadSalida.Text = "", MinFecha.ToShortDateString, TxtCaducidadSalida.Text)
|
||||
|
||||
Dim dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS).FiltroPrimero("", "PS")
|
||||
If dr IsNot Nothing Then
|
||||
CveClasificacion = dr("CveClasificacion").ToString.ToEntero
|
||||
CveUM = dr("CveUM").ToString.ToEntero
|
||||
CodigoPS = dr("PSCodigo").ToString.ToString
|
||||
PS = dr("PS").ToString.ToString
|
||||
End If
|
||||
|
||||
Dim registro As DataRow = DtMovimientosCambioVigencias.NewRow
|
||||
registro.Item("Cantidad") = Cantidad
|
||||
registro.Item("CveUM") = CveUM
|
||||
registro.Item("CvePS") = CvePS
|
||||
registro.Item("CodigoPS") = CodigoPS
|
||||
registro.Item("PS") = PS
|
||||
registro.Item("PU") = 0
|
||||
registro.Item("Total") = 0
|
||||
registro.Item("CveClasificacion") = CveClasificacion
|
||||
registro.Item("Estatus") = ""
|
||||
registro.Item("CveSeccionAlmacen") = CveSeccionAlmacen
|
||||
registro.Item("Serie") = Serie
|
||||
registro.Item("Lote") = Lote
|
||||
registro.Item("FechaCaducidad") = Caducidad
|
||||
|
||||
If CvePS > 0 Then
|
||||
Using ObjPS As New ClsProductosServicios()
|
||||
If ObjPS.GetPS(CvePS, -1, UsuarioActual.CveEmpresa) AndAlso ObjPS.DtResultados.Rows.Count > 0 Then
|
||||
Dim CvePSAdicionalVigencia = ObjPS.DtResultados.Rows(0)("CvePSAdicionalVigencia").ToString.ToEntero()
|
||||
Dim CodigoPSVigencia As String = ObjPS.DtResultados.Rows(0)("CodigoPSVigencia").ToString
|
||||
'SI EXISTE UN MOVIMIENTO DE VIGENCIA
|
||||
If CvePSAdicionalVigencia > 0 Then
|
||||
|
||||
If ObjPS.GetPS(CvePSAdicionalVigencia, -1, UsuarioActual.CveEmpresa) AndAlso ObjPS.DtResultados.Rows.Count > 0 Then
|
||||
registro.Item("CvePSVigencia") = CvePSAdicionalVigencia
|
||||
registro.Item("CodigoPSVigencia") = CodigoPSVigencia
|
||||
registro.Item("CveUMVigencia") = ObjPS.DtResultados.Rows(0)("CveUM").ToString.ToEntero()
|
||||
|
||||
DtMovimientosCambioVigencias.Rows.Add(registro)
|
||||
End If
|
||||
|
||||
Else
|
||||
Alert("Este producto no tiene un producto de vigencia relacionado", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
|
||||
CargaGvCambioSalidas(DtMovimientosCambioVigencias)
|
||||
|
||||
RegistraScript("playsonidito('beep-07.wav')")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub DeleteRowCambioVigencia(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim lnkRemove As LinkButton = DirectCast(sender, LinkButton)
|
||||
|
||||
If DtMovimientosCambioVigencias.Rows.Count > 0 And lnkRemove.CommandArgument.ToString.Length > 0 Then
|
||||
Dim i As Integer
|
||||
i = lnkRemove.CommandArgument.ToString.ToEntero
|
||||
Dim Drs As DataRow() = DtMovimientosCambioVigencias.Select(String.Format("No = {0}", i))
|
||||
If Drs.Count > 0 Then
|
||||
|
||||
Drs(0).Delete()
|
||||
End If
|
||||
DtMovimientosCambioVigencias.AcceptChanges()
|
||||
End If
|
||||
|
||||
GvSalidasCambioVigencia.EditIndex = -1
|
||||
|
||||
CargaGvCambioSalidas(DtMovimientosCambioVigencias)
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGvCambioSalidas(DtTemp As DataTable)
|
||||
GvSalidasCambioVigencia.DataSource = DtTemp
|
||||
GvSalidasCambioVigencia.DataBind()
|
||||
|
||||
If DtTemp IsNot Nothing AndAlso DtTemp.Rows.Count > 0 Then
|
||||
GvSalidasCambioVigencia.Columns(2).Visible = DtTemp.MAX("CveSeccionAlmacen").ToEntero > 0
|
||||
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 Caducidad")
|
||||
End If
|
||||
UpGvCambioSalidas.Update()
|
||||
End Sub
|
||||
Protected Sub GvSalidasCambioVigencia_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
e.Row.Cells(1).CssClass = "SubTotales"
|
||||
e.Row.Cells(6).CssClass = "Totales"
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "GUARDAR"
|
||||
@@ -4032,6 +4210,133 @@ Partial Class Inventarios_EntradasSalidas
|
||||
ObjInventario.Dispose() 'elimino la instancia
|
||||
|
||||
End Sub
|
||||
Private Sub BtnGuardarCambiosVigencia_Click(sender As Object, e As EventArgs) Handles BtnGuardarCambiosVigencia.Click
|
||||
|
||||
If GvSalidasCambioVigencia.Rows.Count = 0 Then
|
||||
Alert("No hay ningun registro para generar el movimiento. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgError)
|
||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivModalCambioFisico"))
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim ObjInventario As New ClsInventarios
|
||||
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL())
|
||||
Dim CveMovimientoEntrada As Integer = -1
|
||||
Dim CveMovimientoSalida As Integer = -1
|
||||
Dim ErrorMovInv As Boolean = False
|
||||
Dim Mensaje As String = ""
|
||||
Dim ValorEntrada As Decimal = 0
|
||||
Dim ValorSalida As Decimal = 0
|
||||
Dim ImporteConcepto As Decimal = 0
|
||||
Dim tConcepto As String = TxtObsCambioVigencia.Text.Trim
|
||||
Dim Fecha = TxtFechaCambio.Text.ToDate.ToString("yyyy/MM/dd").ToDate
|
||||
Dim tCveSubProyecto As Integer = -1
|
||||
Dim TipoMovto As Boolean = False
|
||||
Dim idCtaContableEntrada As Integer = 0
|
||||
Dim idCtaContableSalida As Integer = 0
|
||||
|
||||
Dim FolioSalida As Integer = 0
|
||||
Dim FolioEntrada As Integer = 0
|
||||
|
||||
Dim IdCuentaOtrosIngresos As Integer = UsuarioActual.Empresa.IdCuentaOtrosIngresos
|
||||
|
||||
Dim CveAlmacen As Integer = DdlAlmacenCambioVigencias.SelectedValue.ToEntero
|
||||
|
||||
Dim CveModalidad As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacen).FiltroPrimeroValor("CveModalidad").ToEntero()
|
||||
|
||||
Dim EsContabilizable As Boolean = (CveModalidad = 1)
|
||||
|
||||
'MOVIMIENTOS
|
||||
If DtMovimientosCambioVigencias.Rows.Count > 0 Then
|
||||
FolioSalida = ObjInventario.GetFolioSiguiente(8, UsuarioActual.CveEmpresa)
|
||||
CveMovimientoSalida = ObjInventario.AddMovimiento(CveAlmacen, 8, 1, Fecha, FolioSalida, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObsCambioVigencia.Text.Trim, Modulo:="ES/CV1")
|
||||
|
||||
FolioEntrada = ObjInventario.GetFolioSiguiente(9, UsuarioActual.CveEmpresa)
|
||||
CveMovimientoEntrada = ObjInventario.AddMovimiento(CveAlmacen, 9, 1, Fecha, FolioEntrada, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObsCambioVigencia.Text.Trim, CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="ES/CV2")
|
||||
End If
|
||||
|
||||
|
||||
'VALIDA, sino hay registrado ningun movimiento, que no siga
|
||||
If (CveMovimientoEntrada <= 0 AndAlso CveMovimientoSalida <= 0) Then
|
||||
Alert("Ocurrió un error al realizar los registros. Por favor verifique y vuelva a intentar", TipoMensaje.MsgError)
|
||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||
ObjInventario.RollBack() 'deshace lo insertado.
|
||||
ObjInventario.Dispose() 'elimino la instancia
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'VALIDA EXISTENCIAS SALIDA E INSERTA DETALLES
|
||||
For Each Dr As DataRow In DtMovimientosCambioVigencias.Rows
|
||||
If ObjInventario.GetExistenciasPS(Dr("CvePS").ToString.ToEntero, Dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenInventarioFisico.SelectedValue.ToEntero, PendientePorSurtir:=1) >= Dr("Cantidad").ToString.ToDouble Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero,
|
||||
Dr("PU").ToString.ToDecimal, -1, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString,
|
||||
Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate) Then
|
||||
Mensaje = "Ocurrió un error al guardar los movimientos de salida"
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
Else
|
||||
'OBTIENE EL COSTO DE LA SALIDA
|
||||
If Not ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa, CveMovimientoDetalle:=ObjInventario.CveMovimientoDetalle) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||
Mensaje = "Ocurrió un error al guardar los movimientos de salida"
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
Else
|
||||
Dim PUEntrada As Decimal = ObjInventario.DtResultados.Rows(0)("PU").ToString().ToDecimal()
|
||||
ImporteConcepto += PUEntrada * Dr("Cantidad").ToString.ToDecimal()
|
||||
|
||||
'INSERTA EL MOVIMIENTO DE ENTRADA
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUMVigencia").ToString.ToEntero, Dr("CvePSVigencia").ToString.ToEntero, PUEntrada, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero) Then
|
||||
Mensaje = "Ocurrió un error al guardar los movimientos de entrada"
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
Mensaje = String.Format("No hay existencias suficientes del producto: {0}", Dr("PS"))
|
||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
'CONTABILIZAR MOVIMIENTOS
|
||||
If Not ErrorMovInv Then
|
||||
If Not ContabilizaMovimientoAlmacen(ObjConta, Now, "CAMBIO DE VIGENCIA", "ES/CV", CveMovimientoSalida, CveMovimientoEntrada, ImporteConcepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False) > 0 Then
|
||||
ErrorMovInv = True
|
||||
Mensaje = "No se pudo generar el movimiento de prepoliza"
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ErrorMovInv Then
|
||||
ObjInventario.Commit() ' aplica los movimientos insertados
|
||||
|
||||
Dim Msg As New StringBuilder
|
||||
Msg.AppendFormat("<br/>El Movimiento de entrada se registró con el Folio: <b><a class=""Texto"" target='_blank' href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"">{1}</a></b>", CveMovimientoEntrada, FolioEntrada)
|
||||
If CveMovimientoEntrada > 0 Then Msg.AppendFormat("<br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento Entrada</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoEntrada)))
|
||||
Msg.AppendFormat("<br/><br/>El Movimiento de salida se registró con el Folio: <b><a class=""Texto"" target='_blank' href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"">{1}</a></b>", CveMovimientoSalida, FolioSalida)
|
||||
If CveMovimientoSalida > 0 Then Msg.AppendFormat("<br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento Salida</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoSalida)))
|
||||
Alert(Msg.ToString, TipoMensaje.MsgInformacion)
|
||||
|
||||
RegistraScript("playsonidito('beep-07.wav');$('#DivModalCambiarVigencias').modal('hide');")
|
||||
|
||||
DtMovimientosCambioVigencias.Clear()
|
||||
|
||||
GvSalidasCambioVigencia.DataSource = DtMovimientosCambioVigencias
|
||||
GvSalidasCambioVigencia.DataBind()
|
||||
|
||||
TxtObsCambioVigencia.Text = ""
|
||||
|
||||
Else
|
||||
ObjInventario.RollBack()
|
||||
|
||||
Alert(Mensaje, TipoMensaje.MsgError)
|
||||
|
||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||
End If
|
||||
ObjInventario.Dispose() 'elimino la instancia
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#End Region
|
||||
@@ -4528,4 +4833,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -630,7 +630,7 @@
|
||||
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-Width="40%" />
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lnkRemove" runat="server" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" CommandName="Delete" OnClientClick="return confirm('¿Desea borrar el registro?')"></asp:LinkButton>
|
||||
<asp:LinkButton ID="lnkRemove" runat="server" CssClass="btn btn-circle btn-xs red" Text="<i class='icon-trash'></i>" CommandName="Delete" OnClientClick="return confirm('¿Desea borrar el registro?')"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="20%"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
|
||||
@@ -901,6 +901,22 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
LbCantidad.Text = e.Row.DBCampo("CantidadF")
|
||||
LbCantidad2.Text = e.Row.DBCampo("CantidadF")
|
||||
AgregaSerie(e.Row.DBCampo("ObservacionesDetalle"), 3)
|
||||
End If
|
||||
|
||||
If TipoDocto = "Ing" AndAlso e.Row.DBCampo("ObservacionesDetalle").Length > 8 AndAlso DdlAlmacen.SelectedValue.ToEntero > 0 AndAlso UsuarioActual.CveRol = 1 Then
|
||||
Dim Str = e.Row.DBCampo("ObservacionesDetalle").Replace(",", " ").Replace(".", " ").Replace(vbTab, " ").Replace(vbLf, " ").Split(" "c)
|
||||
CveConsecSerie = e.Row.DBCampo("Consec").ToString().ToEntero()
|
||||
PSSerie = e.Row.DBCampo("PS").ToString()
|
||||
CvePSSerie = e.Row.DBCampo("CvePS").ToEntero()
|
||||
CveUMSerie = e.Row.DBCampo("CveUM").ToEntero()
|
||||
LbCantidad.Text = e.Row.DBCampo("CantidadF")
|
||||
LbCantidad2.Text = e.Row.DBCampo("CantidadF")
|
||||
For Each st As String In Str
|
||||
If Not st.Contiene("", "/") Then
|
||||
AgregaSerie(st, 3)
|
||||
End If
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
@@ -1157,10 +1173,10 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim AplicaCaducidad = False
|
||||
If GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltraParametros("").Rows(0) IsNot Nothing Then
|
||||
AplicaCaducidad = If(GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltraParametros("").Rows(0)("AplicaCaducidad").ToString() = "True", True, False)
|
||||
End If
|
||||
Dim AplicaCaducidad As Boolean = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltroPrimeroValor("AplicaCaducidad", "") = "True"
|
||||
'If GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltraParametros("").Rows(0) IsNot Nothing Then
|
||||
' AplicaCaducidad = If(GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltraParametros("").Rows(0)("AplicaCaducidad").ToString() = "True", True, False)
|
||||
'End If
|
||||
|
||||
|
||||
'Valida Existencia
|
||||
@@ -1173,6 +1189,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
ObjInventarios.Dispose()
|
||||
Exit Sub
|
||||
End If
|
||||
ObjInventarios.Dispose()
|
||||
Else
|
||||
If DtExistencias IsNot Nothing Then
|
||||
Dim Existencia = DtExistencias.SUM("Cantidad", $"CvePS = {CvePSSerie} AND CveUM = {CveUMSerie} AND Serie = '{Serie}'")
|
||||
|
||||
@@ -2676,6 +2676,48 @@ Partial Class Inventarios_RecepcionUsados
|
||||
HdnPSAjusteMarca.Value = CveMarca.ToString()
|
||||
HdnPSAjusteClasificacion.Value = CveClasificacion.ToString()
|
||||
|
||||
Dim CveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={DdlAlmacen.SelectedValue}").ToEntero
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(404).ToEntero > 0 Then 'cuando el valor es 10.- secuencia Cliente/Sucursal, 20 - sucursal/cliente
|
||||
Dim TipoPrecioLista As Integer = UsuarioActual.Empresa.Funcionalidad(404).ToEntero
|
||||
' si es 10. primero el cliente
|
||||
Dim CvePrecioListaPS As Integer
|
||||
Dim PorcentajePrecio As Decimal = 0
|
||||
|
||||
If TipoPrecioLista = 10 Then
|
||||
CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=DdlClientes.SelectedValue.ToEntero()).FiltroPrimeroValor("CvePrecioLista").ToEntero()
|
||||
If CvePrecioListaPS <= 0 Then
|
||||
CvePrecioListaPS = GlobalDTSubProyectos(-1, CveSubProyecto:=CveSubProyecto, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "").ToEntero()
|
||||
End If
|
||||
Else
|
||||
CvePrecioListaPS = GlobalDTSubProyectos(-1, CveSubProyecto:=CveSubProyecto, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "").ToEntero()
|
||||
If CvePrecioListaPS <= 0 Then
|
||||
CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=DdlClientes.SelectedValue.ToEntero()).FiltroPrimeroValor("CvePrecioLista").ToEntero()
|
||||
End If
|
||||
End If
|
||||
|
||||
If CvePrecioListaPS > 0 Then
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then
|
||||
PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDecimal
|
||||
PorcentajePrecio = ObjPS.DtResultados.FiltroPrimeroValor("Porcentaje").ToDecimal
|
||||
End If
|
||||
ObjPS.Dispose()
|
||||
End If
|
||||
|
||||
If PrecioSugerido = 0 Then
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
Dim CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, txtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, CveSubProyecto, CveTipoAlmacen:=1)
|
||||
'si el costo es cero, puede ser que no halla movimientos del producto, en esa sucursal. y se volverá a sacar sin especificar sucursal
|
||||
If CostoPS = 0 Then CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, txtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, -1, CveTipoAlmacen:=1)
|
||||
ObjInventarios.Dispose()
|
||||
If CostoPS > 0 And PorcentajePrecio > 0 Then
|
||||
PrecioSugerido = ((PorcentajePrecio / 100) + 1) * CostoPS
|
||||
End If
|
||||
End If
|
||||
'CvePrecioLista = CvePrecioListaPS
|
||||
End If
|
||||
|
||||
Dim MarcaPorcentaje As DataRow = DtPorcentajeMarcas.FiltroPrimero(String.Format("CveMarca = {0}", drPS("CveMarca").ToString))
|
||||
If MarcaPorcentaje IsNot Nothing Then
|
||||
Dim PorcentajeProducto As Decimal = MarcaPorcentaje("PorcentajeProducto").ToString.ToDecimal / 100
|
||||
@@ -2705,6 +2747,7 @@ Partial Class Inventarios_RecepcionUsados
|
||||
TxtPUFactura.Text = PrecioSugerido.FormatoNumero(2)
|
||||
End If
|
||||
UpModalAgregar.Update()
|
||||
UpAjuste.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaBCIAjuste()
|
||||
|
||||
Reference in New Issue
Block a user