--merge RegPrePolizaS
This commit is contained in:
@@ -34,10 +34,9 @@
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" Runat="Server">
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCamion,Placa,Especificacion,ConfigCartaPorte,Anio,CveTipoPermisoSCT,NumPermisoSCT,NombreAseguradora,NumPolizaSeguro"
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCamion,Placa,Especificacion,ConfigCartaPorte,Anio,CveTipoPermisoSCT,NumPermisoSCT,NombreAseguradora,NumPolizaSeguro,NombreAseguradoraMedioAmbiente,NumPolizaSeguroMedioAmbiente,NombreAseguradoraCarga,NumPolizaSeguroCarga"
|
||||
EmptyDataText="No se Encontraron Unidades" ToolTip="Listado de Unidades" CssClass="table table-striped table-advance table-hover mysmallbtn" Style="margin-top: -10px; width: 100%" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Placa" DataField="Placa" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Especificación" DataField="Especificacion" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Config Carta Porte" DataField="ConfigCartaPorte" ItemStyle-HorizontalAlign="Left" />
|
||||
@@ -144,21 +143,66 @@
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group form-md-line-input input-iconright col-md-6">
|
||||
<asp:TextBox ID="TxtNombreAseguradora" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtNombreAseguradora.ClientID.ToString()%>">Nombre Aseguradora:</label>
|
||||
<asp:RequiredFieldValidator runat="server" ID="RfvTxtNombreAseguradora" ControlToValidate="TxtNombreAseguradora" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre Aseguradora''</b> es necesario, por favor ingréselo." ValidationGroup="GrpUnidad"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNombreAseguradora" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtNombreAseguradora.ClientID.ToString()%>">Aseguradora Responsabilidad Civil:</label>
|
||||
<asp:RequiredFieldValidator runat="server" ID="RfvTxtNombreAseguradora" ControlToValidate="TxtNombreAseguradora" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Aseguradora Responsabilidad Civil''</b> es necesario, por favor ingréselo." ValidationGroup="GrpUnidad"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright col-md-6">
|
||||
<asp:TextBox ID="TxtNumPolizaSeguro" CssClass="form-control" runat="server" MaxLength="25"></asp:TextBox>
|
||||
<label for="<%= TxtNumPolizaSeguro.ClientID.ToString()%>">Numero Póliza Seguro:</label>
|
||||
<asp:RequiredFieldValidator runat="server" ID="RfvTxtNumPolizaSeguro" ControlToValidate="TxtNumPolizaSeguro" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Numero Póliza Seguro''</b> es necesario, por favor ingréselo." ValidationGroup="GrpUnidad"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNumPolizaSeguro" CssClass="form-control" runat="server" MaxLength="25"></asp:TextBox>
|
||||
<label for="<%= TxtNumPolizaSeguro.ClientID.ToString()%>">Número Póliza Seguro:</label>
|
||||
<asp:RequiredFieldValidator runat="server" ID="RfvTxtNumPolizaSeguro" ControlToValidate="TxtNumPolizaSeguro" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Póliza Responsabilidad Civil''</b> es necesario, por favor ingréselo." ValidationGroup="GrpUnidad"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright" >
|
||||
<asp:TextBox ID="TxtNombreAseguradoraMedioAmbiente" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtNombreAseguradoraMedioAmbiente.ClientID.ToString()%>">Aseguradora Medio Ambiente:</label>
|
||||
<asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator1" ControlToValidate="TxtNombreAseguradoraMedioAmbiente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Aseguradora Medio Ambiente''</b> es necesario, por favor ingréselo." ValidationGroup="GrpUnidad"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNumPolizaSeguroMedioAmbiente" CssClass="form-control" runat="server" MaxLength="25"></asp:TextBox>
|
||||
<label for="<%= TxtNumPolizaSeguroMedioAmbiente.ClientID.ToString()%>">Número Póliza Medio Ambiente:</label>
|
||||
<asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator2" ControlToValidate="TxtNumPolizaSeguroMedioAmbiente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Numero Póliza Medio Ambiente''</b> es necesario, por favor ingréselo." ValidationGroup="GrpUnidad"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNombreAseguradoraCarga" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtNombreAseguradoraCarga.ClientID.ToString()%>">Aseguradora Carga:</label>
|
||||
<asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator3" ControlToValidate="TxtNombreAseguradoraCarga" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Aseguradora Carga''</b> es necesario, por favor ingréselo." ValidationGroup="GrpUnidad"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright" >
|
||||
<asp:TextBox ID="TxtNumPolizaSeguroCarga" CssClass="form-control" runat="server" MaxLength="25"></asp:TextBox>
|
||||
<label for="<%= TxtNumPolizaSeguroCarga.ClientID.ToString()%>">Número Póliza Seguro:</label>
|
||||
<asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator4" ControlToValidate="TxtNumPolizaSeguroCarga" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Póliza Seguro Carga''</b> es necesario, por favor ingréselo." ValidationGroup="GrpUnidad"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
|
||||
@@ -77,6 +77,10 @@ Partial Class Inventarios_CatUnidades
|
||||
TxtNumermisoSCT.Text = ""
|
||||
TxtNombreAseguradora.Text = ""
|
||||
TxtNumPolizaSeguro.Text = ""
|
||||
TxtNombreAseguradoraMedioAmbiente.Text = ""
|
||||
TxtNumPolizaSeguroMedioAmbiente.Text = ""
|
||||
TxtNombreAseguradoraCarga.Text = ""
|
||||
TxtNumPolizaSeguroCarga.Text = ""
|
||||
|
||||
LtlTituloModal.Text = "Agregar Unidad"
|
||||
|
||||
@@ -103,6 +107,11 @@ Partial Class Inventarios_CatUnidades
|
||||
TxtNombreAseguradora.Text = GvRow.DataKey("NombreAseguradora")
|
||||
TxtNumPolizaSeguro.Text = GvRow.DataKey("NumPolizaSeguro")
|
||||
|
||||
TxtNombreAseguradoraMedioAmbiente.Text = GvRow.DataKey("NombreAseguradoraMedioAmbiente")
|
||||
TxtNumPolizaSeguroMedioAmbiente.Text = GvRow.DataKey("NumPolizaSeguroMedioAmbiente")
|
||||
TxtNombreAseguradoraCarga.Text = GvRow.DataKey("NombreAseguradoraCarga")
|
||||
TxtNumPolizaSeguroCarga.Text = GvRow.DataKey("NumPolizaSeguroCarga")
|
||||
|
||||
LtlTituloModal.Text = "Actualizar Unidad"
|
||||
|
||||
UpModalUnidades.Update()
|
||||
@@ -144,13 +153,15 @@ Partial Class Inventarios_CatUnidades
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
|
||||
If CveCamion <= 0 Then
|
||||
If ObjInventarios.AddCamiones(TxtPlacaNuevo.Text, TxtEspecificacionNuevo.Text, UsuarioActual.CveEmpresa, DdlConfigAuto.SelectedValue, TxtAnio.Text.ToEntero(), DdlTipoPermisoSCT.SelectedValue.ToEntero, TxtNumermisoSCT.Text, TxtNombreAseguradora.Text, TxtNumPolizaSeguro.Text, UsuarioActual.CveUsuario) Then
|
||||
If ObjInventarios.AddCamiones(TxtPlacaNuevo.Text, TxtEspecificacionNuevo.Text, UsuarioActual.CveEmpresa, DdlConfigAuto.SelectedValue, TxtAnio.Text.ToEntero(), DdlTipoPermisoSCT.SelectedValue.ToEntero, TxtNumermisoSCT.Text, TxtNombreAseguradora.Text, TxtNumPolizaSeguro.Text, UsuarioActual.CveUsuario,
|
||||
TxtNombreAseguradoraMedioAmbiente.Text, TxtNumPolizaSeguroMedioAmbiente.Text, TxtNombreAseguradoraCarga.Text, TxtNumPolizaSeguroCarga.Text) Then
|
||||
Alert("Unidad agregada correctamente")
|
||||
Else
|
||||
ErrorPrceso = True
|
||||
End If
|
||||
Else
|
||||
If ObjInventarios.UpdateCamiones(CveCamion, TxtPlacaNuevo.Text, TxtEspecificacionNuevo.Text, DdlConfigAuto.SelectedValue, TxtAnio.Text.ToEntero(), DdlTipoPermisoSCT.SelectedValue.ToEntero, TxtNumermisoSCT.Text, TxtNombreAseguradora.Text, TxtNumPolizaSeguro.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
If ObjInventarios.UpdateCamiones(CveCamion, TxtPlacaNuevo.Text, TxtEspecificacionNuevo.Text, DdlConfigAuto.SelectedValue, TxtAnio.Text.ToEntero(), DdlTipoPermisoSCT.SelectedValue.ToEntero, TxtNumermisoSCT.Text, TxtNombreAseguradora.Text, TxtNumPolizaSeguro.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
||||
TxtNombreAseguradoraMedioAmbiente.Text, TxtNumPolizaSeguroMedioAmbiente.Text, TxtNombreAseguradoraCarga.Text, TxtNumPolizaSeguroCarga.Text) Then
|
||||
Alert("Unidad actualizada correctamente")
|
||||
Else
|
||||
ErrorPrceso = True
|
||||
|
||||
@@ -5064,7 +5064,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
If DtPSVirtual IsNot Nothing AndAlso DtPSVirtual.Rows.Count > 0 Then
|
||||
|
||||
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, If(tOrigen > 0, 2, 3), 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveMovimientoRelacionado:=CveMovimiento, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="ES/GV")
|
||||
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, If(tOrigen > 0, 36, 37), 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveMovimientoRelacionado:=CveMovimiento, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="ES/GV")
|
||||
FolioVirtual = ObjInventario.Folio
|
||||
|
||||
For Each RowUsado As DataRow In DtPSVirtual.Rows
|
||||
|
||||
561
Inventarios/EntregaAlmacenRuta.aspx
Normal file
561
Inventarios/EntregaAlmacenRuta.aspx
Normal file
@@ -0,0 +1,561 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="EntregaAlmacenRuta.aspx.cs" Inherits="Inventarios_EntregaAlmacenRuta" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
<style>
|
||||
.MultiLineTextBox {
|
||||
resize: none;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.posicionvalidation {
|
||||
left: 530px !important;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Entrega Almacen Ruta
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<li style="text-align: left!important">
|
||||
<asp:LinkButton runat="server" ID="LnkAgregarRecoleccion" OnClick="LnkAgregarRecoleccion_Click" CssClass="" data-toggle="tooltip" data-placement="left" title="Agregar Recoleción" Text="<i class='fa fa-plus'></i>Agregar Recolección"></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpFiltro" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" OnClick="BtnConsultar_Click" runat="server" Text="Consultar" class="btn btn-primary" Visible="true" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
<div class="col-sm-1"><asp:Label runat="server" id="LblSubProyecto"></asp:Label></div>
|
||||
<div class="col-sm-2">
|
||||
<asp:DropDownList runat="server" Id="DdlSubProyecto" CssClass="select2me" Width="100%" DataValueField="CveSubProyecto" DataTextField="SubProyecto"></asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 " style="width: 90px;">Fecha Inicial:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 138px !important; padding: 0px; margin-bottom: -10px;">
|
||||
<asp:TextBox ID="TxtFechaI" runat="server" CssClass="form-control" CausesValidation="true" Width="98%" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioI" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="TxtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="TxtFechaI" PopupButtonID="ImgCalendarioI" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="TxtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="TxtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 " style="width: 80px;">Fecha Final:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 138px !important; padding: 0px; margin-bottom: -10px;">
|
||||
<asp:TextBox ID="TxtFechaF" runat="server" CssClass="form-control" CausesValidation="true" Width="98%" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="TxtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="TxtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="TxtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="TxtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpDatosEntrega" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row" >
|
||||
|
||||
<div class="col-md-1" runat="server" id="DVDatosEntrega1" visible="false">
|
||||
Chofer:
|
||||
</div>
|
||||
<div class="col-md-1" runat="server" id="DVDatosEntrega2" visible="false">
|
||||
<asp:DropDownList ID="DdlChofer" runat="server" DataTextField="Chofer" DataValueField="CveChofer" CssClass="form-control input-sm select2me" Width="100%" CausesValidation="true"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlChofer" runat="server" Enabled="false" ControlToValidate="DdlChofer" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Chofer''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceDdlChofer" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlChofer" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1" runat="server" id="DVDatosEntrega3" visible="false">
|
||||
Unidad:
|
||||
</div>
|
||||
<div class="col-md-1" runat="server" id="DVDatosEntrega4" visible="false">
|
||||
<asp:DropDownList runat="server" ID="DdlUnidadCamion" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="Placa" CausesValidation="true"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlUnidadCamion" runat="server" Enabled="false" ControlToValidate="DdlUnidadCamion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceDdlUnidadCamion" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlUnidadCamion" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1" runat="server" id="DVDatosEntrega5" visible="false">
|
||||
Fecha de Entrega:
|
||||
</div>
|
||||
|
||||
<div class="col-md-1" runat="server" id="DVDatosEntrega6" visible="false">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 125px !important;">
|
||||
<asp:TextBox ID="TxtFechaEntrega" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="80px" ClientIDMode="Static"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="ImgFechaEntrega" class="btn default"> <i class="fa fa-calendar"></i> </asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender2" runat="server" TargetControlID="TxtFechaEntrega" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaEntrega" PopupButtonID="ImgFechaEntrega" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="CompareValidator1" runat="server" ControlToValidate="TxtFechaEntrega" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Entrega''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="CompareValidator1" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1" runat="server" id="DvCartaPorte1" visible="false">
|
||||
Carta Porte:
|
||||
</div>
|
||||
<div class="col-md-1" runat="server" id="DvCartaPorte2" visible="false">
|
||||
|
||||
<asp:CheckBox ID="ChkEmitirCartaPorte" runat="server" Text="Carta Porte" CssClass="chksino" />
|
||||
</div>
|
||||
<div class="col-md-9" runat="server" id="DVDatosEntrega7" >
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-2" style="text-align:center!important">
|
||||
<asp:LinkButton runat="server" CssClass="btn btn-primary" ID="LnkGenerarDocumentos" OnClick="LnkGenerarDocumentos_Click">Preselección de Entregas</asp:LinkButton>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1" style="text-align:center!important">
|
||||
<asp:LinkButton ID="BtnAsignar" OnClick="BtnAsignar_Click" runat="server" Text="Asignar" class="btn btn-primary" ValidationGroup="GrpGuardar" CausesValidation="true" Visible="false" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="BtnAsignar" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<ajax:TabContainer ID="Tab" runat="server" ActiveTabIndex="0" Width="100%" OnActiveTabChanged="Tab_ActiveTabChanged" AutoPostBack="true">
|
||||
|
||||
<ajax:TabPanel ID="TabEntrega" runat="server" HeaderText="Entrega">
|
||||
<ContentTemplate>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Panel runat="server" ID="portletTarea" class="portlet light smmallpadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">ASIGNACIÓN DE ENTREGAS</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
|
||||
|
||||
<div class="row" runat="server" id="DVGvPaqueteriasGuias">
|
||||
<div class="col-md-12">
|
||||
|
||||
|
||||
<asp:GridView ID="GvPaqueteriasGuias" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="SerieFolio,FechaIng,Nombre,CveVenta,OrdenCompra,NombreComercial,TipoDocto,CorreoNotificacion,CveVendedor,Orden,CveMovimiento,CveDireccionEnvio,CveSubProyectoOrigen"
|
||||
EmptyDataText="No se encontraron registros" ToolTip="Listado de entregas"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||
data-sort="true"
|
||||
data-freezerows="1"
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="3%" HeaderStyle-Width="3%">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkAsigna" runat="server" Checked="false" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Cons" DataField="Num" HeaderStyle-Width="25px" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:TemplateField HeaderText="Folio" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" HeaderStyle-Width="10%">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="LblFolio" runat="server" NavigateUrl='<%# Eval("CveVenta","/Ventas/Ventas.aspx?CveVenta={0}") %>' Text='<%# Eval("SerieFolio") %>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
|
||||
</asp:TemplateField>
|
||||
<%--<asp:BoundField HeaderText="Estatus" DataField="Estatus" HeaderStyle-Width="150px" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left" />--%>
|
||||
<asp:TemplateField HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" HeaderStyle-Width="10%">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:dd/MM/yyyy}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cliente" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblNombre" runat="server" Text='<%# Eval("Nombre") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Contacto" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblContacto" runat="server" Text='<%# Eval("Contacto") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Dirección" DataField="Direccion" ItemStyle-HorizontalAlign="Left" />
|
||||
</Columns>
|
||||
|
||||
</asp:GridView>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row" runat="server" id="DVGvGenerarDocumentos" visible="false">
|
||||
<div class="col-md-12">
|
||||
|
||||
|
||||
<asp:GridView ID="GvGenerarDocumentos" runat="server" AutoGenerateColumns="False" Width="100%"
|
||||
DataKeyNames="SerieFolio,FechaIng,Nombre,CveVenta,OrdenCompra,NombreComercial,TipoDocto,CorreoNotificacion,CveVendedor,Orden,CveMovimiento,CveDireccionEnvio,CveSubProyectoOrigen"
|
||||
EmptyDataText="No se encontraron registros" ToolTip="Listado de entregas"
|
||||
CssClass="GvGenerarDocumentos"
|
||||
data-sort="true"
|
||||
data-freezerows="1"
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="3%" HeaderStyle-Width="3%">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkAsigna" runat="server" Checked="false" Visible="false" />
|
||||
|
||||
<a class="blue"><i class="fa fa-arrows-v green" aria-hidden="true"></i></a>
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--<asp:BoundField HeaderText="Cons" DataField="Num" HeaderStyle-Width="25px" ItemStyle-HorizontalAlign="Center" />--%>
|
||||
|
||||
<asp:TemplateField HeaderText="Cons" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="25px">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblNum" runat="server" Text='<%# Eval("Num") %>' CssClass="RowOrdenamiento"></asp:Label>
|
||||
<input type="hidden" name="OrdenMovimientos" value='<%# Eval("CveMovimiento") %>' />
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Folio" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" HeaderStyle-Width="10%">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblFolio" runat="server" Text='<%# Eval("SerieFolio") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
|
||||
</asp:TemplateField>
|
||||
<%--<asp:BoundField HeaderText="Estatus" DataField="Estatus" HeaderStyle-Width="150px" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left" />--%>
|
||||
<asp:TemplateField HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" HeaderStyle-Width="10%">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:dd/MM/yyyy}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cliente" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblNombre" runat="server" Text='<%# Eval("Nombre") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Contacto" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblContacto" runat="server" Text='<%# Eval("Contacto") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Dirección" DataField="Direccion" ItemStyle-HorizontalAlign="Left" />
|
||||
|
||||
|
||||
</Columns>
|
||||
|
||||
</asp:GridView>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</asp:Panel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
|
||||
<ajax:TabPanel ID="TabRecoleccion" runat="server" HeaderText="Recolección">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpDatosRecoleccion" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
|
||||
<asp:GridView ID="GvDatosRecoleccion" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="CveEntregaAlmacen,FechaIng,Nombre,NombreComercial,TipoDocto,Orden,CveDireccionOrigen,CveSubProyectoOrigen"
|
||||
EmptyDataText="No se encontraron registros" ToolTip="Listado de recolecciones"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||
data-sort="true"
|
||||
data-freezerows="1"
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
<%--<asp:BoundField HeaderText="SerieFolio" DataField="Serie Folio" HeaderStyle-Width="150px" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left" />--%>
|
||||
<asp:TemplateField HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" HeaderStyle-Width="10%">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:dd/MM/yyyy}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cliente" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblNombre" runat="server" Text='<%# Eval("Nombre") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Contacto" HeaderStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblContacto" runat="server" Text='<%# Eval("Contacto") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Dirección" DataField="Direccion" ItemStyle-HorizontalAlign="Left" />
|
||||
|
||||
<asp:TemplateField HeaderText="Opciones">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkGvDatosRecoleccionEditar" runat="server" OnClick="LnkGvDatosRecoleccionEditar_Click" AlternateText="Editar" ToolTip="Actualizar" CausesValidation="False" CssClass="btn btn-circle btn-xs blue" Text="<i class='fa fa-pencil'></i>" />
|
||||
<asp:LinkButton ID="LnkGvDatosRecoleccionEliminar" runat="server" CssClass="btn btn-circle btn-xs red" OnClick="LnkGvDatosRecoleccionEliminar_Click" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea eliminar la recolección?" data-btn-ok-label="si"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="160px" HorizontalAlign="Center"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
|
||||
</asp:GridView>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
|
||||
</ajax:TabContainer>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="DivModalRecoleccion" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<asp:UpdatePanel ID="UpModalRecoleccion" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="H3" runat="server"> <asp:Literal runat="server" ID="LtlModalRecoleccionTitulo">Agregar Recolección</asp:Literal> </h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
|
||||
<div class=" col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlModalRecoleccionCliente" Width="100%" runat="server" DataTextField="Nombre" DataValueField="CveCliente" AutoPostBack="true" OnSelectedIndexChanged="DdlModalRecoleccionCliente_SelectedIndexChanged"
|
||||
Class="form-control select2me">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlModalRecoleccionCliente.ClientID.ToString()%>">Cliente:</label>
|
||||
<i></i>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlModalRecoleccionCliente" runat="server" ControlToValidate="DdlModalRecoleccionCliente" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cliente1''</b> es necesario." InitialValue="-1" ValidationGroup="GrpModalRecoleccionGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceRfvDdlModalRecoleccionCliente" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlModalRecoleccionCliente" Width="250px" PopupPosition="BottomLeft"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class=" col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlmodalRecoleccionDirecion" Width="100%" runat="server" DataTextField="EnvioDireccion" DataValueField="CveDireccionEnvio"
|
||||
Class="form-control select2me">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlmodalRecoleccionDirecion.ClientID.ToString()%>">Dirección:</label>
|
||||
<i></i>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlmodalRecoleccionDirecion" runat="server" ControlToValidate="DdlmodalRecoleccionDirecion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cliente1''</b> es necesario." InitialValue="-1" ValidationGroup="GrpModalRecoleccionGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceRfvDdlmodalRecoleccionDirecion" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlmodalRecoleccionDirecion" Width="250px" PopupPosition="BottomLeft"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class=" col-md-2">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" style="max-width:85px">
|
||||
<asp:TextBox ID="TxtModalRecoleccionCantidad" Width="50px" MaxLength="7" runat="server" TabIndex="1" CssClass="form-control"></asp:TextBox>
|
||||
<label for="<%= TxtModalRecoleccionCantidad.ClientID.ToString()%>">Cantidad:</label>
|
||||
<ajax:FilteredTextBoxExtender ID="FETxtModalRecoleccionCantidad" runat="server" TargetControlID="TxtModalRecoleccionCantidad" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<asp:RequiredFieldValidator runat="server" ID="RfvTxtModalRecoleccionCantidad" ControlToValidate="TxtModalRecoleccionCantidad" ValidationGroup="GrpModalRecoleccionGuardaPS" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario por favor introdúzcalo." Display="Dynamic" Text="*"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CevRfvTxtModalRecoleccionCantidad" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtModalRecoleccionCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:RangeValidator ID="RVTxtModalRecoleccionCantidad" runat="server" ControlToValidate="TxtModalRecoleccionCantidad" Display="None" Type="Double" MinimumValue="0.001" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor introdúzcalo." ValidationGroup="GrpModalRecoleccionGuardaPS"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECantidad" runat="server" HighlightCssClass="vco" TargetControlID="RVTxtModalRecoleccionCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class=" col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright" >
|
||||
<asp:DropDownList ID="DdlModalRecoleccionUnidad" runat="server" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida" CssClass="form-control input-sm select2me" Style="width: 85px !important;"></asp:DropDownList>
|
||||
<label for="<%= TxtModalRecoleccionCantidad.ClientID.ToString()%>">Unidad de Medida:</label>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlModalRecoleccionUnidad" runat="server" ControlToValidate="DdlModalRecoleccionUnidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpModalRecoleccionGuardaPS"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceRfvDdlModalRecoleccionUnidad" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlModalRecoleccionUnidad" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class=" col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<div class="psagregar">
|
||||
<div class="comboxes">
|
||||
<label for="<%= DdlClasificacion.ClientID.ToString()%>">Clasificaión/Producto:</label>
|
||||
<asp:DropDownList ID="DdlClasificacion" runat="server" Width="100%" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Seleccione la Clasificación (Todas)" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<br />
|
||||
<ADS:Dropdownlost runat="server" ID="DdlProducto2" CssStyle="width: 100%;" IncluyeTodos="false" CssClassDdl="select2me" TabIndex="2" DataTextField="PSCodigo" DataValueField="CvePS" Onselectedindexchange="DdlProducto_ValueChanged" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-2" style="text-align:right!important">
|
||||
<asp:LinkButton ID="LnkModalAgregarPS" runat="server" CssClass="Texto" ValidationGroup="GrpModalRecoleccionGuardaPS" Text="Agregar" OnClick="LnkModalAgregarPS_Click" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GvModalPSRecoleccion" DataKeyNames="CveEntregaAlmacenDetalle,CodigoPS,CvePS,CveUnidadMedida,Cantidad" runat="server"
|
||||
ShowHeader="true" AutoGenerateColumns="False" EmptyDataText="" ToolTip="Listado de Movimientos" CssClass="Widthall table table-striped table-hover" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" ItemStyle-Width="86px" HeaderStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Unidad" DataField="Abreviatura" ItemStyle-Width="86px" />
|
||||
<asp:BoundField HeaderText="Producto" DataField="CodigoPS" ItemStyle-Width="500px" />
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkModalGvModalPSRecoleccionEliminar" runat="server" CssClass="btn btn-circle btn-xs red" OnClick="LnkModalGvModalPSRecoleccionEliminar_Click" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea eliminar el producto?" data-btn-ok-label="si"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="160px" HorizontalAlign="Center"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnModalRecoleccionGuardar" runat="server" OnClick="BtnModalRecoleccionGuardar_Click" CssClass="btn btn-primary" Text="Agregar Recolección" ValidationGroup="GrpModalRecoleccionGuardar" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
|
||||
function InitOrdenamientoGvGenerarDocumentos() {
|
||||
|
||||
$(".GvGenerarDocumentos").sortable({
|
||||
items: 'tr:not(tr:first-child)',
|
||||
cursor: 'pointer',
|
||||
axis: 'y',
|
||||
dropOnEmpty: false,
|
||||
start: function (e, ui) {
|
||||
ui.item.addClass("selected");
|
||||
let asd = ui.item.children('a');
|
||||
},
|
||||
stop: function (e, ui) {
|
||||
//Ordenar el numero de la columna *Cons*
|
||||
$(".RowOrdenamiento").each(function (index) {
|
||||
let nRow = (index + 1);
|
||||
$(this).text(nRow);
|
||||
});
|
||||
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
902
Inventarios/EntregaAlmacenRuta.aspx.cs
Normal file
902
Inventarios/EntregaAlmacenRuta.aspx.cs
Normal file
@@ -0,0 +1,902 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Data;
|
||||
using Extensiones;
|
||||
using Microsoft.Reporting.WebForms;
|
||||
using System.Text;
|
||||
|
||||
public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
|
||||
{
|
||||
|
||||
|
||||
DataTable DTGenrarDocumentos
|
||||
{
|
||||
get {
|
||||
|
||||
if(ViewState["DTGenrarDocumentos"] == null){
|
||||
ViewState["DTGenrarDocumentos"] = new DataTable();
|
||||
}
|
||||
return (DataTable)ViewState["DTGenrarDocumentos"];
|
||||
|
||||
}
|
||||
set {
|
||||
ViewState["DTGenrarDocumentos"] = (DataTable)value;
|
||||
}
|
||||
}
|
||||
|
||||
DataTable DTDatosConsulta
|
||||
{
|
||||
get
|
||||
{
|
||||
|
||||
if (ViewState["DTDatosConsulta"] == null)
|
||||
{
|
||||
ViewState["DTDatosConsulta"] = new DataTable();
|
||||
}
|
||||
return (DataTable)ViewState["DTDatosConsulta"];
|
||||
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["DTDatosConsulta"] = (DataTable)value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
DataTable DTRecoleccion
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["DTRecoleccion"] == null)
|
||||
{
|
||||
ViewState["DTRecoleccion"] = InitDTRecoleccion();
|
||||
}
|
||||
return (DataTable)ViewState["DTRecoleccion"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["DTRecoleccion"] = (DataTable)value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
bool SelecionEntrega
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["SelecionEntrega"] == null)
|
||||
{
|
||||
ViewState["SelecionEntrega"] = false;
|
||||
}
|
||||
return (bool) ViewState["SelecionEntrega"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["SelecionEntrega"] = (bool)value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int CveEntregaAlmacen
|
||||
{
|
||||
get {
|
||||
|
||||
if (ViewState["CveEntregaAlmacen"] == null)
|
||||
{
|
||||
ViewState["CveEntregaAlmacen"] = -1;
|
||||
}
|
||||
return (int)ViewState["CveEntregaAlmacen"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["CveEntregaAlmacen"] = (int)value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
|
||||
|
||||
SelecionEntrega = true;
|
||||
CargaCombos();
|
||||
CargaDatos();
|
||||
|
||||
|
||||
|
||||
|
||||
#region RECOLEECION
|
||||
CargaDatosRecoleccion();
|
||||
CargaModalClasificaiones();
|
||||
CargaModalDdlPS();
|
||||
|
||||
ModalRecoleccionCargaClientes();
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
protected void BtnAsignar_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
|
||||
if(DdlChofer.SelectedValue.ToEntero() <= 0)
|
||||
{
|
||||
Alert("Debe seleccionar un chofer.", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
return;
|
||||
}
|
||||
|
||||
if(DdlUnidadCamion.SelectedValue.ToEntero() <= 0)
|
||||
{
|
||||
Alert("Debe seleccionar una unidad", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
StringBuilder SBError = new StringBuilder();
|
||||
ActualizaOrdenDTGenrarDocumentos();
|
||||
|
||||
|
||||
|
||||
bool TieneError = false;
|
||||
ClsGenerales ObjGeneral = new ClsGenerales();
|
||||
ObjGeneral.IniciaTransacSQL();
|
||||
|
||||
GridViewRowCollection Grid = GvGenerarDocumentos.Rows;
|
||||
|
||||
|
||||
string Usuario = DdlChofer.SelectedItem.Text;
|
||||
|
||||
|
||||
|
||||
|
||||
int CveDireccionOrigen = -1;
|
||||
foreach (GridViewRow row in Grid)
|
||||
{
|
||||
//int CvePaqueteriasGuias = row.DataKey("CvePaqueteriaGuia").ToEntero();
|
||||
int Orden = row.DataKey("Orden").ToEntero();
|
||||
|
||||
//if (ObjGeneral.AsignarEntregasPorRealizar(CvePaqueteriasGuias, CvePersonal: -1, CveAsignacionEntrega: CveAsignacionEntrega, Orden: Orden))
|
||||
//{
|
||||
|
||||
int CveDireccionDestino = row.DataKey("CveDireccionEnvio").ToEntero();
|
||||
|
||||
if (CveDireccionDestino <= 0)
|
||||
{
|
||||
SBError.AppendLine($"Factura {row.DataKey("SerieFolio")} el cliente {row.DataKey("Nombre")} no tiene una dirección de envio. ");
|
||||
TieneError = true;
|
||||
break;
|
||||
}
|
||||
int CveEntregaAlmacen = ObjGeneral.AddInvEntregaAlmacenRuta(row.DataKey("CveSubProyectoOrigen").ToEntero(), row.DataKey("CveMovimiento").ToEntero(), CveDireccionOrigen, CveDireccionDestino, DdlChofer.SelectedValue.ToEntero(), DdlUnidadCamion.SelectedValue.ToEntero(), TxtFechaEntrega.Text.ToDate(), "E",Orden,0);
|
||||
CveDireccionOrigen = row.DataKey("CveDireccionEnvio").ToEntero();
|
||||
|
||||
if (CveEntregaAlmacen > 0)
|
||||
{
|
||||
DateTime MinFecha = new DateTime(1900, 01, 01);
|
||||
int CveTimbre = ObjGeneral.AddGralTimbre("Tra", "-1", -1, "", MinFecha, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, -1, ChkEmitirCartaPorte.Checked, CveEntregaAlmacen, row.DataKey("CveSubProyectoOrigen").ToEntero());
|
||||
|
||||
if (CveTimbre <= 0)
|
||||
{
|
||||
SBError.AppendLine($"Factura {row.DataKey("SerieFolio")} error al agregar timbre. ");
|
||||
|
||||
TieneError = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SBError.AppendLine($"Factura {row.DataKey("SerieFolio")} error al agregar entrega alamcen. ");
|
||||
TieneError = true;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (!TieneError)
|
||||
{
|
||||
|
||||
foreach (GridViewRow row in Grid)
|
||||
{
|
||||
try
|
||||
{
|
||||
//MandarNotificacionCorreo(row);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
TieneError = true;
|
||||
ModExtensiones.GuardaLog(ex.Message);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (!TieneError)
|
||||
{
|
||||
ObjGeneral.Commit();
|
||||
Alert("Entregas asignadas correctamente");
|
||||
|
||||
DdlChofer.SelectedValueExist("-1");
|
||||
DdlUnidadCamion.SelectedValueExist("-1");
|
||||
ChkEmitirCartaPorte.Checked = false;
|
||||
|
||||
SelecionEntrega = false;
|
||||
SeleccioanrGenrar();
|
||||
|
||||
CargaDatos();
|
||||
UpDatos.Update();
|
||||
}
|
||||
else
|
||||
{
|
||||
ObjGeneral.RollBack();
|
||||
}
|
||||
ObjGeneral.Dispose();
|
||||
}else
|
||||
{
|
||||
Alert(SBError.ToString(), ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
|
||||
}
|
||||
private void CargaDatos()
|
||||
{
|
||||
ClsGenerales ObjGeneral = new ClsGenerales();
|
||||
if (ObjGeneral.GetInvEntregaAlmacenRuta(DdlSubProyecto.SelectedValue.ToEntero(), TxtFechaI.Text.ToDate(), TxtFechaF.Text.ToDate(), UsuarioActual.CveEmpresa, 1))
|
||||
{
|
||||
GvPaqueteriasGuias.DataSource = ObjGeneral.DtResultados;
|
||||
DTDatosConsulta = ObjGeneral.DtResultados;
|
||||
DTGenrarDocumentos = ObjGeneral.DtResultados.Clone();
|
||||
|
||||
}
|
||||
ObjGeneral.Dispose();
|
||||
GvPaqueteriasGuias.DataBind();
|
||||
|
||||
UpDatos.Update();
|
||||
}
|
||||
|
||||
|
||||
private void CargaCombos()
|
||||
{
|
||||
|
||||
ClsInventarios ObjInventarios = new ClsInventarios();
|
||||
|
||||
if(ObjInventarios.GetCamiones(-1, UsuarioActual.CveEmpresa) && ObjInventarios.DtResultados.Rows.Count > 0){
|
||||
DdlUnidadCamion.DataSource = ObjInventarios.DtResultados;
|
||||
}
|
||||
ObjInventarios.Dispose();
|
||||
DdlUnidadCamion.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
DdlUnidadCamion.DataBind();
|
||||
|
||||
TxtFechaI.Text = DateTime.Now.AddDays(-1).ToShortDateString();
|
||||
TxtFechaF.Text = DateTime.Now.ToShortDateString();
|
||||
|
||||
ClsAcarreos ObjAcar = new ClsAcarreos();
|
||||
|
||||
if(ObjAcar.GetChofer(-1, UsuarioActual.CveEmpresa, 1, -1) ){
|
||||
DdlChofer.DataSource = ObjAcar.DtResultados;
|
||||
DdlChofer.DataBind();
|
||||
}
|
||||
ObjAcar.Dispose();
|
||||
DdlChofer.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
|
||||
TxtFechaEntrega.Text = DateTime.Now.ToShortDateString();
|
||||
|
||||
|
||||
CargarCentrosDeCosto(null, DdlSubProyecto, null, LblSubProyecto);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void CargaModalClasificaiones()
|
||||
{
|
||||
|
||||
DdlClasificacion.DataSource = get_GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(" Codigo = '' OR Codigo IS NULL ", Orderby: "Clasificacion");
|
||||
DdlClasificacion.DataBind();
|
||||
|
||||
|
||||
UpModalRecoleccion.Update();
|
||||
}
|
||||
|
||||
private void CargaModalDdlPS()
|
||||
{
|
||||
bool EsWS = UsuarioActual.Empresa.Funcionalidad(105) == "1" | UsuarioActual.Empresa.Funcionalidad(141) == "1" ? true : false;
|
||||
DdlProducto2.setEsWebService(EsWS);
|
||||
if (DdlProducto2.UsaWebService)
|
||||
{
|
||||
DdlProducto2.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue);
|
||||
}
|
||||
else if (!DdlProducto2.UsaWebService && (DataTable)DdlProducto2.DataSource == null)
|
||||
{
|
||||
DdlProducto2.DataSource = get_GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion: DdlClasificacion.SelectedValue.ToEntero()).FiltraParametros("CveTipoPS = 2");
|
||||
DdlProducto2.DataBind();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void LnkGenerarDocumentos_Click(object sender, EventArgs e)
|
||||
{
|
||||
SeleccioanrGenrar();
|
||||
}
|
||||
|
||||
|
||||
private void SeleccioanrGenrar() {
|
||||
|
||||
if (SelecionEntrega)
|
||||
{
|
||||
|
||||
DTGenrarDocumentos.Rows.Clear();
|
||||
|
||||
|
||||
|
||||
int CountRows = 0;
|
||||
foreach (GridViewRow GvRow in GvPaqueteriasGuias.Rows)
|
||||
{
|
||||
|
||||
CheckBox ChkAsigna = GvRow.FCCheckBox("ChkAsigna");
|
||||
|
||||
if (ChkAsigna.Checked)
|
||||
{
|
||||
|
||||
int CveMovimiento = GvRow.DataKey("CveMovimiento").ToEntero();
|
||||
|
||||
DataRow dRow = DTGenrarDocumentos.NewRow();
|
||||
DataRow dRowOrigen = DTDatosConsulta.FiltraParametros($"CveMovimiento = {CveMovimiento}").Rows[0];
|
||||
|
||||
int IndexColun = 0;
|
||||
foreach (DataColumn dColumn in DTDatosConsulta.Columns)
|
||||
{
|
||||
dRow[IndexColun] = dRowOrigen[IndexColun];
|
||||
IndexColun++;
|
||||
}
|
||||
|
||||
dRow["Num"] = CountRows + 1;
|
||||
DTGenrarDocumentos.Rows.Add(dRow);
|
||||
CountRows++;
|
||||
}
|
||||
}
|
||||
|
||||
DTGenrarDocumentos.AcceptChanges();
|
||||
|
||||
|
||||
|
||||
|
||||
SelecionEntrega = false;
|
||||
LnkGenerarDocumentos.Text = "Regresar a Preselección";
|
||||
LnkGenerarDocumentos.CssClass = "btn btn-default";
|
||||
|
||||
|
||||
|
||||
|
||||
OcultarmostarDatosEntrega(true);
|
||||
|
||||
|
||||
|
||||
BtnConsultar.Visible = false;
|
||||
|
||||
UpDatos.Update();
|
||||
UpFiltro.Update();
|
||||
|
||||
|
||||
if (CountRows > 0)
|
||||
{
|
||||
GvGenerarDocumentos.DataSource = DTGenrarDocumentos;
|
||||
GvGenerarDocumentos.DataBind();
|
||||
|
||||
DVGvGenerarDocumentos.Visible = true;
|
||||
BtnAsignar.Visible = true;
|
||||
DVGvPaqueteriasGuias.Visible = false;
|
||||
|
||||
RegistraScript("InitOrdenamientoGvGenerarDocumentos();");
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert("No hay entregas seleccionadas", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
BtnConsultar.Visible = true;
|
||||
SelecionEntrega = true;
|
||||
LnkGenerarDocumentos.Text = "Preselección de Entregas";
|
||||
LnkGenerarDocumentos.CssClass = "btn btn-primary";
|
||||
|
||||
|
||||
OcultarmostarDatosEntrega(false);
|
||||
|
||||
BtnAsignar.Visible = false;
|
||||
DVGvGenerarDocumentos.Visible = false;
|
||||
DVGvPaqueteriasGuias.Visible = true;
|
||||
UpDatos.Update();
|
||||
UpFiltro.Update();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void OcultarmostarDatosEntrega(bool mostrar )
|
||||
{
|
||||
DVDatosEntrega1.Visible = mostrar;
|
||||
DVDatosEntrega2.Visible = mostrar;
|
||||
DVDatosEntrega3.Visible = mostrar;
|
||||
DVDatosEntrega4.Visible = mostrar;
|
||||
DVDatosEntrega5.Visible = mostrar;
|
||||
DVDatosEntrega6.Visible = mostrar;
|
||||
|
||||
if (mostrar)
|
||||
{
|
||||
DVDatosEntrega7.Attributes.Add("class", "col-md-1");
|
||||
}
|
||||
else
|
||||
{
|
||||
DVDatosEntrega7.Attributes.Add("class", "col-md-9");
|
||||
}
|
||||
|
||||
if (UsuarioActual.Empresa.Funcionalidad(161).ToEntero() == 1)
|
||||
{
|
||||
DvCartaPorte1.Visible = mostrar;
|
||||
DvCartaPorte2.Visible = mostrar;
|
||||
}
|
||||
UpDatosEntrega.Update();
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void ActualizaOrdenDTGenrarDocumentos()
|
||||
{
|
||||
string[] OrdenMovimientos = Request.Form.GetValues("OrdenMovimientos");
|
||||
|
||||
int NumOrden = 1;
|
||||
foreach (string CveMovimiento in OrdenMovimientos)
|
||||
{
|
||||
foreach(DataRow dRow in DTGenrarDocumentos.Rows)
|
||||
{
|
||||
if (CveMovimiento.ToEntero() == dRow["CveMovimiento"].ToString().ToEntero() )
|
||||
{
|
||||
dRow["Orden"] = NumOrden;
|
||||
}
|
||||
}
|
||||
DTGenrarDocumentos.AcceptChanges();
|
||||
NumOrden++;
|
||||
}
|
||||
|
||||
|
||||
DataView DTview = new DataView(DTGenrarDocumentos);
|
||||
|
||||
// Sort by State and ZipCode column in descending order
|
||||
DTview.Sort = "Orden ASC";
|
||||
|
||||
GvGenerarDocumentos.DataSource = DTview;
|
||||
GvGenerarDocumentos.DataBind();
|
||||
UpDatos.Update();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected void BtnConsultar_Click(object sender, EventArgs e)
|
||||
{
|
||||
if(Tab.ActiveTabIndex == 0)
|
||||
{
|
||||
CargaDatos();
|
||||
}
|
||||
else
|
||||
{
|
||||
CargaDatosRecoleccion();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#region RECOLECCION
|
||||
|
||||
|
||||
private DataTable InitDTRecoleccion()
|
||||
{
|
||||
DataTable DT = new DataTable();
|
||||
|
||||
DT.Columns.Add("CveEntregaAlmacenDetalle", System.Type.GetType("System.Int32"));
|
||||
DT.Columns.Add("CveEntregaAlmacen", System.Type.GetType("System.Int32"));
|
||||
DT.Columns.Add("CvePS", System.Type.GetType("System.Int32"));
|
||||
DT.Columns.Add("Cantidad", System.Type.GetType("System.Double"));
|
||||
DT.Columns.Add("CveUnidadMedida", System.Type.GetType("System.Int32"));
|
||||
DT.Columns.Add("CveUsuario",System.Type.GetType("System.Int32"));
|
||||
DT.Columns.Add("FechaIng",System.Type.GetType("System.DateTime"));
|
||||
DT.Columns.Add("CodigoPS", System.Type.GetType("System.String"));
|
||||
DT.Columns.Add("Abreviatura", System.Type.GetType("System.String"));
|
||||
|
||||
return DT;
|
||||
|
||||
}
|
||||
|
||||
private void CargaDatosRecoleccion()
|
||||
{
|
||||
ClsGenerales ObjGeneral = new ClsGenerales();
|
||||
if (ObjGeneral.GetInvEntregaAlmacenRuta(DdlSubProyecto.SelectedValue.ToEntero(), TxtFechaI.Text.ToDate(), TxtFechaF.Text.ToDate(), UsuarioActual.CveEmpresa, 2, 0))
|
||||
{
|
||||
GvDatosRecoleccion.DataSource = ObjGeneral.DtResultados;
|
||||
}
|
||||
ObjGeneral.Dispose();
|
||||
GvDatosRecoleccion.DataBind();
|
||||
UpDatosRecoleccion.Update();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void CargaDatosRecoleccionDetallePS()
|
||||
{
|
||||
if (CveEntregaAlmacen > 0)
|
||||
{
|
||||
ClsGenerales ObjGenerales = new ClsGenerales();
|
||||
|
||||
if (ObjGenerales.GetEntregaAlmacenRutaDetalle(CveEntregaAlmacen))
|
||||
{
|
||||
GvModalPSRecoleccion.DataSource = ObjGenerales.DtResultados;
|
||||
}else
|
||||
{
|
||||
GvModalPSRecoleccion.DataSource = null;
|
||||
}
|
||||
ObjGenerales.Dispose();
|
||||
}else
|
||||
{
|
||||
GvModalPSRecoleccion.DataSource = DTRecoleccion;
|
||||
}
|
||||
GvModalPSRecoleccion.DataBind();
|
||||
UpModalRecoleccion.Update();
|
||||
}
|
||||
|
||||
private void ModalRecoleccionCargaClientes()
|
||||
{
|
||||
ClsClientes ObjCliente = new ClsClientes();
|
||||
if (ObjCliente.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, 1))
|
||||
{
|
||||
DdlModalRecoleccionCliente.DataSource = ObjCliente.DtResultados;
|
||||
}
|
||||
|
||||
ObjCliente.Dispose();
|
||||
DdlModalRecoleccionCliente.DataBind();
|
||||
DdlModalRecoleccionCliente.Items.Insert(0, new ListItem("Seleccione uno", "-1"));
|
||||
}
|
||||
|
||||
protected void DdlModalRecoleccionCliente_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
ModalRecoleccionCargaDirecciones();
|
||||
}
|
||||
|
||||
private void ModalRecoleccionCargaDirecciones()
|
||||
{
|
||||
if(DdlModalRecoleccionCliente.SelectedValue.ToEntero() > 0)
|
||||
{
|
||||
ClsClientes ObjClientes = new ClsClientes();
|
||||
if (ObjClientes.DireccionEnvioGet(-1, DdlModalRecoleccionCliente.SelectedValue.ToEntero(), -1))
|
||||
{
|
||||
DdlmodalRecoleccionDirecion.DataSource = ObjClientes.DtResultados;
|
||||
}
|
||||
ObjClientes.Dispose();
|
||||
}
|
||||
else
|
||||
{
|
||||
DdlmodalRecoleccionDirecion.DataSource = null;
|
||||
}
|
||||
|
||||
DdlmodalRecoleccionDirecion.DataBind();
|
||||
DdlmodalRecoleccionDirecion.Items.Insert(0, new ListItem("Seleccione una", "-1"));
|
||||
|
||||
UpModalRecoleccion.Update();
|
||||
}
|
||||
|
||||
|
||||
protected void LnkAgregarRecoleccion_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
if (DdlChofer.SelectedValue.ToEntero() <= 0)
|
||||
{
|
||||
Alert("Debe seleccionar un chofer.", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
return;
|
||||
}
|
||||
|
||||
if (DdlUnidadCamion.SelectedValue.ToEntero() <= 0)
|
||||
{
|
||||
Alert("Debe seleccionar una unidad", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
LtlModalRecoleccionTitulo.Text = "Agregar Recoleccion";
|
||||
BtnModalRecoleccionGuardar.Text = "Agregar";
|
||||
|
||||
LimpiarModalRecoleccion();
|
||||
RegistraScript("$('#DivModalRecoleccion').modal('show');");
|
||||
CveEntregaAlmacen = -1;
|
||||
}
|
||||
|
||||
protected void LnkGvDatosRecoleccionEditar_Click(object sender, EventArgs e)
|
||||
{
|
||||
LinkButton LnkEliminar = (LinkButton)sender;
|
||||
GridViewRow GvRow = (GridViewRow)LnkEliminar.NamingContainer;
|
||||
|
||||
CveEntregaAlmacen = GvRow.DataKey("CveEntregaAlmacen").ToEntero();
|
||||
int CveDireccionOrigen = GvRow.DataKey("CveDireccionOrigen").ToEntero();
|
||||
int CveClienteEnvio = -1;
|
||||
ClsClientes ObjClientes = new ClsClientes();
|
||||
DataTable DtTempDirecciones = new DataTable();
|
||||
|
||||
if (ObjClientes.DireccionEnvioGet(CveDireccionOrigen, -1, -1))
|
||||
{
|
||||
CveClienteEnvio = ObjClientes.DtResultados.FiltroPrimeroValor("CveCliente").ToEntero();
|
||||
|
||||
if (ObjClientes.DireccionEnvioGet(-1, CveClienteEnvio, -1))
|
||||
{
|
||||
DdlmodalRecoleccionDirecion.DataSource = ObjClientes.DtResultados;
|
||||
}
|
||||
}
|
||||
ObjClientes.Dispose();
|
||||
|
||||
DdlmodalRecoleccionDirecion.DataBind();
|
||||
DdlmodalRecoleccionDirecion.Items.Add(new ListItem("Seleccione una", "-1"));
|
||||
DdlmodalRecoleccionDirecion.SelectedValueExist(CveDireccionOrigen);
|
||||
|
||||
DdlModalRecoleccionCliente.SelectedValueExist(CveClienteEnvio);
|
||||
|
||||
|
||||
CargaDatosRecoleccionDetallePS();
|
||||
|
||||
|
||||
LtlModalRecoleccionTitulo.Text = "Actualizar Recolección";
|
||||
BtnModalRecoleccionGuardar.Text = "Actualizar";
|
||||
UpModalRecoleccion.Update();
|
||||
|
||||
RegistraScript("$('#DivModalRecoleccion').modal('show');");
|
||||
}
|
||||
|
||||
private void LimpiarModalRecoleccion()
|
||||
{
|
||||
|
||||
DdlModalRecoleccionCliente.SelectedValueExist(-1);
|
||||
DdlmodalRecoleccionDirecion.SelectedValueExist(-1);
|
||||
TxtModalRecoleccionCantidad.Text = "";
|
||||
DdlModalRecoleccionUnidad.Items.Clear();
|
||||
DdlModalRecoleccionUnidad.Items.Add(new ListItem("Seleccione una","-1"));
|
||||
DdlProducto2.txtValue.Value = "";
|
||||
DdlProducto2.txtText.Value = "";
|
||||
|
||||
DTRecoleccion.Rows.Clear();
|
||||
GvModalPSRecoleccion.DataSource = DTRecoleccion;
|
||||
GvModalPSRecoleccion.DataBind();
|
||||
|
||||
|
||||
UpModalRecoleccion.Update();
|
||||
}
|
||||
|
||||
protected void DdlProducto_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
ElProductoChange();
|
||||
}
|
||||
|
||||
private void ElProductoChange()
|
||||
{
|
||||
DdlModalRecoleccionUnidad.Items.Clear();
|
||||
DdlModalRecoleccionUnidad.DataSource = get_GlobalDTProductosServiciosEquivalencias(DdlProducto2.SelectedValue.ToEntero(), -1, UsuarioActual.CveEmpresa);
|
||||
DdlModalRecoleccionUnidad.DataBind();
|
||||
UpModalRecoleccion.Update();
|
||||
}
|
||||
|
||||
protected void BtnModalRecoleccionGuardar_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
if (DdlChofer.SelectedValue.ToEntero() <= 0)
|
||||
{
|
||||
Alert("Debe seleccionar un chofer.", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
return;
|
||||
}
|
||||
|
||||
if (DdlUnidadCamion.SelectedValue.ToEntero() <= 0)
|
||||
{
|
||||
Alert("Debe seleccionar una unidad", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
int CveTimbrenuevo = -1;
|
||||
bool ProcesoOK = false;
|
||||
|
||||
|
||||
|
||||
|
||||
int CveSubProyectoCliente = get_GlobalDTCliente(UsuarioActual.CveEmpresa, -1, DdlModalRecoleccionCliente.SelectedValue.ToEntero()).FiltroPrimeroValor("CveSubProyecto").ToEntero();
|
||||
ClsGenerales ObjGenerales = new ClsGenerales();
|
||||
ObjGenerales.IniciaTransacSQL();
|
||||
|
||||
|
||||
|
||||
if( CveEntregaAlmacen == -1)
|
||||
{
|
||||
CveEntregaAlmacen = ObjGenerales.AddInvEntregaAlmacenRuta(CveSubProyectoCliente, -1, DdlmodalRecoleccionDirecion.SelectedValue.ToEntero(), -1, DdlChofer.SelectedValue.ToEntero(), DdlUnidadCamion.SelectedValue.ToEntero(), TxtFechaEntrega.Text.ToDate(), "R", 1,0);
|
||||
if (CveEntregaAlmacen > 0)
|
||||
{
|
||||
CveTimbrenuevo = ObjGenerales.AddGralTimbre("Tra", "-1", -1, "-1", new DateTime(1900, 01, 01), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, -1, ChkEmitirCartaPorte.Checked, CveEntregaAlmacen, CveSubProyectoCliente);
|
||||
|
||||
if (CveTimbrenuevo > 0)
|
||||
{
|
||||
foreach (DataRow dRow in DTRecoleccion.Rows)
|
||||
{
|
||||
if(ObjGenerales.AddEntregaAlmacenRutaDetalle(CveEntregaAlmacen,dRow["CvePS"].ToString().ToEntero(), dRow["Cantidad"].ToString().ToDecimal(),dRow["CveUnidadMedida"].ToString().ToEntero(), UsuarioActual.CveUsuario))
|
||||
{
|
||||
ProcesoOK = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
ProcesoOK = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if(ObjGenerales.UpdateInvEntregaAlmacenRuta(CveEntregaAlmacen,DdlmodalRecoleccionDirecion.SelectedValue.ToEntero(),-1, DdlChofer.SelectedValue.ToEntero(), DdlUnidadCamion.SelectedValue.ToEntero(),TxtFechaEntrega.Text.ToDate(), UsuarioActual.CveEmpresa))
|
||||
{
|
||||
ProcesoOK = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
ProcesoOK = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (ProcesoOK)
|
||||
{
|
||||
ObjGenerales.Commit();
|
||||
Alert("Recolección Guardada correctamente.");
|
||||
RegistraScript("$('#DivModalRecoleccion').modal('hide');");
|
||||
}
|
||||
else
|
||||
{
|
||||
ObjGenerales.RollBack();
|
||||
}
|
||||
|
||||
ObjGenerales.Dispose();
|
||||
CargaDatosRecoleccion();
|
||||
}
|
||||
|
||||
protected void LnkGvDatosRecoleccionEliminar_Click(object sender, EventArgs e)
|
||||
{
|
||||
LinkButton LnkEliminar = (LinkButton)sender;
|
||||
GridViewRow GvRow = (GridViewRow)LnkEliminar.NamingContainer;
|
||||
|
||||
int CveEntregaAlmacenEliminar = GvRow.DataKey("CveEntregaAlmacen").ToEntero();
|
||||
ClsGenerales ObjGenerales = new ClsGenerales();
|
||||
if (ObjGenerales.RemoveInvEntregaAlmacenRuta(CveEntregaAlmacenEliminar, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
Alert("Producto Eliminado correctamente.");
|
||||
}
|
||||
|
||||
ObjGenerales.Dispose();
|
||||
CargaDatosRecoleccion();
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
protected void LnkModalGvModalPSRecoleccionEliminar_Click(object sender, EventArgs e)
|
||||
{
|
||||
LinkButton LnkEliminar = (LinkButton)sender;
|
||||
GridViewRow GvRow = (GridViewRow)LnkEliminar.NamingContainer;
|
||||
|
||||
if (CveEntregaAlmacen > 0)
|
||||
{
|
||||
|
||||
|
||||
int CveEntregaAlmacenDetalleEliminar = GvRow.DataKey("CveEntregaAlmacenDetalle").ToEntero();
|
||||
ClsGenerales ObjGenerales = new ClsGenerales();
|
||||
|
||||
if (ObjGenerales.RemoveEntregaAlmacenRutaDetalle(CveEntregaAlmacenDetalleEliminar))
|
||||
{
|
||||
Alert("Recolección Eliminada correctamente.");
|
||||
}
|
||||
ObjGenerales.Dispose();
|
||||
}
|
||||
else
|
||||
{
|
||||
int DTIndex = GvRow.RowIndex;
|
||||
DTRecoleccion.Rows[DTIndex].Delete();
|
||||
DTRecoleccion.AcceptChanges();
|
||||
|
||||
}
|
||||
|
||||
CargaDatosRecoleccionDetallePS();
|
||||
}
|
||||
|
||||
protected void LnkModalAgregarPS_Click(object sender, EventArgs e)
|
||||
{
|
||||
if(CveEntregaAlmacen > 0)
|
||||
{
|
||||
ClsGenerales ObjGenerales = new ClsGenerales();
|
||||
|
||||
if(ObjGenerales.AddEntregaAlmacenRutaDetalle(CveEntregaAlmacen,DdlProducto2.SelectedValue.ToEntero(), TxtModalRecoleccionCantidad.Text.ToEntero(), DdlModalRecoleccionUnidad.SelectedValue.ToEntero(), UsuarioActual.CveUsuario))
|
||||
{
|
||||
|
||||
}
|
||||
ObjGenerales.Dispose();
|
||||
}
|
||||
else
|
||||
{
|
||||
DataRow dRow = DTRecoleccion.NewRow() ;
|
||||
|
||||
dRow["CveEntregaAlmacenDetalle"] = -1;
|
||||
dRow["CveEntregaAlmacen"] = CveEntregaAlmacen;
|
||||
dRow["CvePS"] = DdlProducto2.SelectedValue.ToEntero();
|
||||
dRow["Cantidad"] =TxtModalRecoleccionCantidad.Text.ToEntero();
|
||||
dRow["CveUnidadMedida"] = DdlModalRecoleccionUnidad.SelectedValue.ToEntero();
|
||||
dRow["CveUsuario"] =UsuarioActual.CveUsuario;
|
||||
dRow["FechaIng"] = DateTime.Now;
|
||||
dRow["CodigoPS"] = DdlProducto2.txtText.Value;
|
||||
dRow["Abreviatura"] =DdlModalRecoleccionUnidad.SelectedItem.Text;
|
||||
|
||||
DTRecoleccion.Rows.Add(dRow);
|
||||
//GvModalPSRecoleccion.DataSource = DTRecoleccion;
|
||||
}
|
||||
|
||||
LimpiarControlesPS();
|
||||
CargaDatosRecoleccionDetallePS();
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void LimpiarControlesPS()
|
||||
{
|
||||
TxtModalRecoleccionCantidad.Text = "";
|
||||
DdlModalRecoleccionUnidad.Items.Clear();
|
||||
DdlProducto2.txtText.Value = "";
|
||||
DdlProducto2.txtValue.Value = "";
|
||||
UpModalRecoleccion.Update();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
protected void Tab_ActiveTabChanged(object sender, EventArgs e)
|
||||
{
|
||||
if(Tab.ActiveTabIndex == 0)
|
||||
{
|
||||
SelecionEntrega = false;
|
||||
SeleccioanrGenrar();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
OcultarmostarDatosEntrega(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -75,23 +75,29 @@
|
||||
Reporte de Inventario Fisico
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkPDF" runat="server"><i class="fa fa-ad-pdf"></i> Imprimir PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Exportar a Excel Productos que Faltan </asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel2" runat="server"><i class="fa fa-ad-excel"></i> Exporta a Excel Productos que Sobran</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcelProdcutosCoinciden" runat="server"><i class="fa fa-ad-excel"></i> Exporta a Excel Productos Coincidentes</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server" id="UPAcciones" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkPDF" runat="server"><i class="fa fa-ad-pdf"></i> Imprimir PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Exportar a Excel Productos que Faltan </asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel2" runat="server"><i class="fa fa-ad-excel"></i> Exporta a Excel Productos que Sobran</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcelProdcutosCoinciden" runat="server"><i class="fa fa-ad-excel"></i> Exporta a Excel Productos Coincidentes</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkDescarExcelGrupos" runat="server"><i class="fa fa-ad-excel"></i> Exporta a Excel </asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="btnFin" runat="server" Text="Finalizar Inventario" data-toggle="confirmation" data-popout="true" data-original-title="Finalizar el inventario" data-btn-ok-label="si" />
|
||||
</li>
|
||||
@@ -104,6 +110,11 @@
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:AsyncPostBackTrigger ControlID="btnFin" />
|
||||
<asp:PostBackTrigger ControlID="LnkPDF" />
|
||||
<asp:PostBackTrigger ControlID="ImgExcel" />
|
||||
<asp:PostBackTrigger ControlID="ImgExcel2" />
|
||||
<asp:PostBackTrigger ControlID="ImgExcelProdcutosCoinciden" />
|
||||
<asp:PostBackTrigger ControlID="LnkDescarExcelGrupos" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -119,12 +130,22 @@
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">Ver por:</div>
|
||||
<div class="col-md-1">
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlGPO" CssClass="form-control select2me" runat="server" AppendDataBoundItems="true" Width="100%">
|
||||
<asp:ListItem Text="Detalle" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Cantidad" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Detallado Serie/Lote/Cad" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Cantidad" Value="2" Selected="True"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2 truncate">Vista de Resultados:</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlVista" CssClass="form-control select2me" runat="server" AppendDataBoundItems="true" Width="100%">
|
||||
<asp:ListItem Text="Detallado" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Agrupado" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -208,182 +229,282 @@
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
|
||||
<asp:UpdatePanel ID="UPAnomalias" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<label style="font-size: 16px"><b>Productos que Faltan</b></label>
|
||||
<div class="row">
|
||||
<div class="col-md-4" align="left" id="divRegistradosFaltan" runat="server">
|
||||
<asp:Label runat="server">Número de registros: <b><asp:Literal ID="LtlTotalRegistrosFaltan" runat="server"></asp:Literal></b></asp:Label>
|
||||
</div>
|
||||
<div class="col-md-8" align="right" id="DivBuscadorFaltan" runat="server">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvF.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvF.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<asp:GridView ID="GvF" data-sort="true" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD" Style="text-align: center;"
|
||||
GridLines="None" DataKeyNames="CvePS">
|
||||
<Columns>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>
|
||||
<asp:CheckBox ID="ChkAllFaltante" runat="server"/>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkPSFaltante" runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="#">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblC" runat="server" Font-Size="6pt"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Código Barras" DataField="CodigoBarras" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Sección Almacén" DataField="SeccionAlmacen"/>
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-HorizontalAlign="Left" DataFormatString="{0:d}" />
|
||||
<%--<asp:BoundField HeaderText="Existencia" DataField="CantidadAlmacen" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />--%>
|
||||
<asp:BoundField HeaderText="Existencia" DataField="CantidadReal" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Inv. Físico" DataField="CantidadInventarioFisico" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Diferencia" DataField="Diferencia" DataFormatString="{0:#,###.##}" ItemStyle-Font-Bold="true" />
|
||||
<asp:BoundField HeaderText="Costo" DataField="Costo" DataFormatString="{0:#,##0.00}" ItemStyle-HorizontalAlign="Right" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
|
||||
<asp:UpdatePanel ID="UpdateGvS" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<label style="font-size: 16px"><b>Productos que Sobran</b></label>
|
||||
<div class="row">
|
||||
<div class="col-md-4" align="left" id="divRegistradosSobran" runat="server">
|
||||
<asp:Label runat="server">Número de registros: <b><asp:Literal ID="LtlTotalRegistrosSobran" runat="server"></asp:Literal></b></asp:Label>
|
||||
</div>
|
||||
<div class="col-md-8" align="right" id="DivBuscadorSobran" runat="server">
|
||||
<input type="text" id="TxtBusqueda2" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvS.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvS.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<asp:GridView ID="GvS" data-sort="true" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD" Style="text-align: center;" GridLines="None" DataKeyNames="CvePS">
|
||||
<Columns>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>
|
||||
<asp:CheckBox ID="ChkAllSobrante" runat="server"/>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkPSSobrante" runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="#">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblC" runat="server" Font-Size="6pt"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Código Barras" DataField="CodigoBarras" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Sección Almacén" DataField="SeccionAlmacen"/>
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-HorizontalAlign="Left" DataFormatString="{0:d}" />
|
||||
<asp:BoundField HeaderText="Existencia" DataField="CantidadReal" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Inv. Físico" DataField="CantidadInventarioFisico" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Diferencia" DataField="Diferencia" DataFormatString="{0:#,###.##}" ItemStyle-Font-Bold="true" />
|
||||
<asp:BoundField HeaderText="Costo" DataField="Costo" DataFormatString="{0:#,##0.00}" ItemStyle-HorizontalAlign="Right" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<label style="font-size: 16px"><b>Productos Coincidentes</b></label>
|
||||
<div class="row">
|
||||
<div class="col-md-4" align="left" id="div1" runat="server">
|
||||
<asp:Label runat="server">Número de registros: <b><asp:Literal ID="LtlCoincidentes" runat="server"></asp:Literal></b></asp:Label>
|
||||
<asp:UpdatePanel runat="server" ID="UpGeneral" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div runat="server" id="DVNormal">
|
||||
<asp:UpdatePanel ID="UPAnomalias" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<label style="font-size: 16px"><b>Productos que Faltan</b></label>
|
||||
<div class="row">
|
||||
<div class="col-md-4" align="left" id="divRegistradosFaltan" runat="server">
|
||||
<asp:Label runat="server">Número de registros: <b>
|
||||
<asp:Literal ID="LtlTotalRegistrosFaltan" runat="server"></asp:Literal></b></asp:Label>
|
||||
</div>
|
||||
<div class="col-md-8" align="right" id="DivBuscadorFaltan" runat="server">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvF.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvF.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-8" align="right" id="divRegistradosCoinciden" runat="server">
|
||||
<input type="text" id="TxtBusqueda3" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda3','{0}')", GvC.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda3','{0}')", GvS.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
<asp:GridView ID="GvF" data-sort="true" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD" Style="text-align: center;"
|
||||
GridLines="None" DataKeyNames="CvePS">
|
||||
<Columns>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>
|
||||
<asp:CheckBox ID="ChkAllFaltante" runat="server" />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkPSFaltante" runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="#">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblC" runat="server" Font-Size="6pt"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Proveedor" DataField="NombreComercial" ItemStyle-HorizontalAlign="Left" Visible="false" />
|
||||
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Sección Almacén" DataField="SeccionAlmacen" />
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-HorizontalAlign="Left" DataFormatString="{0:d}" />
|
||||
<asp:BoundField HeaderText="Existencia" DataField="CantidadAlmacen" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="U. Medida" DataField="Abreviatura" ItemStyle-HorizontalAlign="Left" />
|
||||
|
||||
<asp:BoundField HeaderText="Buen Estado" DataField="BuenEstado" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="ME.Vendible" DataField="MalEstado" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="ME.No vendible" DataField="NoVendible" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
<%--<asp:BoundField HeaderText="Existencia" DataField="CantidadReal" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />--%>
|
||||
<asp:BoundField HeaderText="Inv. Físico" DataField="CantidadInventarioFisico" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Diferencia" DataField="Diferencia" DataFormatString="{0:#,###.##}" ItemStyle-Font-Bold="true" />
|
||||
<asp:BoundField HeaderText="Costo" DataField="Costo" DataFormatString="{0:#,##0.00}" ItemStyle-HorizontalAlign="Right" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
|
||||
<asp:UpdatePanel ID="UpdateGvS" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<label style="font-size: 16px"><b>Productos que Sobran</b></label>
|
||||
<div class="row">
|
||||
<div class="col-md-4" align="left" id="divRegistradosSobran" runat="server">
|
||||
<asp:Label runat="server">Número de registros: <b>
|
||||
<asp:Literal ID="LtlTotalRegistrosSobran" runat="server"></asp:Literal></b></asp:Label>
|
||||
</div>
|
||||
<div class="col-md-8" align="right" id="DivBuscadorSobran" runat="server">
|
||||
<input type="text" id="TxtBusqueda2" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvS.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvS.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<asp:GridView ID="GvS" data-sort="true" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD" Style="text-align: center;" GridLines="None" DataKeyNames="CvePS">
|
||||
<Columns>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>
|
||||
<asp:CheckBox ID="ChkAllSobrante" runat="server" />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkPSSobrante" runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="#">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblC" runat="server" Font-Size="6pt"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Proveedor" DataField="NombreComercial" ItemStyle-HorizontalAlign="Left" Visible="false" />
|
||||
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Sección Almacén" DataField="SeccionAlmacen" />
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-HorizontalAlign="Left" DataFormatString="{0:d}" />
|
||||
<asp:BoundField HeaderText="Existencia" DataField="CantidadAlmacen" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="U. Medida" DataField="Abreviatura" ItemStyle-HorizontalAlign="Left" />
|
||||
|
||||
<asp:BoundField HeaderText="Buen Estado" DataField="BuenEstado" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="ME.Vendible" DataField="MalEstado" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="ME.No vendible" DataField="NoVendible" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
<%--<asp:BoundField HeaderText="Existencia" DataField="CantidadReal" ItemStyle-HorizontalAlign="Right" />--%>
|
||||
<asp:BoundField HeaderText="Inv. Físico" DataField="CantidadInventarioFisico" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Diferencia" DataField="Diferencia" DataFormatString="{0:#,###.##}" ItemStyle-Font-Bold="true" />
|
||||
<asp:BoundField HeaderText="Costo" DataField="Costo" DataFormatString="{0:#,##0.00}" ItemStyle-HorizontalAlign="Right" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<label style="font-size: 16px"><b>Productos Coincidentes</b></label>
|
||||
<div class="row">
|
||||
<div class="col-md-4" align="left" id="div1" runat="server">
|
||||
<asp:Label runat="server">Número de registros: <b>
|
||||
<asp:Literal ID="LtlCoincidentes" runat="server"></asp:Literal></b></asp:Label>
|
||||
</div>
|
||||
<div class="col-md-8" align="right" id="divRegistradosCoinciden" runat="server">
|
||||
<input type="text" id="TxtBusqueda3" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda3','{0}')", GvC.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda3','{0}')", GvS.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<asp:GridView ID="GvC" data-sort="true" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD" Style="text-align: center;" GridLines="None" DataKeyNames="CvePS">
|
||||
<Columns>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="#">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblC" runat="server" Font-Size="6pt"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Proveedor" DataField="NombreComercial" ItemStyle-HorizontalAlign="Left" Visible="false" />
|
||||
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Sección Almacén" DataField="SeccionAlmacen" />
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-HorizontalAlign="Left" DataFormatString="{0:d}" />
|
||||
<asp:BoundField HeaderText="Existencia" DataField="CantidadAlmacen" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="U. Medida" DataField="Abreviatura" ItemStyle-HorizontalAlign="Left" />
|
||||
|
||||
<asp:BoundField HeaderText="Buen Estado" DataField="BuenEstado" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="ME.Vendible" DataField="MalEstado" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="ME.No vendible" DataField="NoVendible" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
<%--<asp:BoundField HeaderText="Existencia" DataField="CantidadReal" ItemStyle-HorizontalAlign="Right" />--%>
|
||||
<asp:BoundField HeaderText="Inv. Físico" DataField="CantidadInventarioFisico" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Diferencia" DataField="Diferencia" DataFormatString="{0:#,###.##}" ItemStyle-Font-Bold="true" />
|
||||
<asp:BoundField HeaderText="Costo" DataField="Costo" DataFormatString="{0:#,##0.00}" ItemStyle-HorizontalAlign="Right" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
|
||||
<div id="ModalGuardar" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog modal-sm">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Guardar Nuevo Inventario Físico</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel runat="server" ID="UpFecha" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtTitulo" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTitulos" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtTitulo" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Titulo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtTitulo.ClientID.ToString()%>">Titulo:</label>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnCrear" runat="server" ClientIDMode="Static" Text="Crear" CssClass="btn btn-primary" ValidationGroup="Actualiza" />
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<asp:GridView ID="GvC" data-sort="true" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD" Style="text-align: center;" GridLines="None" DataKeyNames="CvePS">
|
||||
<Columns>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>
|
||||
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="#">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblC" runat="server" Font-Size="6pt"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Código Barras" DataField="CodigoBarras" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Sección Almacén" DataField="SeccionAlmacen"/>
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-HorizontalAlign="Left" DataFormatString="{0:d}" />
|
||||
<asp:BoundField HeaderText="Existencia" DataField="CantidadReal" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Inv. Físico" DataField="CantidadInventarioFisico" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Diferencia" DataField="Diferencia" DataFormatString="{0:#,###.##}" ItemStyle-Font-Bold="true" />
|
||||
<asp:BoundField HeaderText="Costo" DataField="Costo" DataFormatString="{0:#,##0.00}" ItemStyle-HorizontalAlign="Right" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
<div runat="server" id="DVGrupos" visible="false">
|
||||
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2" align="left" id="DV1" runat="server">
|
||||
<asp:Label runat="server" ID="LblGrupos1">Registros Productos que Faltan: <b>
|
||||
<asp:Literal ID="LtlGrupos1" runat="server"></asp:Literal></b></asp:Label>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2" align="left" id="DV2" runat="server">
|
||||
<asp:Label runat="server" ID="LblGrupos2">Registros Productos que Sobran: <b>
|
||||
<asp:Literal ID="LtlGrupos2" runat="server"></asp:Literal></b></asp:Label>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2" align="left" id="DV3" runat="server">
|
||||
<asp:Label runat="server" ID="LblGrupos3">Registros Productos Coincidentes: <b>
|
||||
<asp:Literal ID="LtlGrupos3" runat="server"></asp:Literal></b></asp:Label>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6" align="right" id="DV4" runat="server">
|
||||
<input type="text" id="TxtBusqueda4" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda4','{0}')", GvGrupos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda4','{0}')", GvGrupos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<asp:GridView ID="GvGrupos" data-sort="true" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD" Style="text-align: center;"
|
||||
GridLines="None" DataKeyNames="CvePS,PS,Grupo,Orden">
|
||||
<Columns>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>
|
||||
<asp:CheckBox ID="ChkAllFaltante" runat="server" />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkPSFaltante" runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Proveedor" DataField="NombreComercial" ItemStyle-HorizontalAlign="Left" Visible="false" />
|
||||
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Sección Almacén" DataField="SeccionAlmacen" />
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-HorizontalAlign="Left" DataFormatString="{0:d}" />
|
||||
<asp:BoundField HeaderText="Existencia" DataField="CantidadAlmacen" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="U. Medida" DataField="Abreviatura" ItemStyle-HorizontalAlign="Left" />
|
||||
|
||||
<asp:BoundField HeaderText="Buen Estado" DataField="BuenEstado" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="ME.Vendible" DataField="MalEstado" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="ME.No vendible" DataField="NoVendible" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
<asp:BoundField HeaderText="Inv. Físico" DataField="CantidadInventarioFisico" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Diferencia" DataField="Diferencia" DataFormatString="{0:#,###.##}" ItemStyle-Font-Bold="true" />
|
||||
<asp:BoundField HeaderText="Costo" DataField="Costo" DataFormatString="{0:#,##0.00}" ItemStyle-HorizontalAlign="Right" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
|
||||
|
||||
<div id="ModalGuardar" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog modal-sm">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Guardar Nuevo Inventario Físico</h4>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel runat="server" ID="UpFecha" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtTitulo" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTitulos" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtTitulo" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Titulo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtTitulo.ClientID.ToString()%>">Titulo:</label>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnCrear" runat="server" ClientIDMode="Static" Text="Crear" CssClass="btn btn-primary" ValidationGroup="Actualiza" />
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
|
||||
@@ -83,6 +83,18 @@ Partial Class Inventarios_RepAnomalias
|
||||
Dim Inventario As New ClsInventarios
|
||||
Dim dt As DataTable = Nothing
|
||||
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(119, 158) Then
|
||||
GvF.Columns(2).Visible = True 'proveedor
|
||||
GvS.Columns(2).Visible = True 'proveedor
|
||||
GvC.Columns(2).Visible = True 'proveedor
|
||||
GvF.Columns(16).Visible = UsuarioActual.Procesos(201) 'costo
|
||||
GvS.Columns(16).Visible = UsuarioActual.Procesos(201) 'costo
|
||||
GvC.Columns(16).Visible = UsuarioActual.Procesos(201) 'costo
|
||||
GvGrupos.Columns(1).Visible = True 'proveedor
|
||||
GvGrupos.Columns(15).Visible = UsuarioActual.Procesos(201) 'costo
|
||||
End If
|
||||
|
||||
If Inventario.GetInventarioFisico(CveInventarioFisico, UsuarioActual.CveEmpresa, -1, -1) Then
|
||||
lbTitulo.Text = Inventario.InventarioFisico
|
||||
lbObservaciones.Text = Inventario.Observaciones
|
||||
@@ -97,11 +109,11 @@ Partial Class Inventarios_RepAnomalias
|
||||
End If
|
||||
|
||||
If EsAvance Then
|
||||
If Inventario.GetInventarioFisicoResultadosAvance(CveInventarioFisico, UsuarioActual.CveEmpresa, DdlGPO.SelectedValue.ToString.ToEntero) Then
|
||||
If Inventario.GetInventarioFisicoResultadosAvance(CveInventarioFisico, UsuarioActual.CveEmpresa, DdlGPO.SelectedValue.ToString.ToEntero, DdlVista.SelectedValue.ToEntero) Then
|
||||
dt = Inventario.DtResultados
|
||||
End If
|
||||
Else
|
||||
If Inventario.GetInventarioFisicoResultados(CveInventarioFisico, UsuarioActual.CveEmpresa, DdlGPO.SelectedValue.ToString.ToEntero) Then
|
||||
If Inventario.GetInventarioFisicoResultados(CveInventarioFisico, UsuarioActual.CveEmpresa, DdlGPO.SelectedValue.ToString.ToEntero, DdlVista.SelectedValue.ToEntero) Then
|
||||
dt = Inventario.DtResultados
|
||||
End If
|
||||
End If
|
||||
@@ -189,61 +201,132 @@ Partial Class Inventarios_RepAnomalias
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
Inventario.Dispose()
|
||||
|
||||
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvS.Columns(8).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvF.Columns(8).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvC.Columns(8).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||
|
||||
If DdlVista.SelectedValue.ToEntero = 1 Then
|
||||
|
||||
DVNormal.Visible = True
|
||||
DVGrupos.Visible = False
|
||||
|
||||
LnkPDF.Visible = True
|
||||
ImgExcel.Visible = True
|
||||
ImgExcel2.Visible = True
|
||||
ImgExcelProdcutosCoinciden.Visible = True
|
||||
LnkDescarExcelGrupos.Visible = False
|
||||
|
||||
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvS.Columns(8).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvF.Columns(8).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvC.Columns(8).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||
|
||||
GvS.DataSource = dt.FiltraParametros("Diferencia < 0")
|
||||
Dim DtS As DataTable = dt.FiltraParametros("Diferencia < 0")
|
||||
BanderaSerieLoteCad(GvS, DtS)
|
||||
GvS.DataBind()
|
||||
|
||||
GvF.DataSource = dt.FiltraParametros("Diferencia > 0")
|
||||
Dim DtF As DataTable = dt.FiltraParametros("Diferencia > 0")
|
||||
BanderaSerieLoteCad(GvF, DtF)
|
||||
GvF.DataBind()
|
||||
|
||||
Dim DtC As DataTable = dt.FiltraParametros("Diferencia = 0")
|
||||
GvC.DataSource = DtC
|
||||
BanderaSerieLoteCad(GvC, DtC)
|
||||
GvC.DataBind()
|
||||
|
||||
If (GvF.Rows.Count > 0) Then
|
||||
GvF.UseAccessibleHeader = True
|
||||
GvF.HeaderRow.TableSection = TableRowSection.TableHeader
|
||||
|
||||
divRegistradosFaltan.Visible = True
|
||||
LtlTotalRegistrosFaltan.Text = GvF.Rows.Count.ToString
|
||||
End If
|
||||
|
||||
If (GvS.Rows.Count > 0) Then
|
||||
GvS.UseAccessibleHeader = True
|
||||
GvS.HeaderRow.TableSection = TableRowSection.TableHeader
|
||||
|
||||
divRegistradosSobran.Visible = True
|
||||
LtlTotalRegistrosSobran.Text = GvS.Rows.Count.ToString
|
||||
End If
|
||||
|
||||
If (GvC.Rows.Count > 0) Then
|
||||
GvC.UseAccessibleHeader = True
|
||||
GvC.HeaderRow.TableSection = TableRowSection.TableHeader
|
||||
|
||||
divRegistradosCoinciden.Visible = True
|
||||
LtlCoincidentes.Text = GvC.Rows.Count.ToString
|
||||
End If
|
||||
|
||||
PSIguales()
|
||||
|
||||
|
||||
UPAnomalias.Update()
|
||||
UpdateGvS.Update()
|
||||
UPDatos.Update()
|
||||
|
||||
GvS.DataSource = dt.FiltraParametros("Diferencia < 0")
|
||||
Dim DtS As DataTable = dt.FiltraParametros("Diferencia < 0")
|
||||
GvS.DataBind()
|
||||
BanderaSerieLoteCad(GvS, DtS)
|
||||
Else
|
||||
DVNormal.Visible = False
|
||||
DVGrupos.Visible = True
|
||||
|
||||
GvF.DataSource = dt.FiltraParametros("Diferencia > 0")
|
||||
Dim DtF As DataTable = dt.FiltraParametros("Diferencia > 0")
|
||||
GvF.DataBind()
|
||||
BanderaSerieLoteCad(GvF, DtF)
|
||||
If DdlGPO.SelectedValue.ToEntero = 2 Then
|
||||
GvGrupos.Columns(4).Visible = False
|
||||
GvGrupos.Columns(5).Visible = False
|
||||
GvGrupos.Columns(6).Visible = False
|
||||
GvGrupos.Columns(7).Visible = False
|
||||
Else
|
||||
GvGrupos.Columns(4).Visible = True
|
||||
GvGrupos.Columns(5).Visible = True
|
||||
GvGrupos.Columns(6).Visible = True
|
||||
GvGrupos.Columns(7).Visible = True
|
||||
End If
|
||||
|
||||
Dim DtC As DataTable = dt.FiltraParametros("Diferencia = 0")
|
||||
GvC.DataSource = DtC
|
||||
GvC.DataBind()
|
||||
BanderaSerieLoteCad(GvC, DtC)
|
||||
If DdlGPO.SelectedValue.ToEntero = 2 Then
|
||||
LtlGrupos1.Visible = False
|
||||
LtlGrupos2.Visible = False
|
||||
LtlGrupos3.Visible = False
|
||||
|
||||
Dim Script = ""
|
||||
If (GvF.Rows.Count > 0) Then
|
||||
GvF.UseAccessibleHeader = True
|
||||
GvF.HeaderRow.TableSection = TableRowSection.TableHeader
|
||||
LblGrupos1.Visible = False
|
||||
LblGrupos2.Visible = False
|
||||
LblGrupos3.Visible = False
|
||||
|
||||
divRegistradosFaltan.Visible = True
|
||||
LtlTotalRegistrosFaltan.Text = GvF.Rows.Count.ToString
|
||||
Else
|
||||
|
||||
LtlGrupos1.Visible = True
|
||||
LtlGrupos2.Visible = True
|
||||
LtlGrupos3.Visible = True
|
||||
|
||||
LblGrupos1.Visible = True
|
||||
LblGrupos2.Visible = True
|
||||
LblGrupos3.Visible = True
|
||||
|
||||
End If
|
||||
|
||||
UpGeneral.Update()
|
||||
|
||||
LnkPDF.Visible = False
|
||||
ImgExcel.Visible = False
|
||||
ImgExcel2.Visible = False
|
||||
ImgExcelProdcutosCoinciden.Visible = False
|
||||
LnkDescarExcelGrupos.Visible = True
|
||||
|
||||
GvGrupos.DataSource = dt.FiltraParametros("CvePS > 0")
|
||||
GvGrupos.DataBind()
|
||||
|
||||
LtlGrupos1.Text = dt.FiltraParametros("Orden = 1 and CvePS > 0").Rows.Count.ToString
|
||||
LtlGrupos2.Text = dt.FiltraParametros("Orden = 2 and CvePS > 0").Rows.Count.ToString
|
||||
LtlGrupos3.Text = dt.FiltraParametros("Orden = 3 and CvePS > 0").Rows.Count.ToString
|
||||
|
||||
If DdlGPO.SelectedValue.ToEntero = 1 Then
|
||||
PSIguales()
|
||||
End If
|
||||
End If
|
||||
UpGeneral.Update()
|
||||
UPAcciones.Update()
|
||||
|
||||
If (GvS.Rows.Count > 0) Then
|
||||
GvS.UseAccessibleHeader = True
|
||||
GvS.HeaderRow.TableSection = TableRowSection.TableHeader
|
||||
|
||||
divRegistradosSobran.Visible = True
|
||||
LtlTotalRegistrosSobran.Text = GvS.Rows.Count.ToString
|
||||
End If
|
||||
|
||||
If (GvC.Rows.Count > 0) Then
|
||||
GvC.UseAccessibleHeader = True
|
||||
GvC.HeaderRow.TableSection = TableRowSection.TableHeader
|
||||
|
||||
divRegistradosCoinciden.Visible = True
|
||||
LtlCoincidentes.Text = GvC.Rows.Count.ToString
|
||||
End If
|
||||
|
||||
PSIguales()
|
||||
RegistraScript(Script)
|
||||
|
||||
UPAnomalias.Update()
|
||||
UpdateGvS.Update()
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -274,6 +357,7 @@ Partial Class Inventarios_RepAnomalias
|
||||
|
||||
|
||||
Protected Sub GVF_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvF.RowDataBound
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("Costo") = "-1" Then
|
||||
e.Row.Cells(8).Text = "0"
|
||||
@@ -288,10 +372,12 @@ Partial Class Inventarios_RepAnomalias
|
||||
e.Row.FCCheckBox("ChkAllFaltante").Attributes.Add("onclick", "SeleccionarTodosFaltante(this);")
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub GVS_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvS.RowDataBound
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("Costo") = "-1" Then
|
||||
e.Row.Cells(8).Text = "0"
|
||||
@@ -306,6 +392,7 @@ Partial Class Inventarios_RepAnomalias
|
||||
e.Row.FCCheckBox("ChkAllSobrante").Attributes.Add("onclick", "SeleccionarTodosSobrante(this);")
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
#Region " IMPRIMIR "
|
||||
@@ -373,17 +460,48 @@ Partial Class Inventarios_RepAnomalias
|
||||
End Function
|
||||
|
||||
Private Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
GvF.ExportToExcel("Reporte de Inventario Fisico - Productos que Faltan " & Now.ToShortDateString)
|
||||
|
||||
|
||||
Dim GvTemp As GridView = GvF
|
||||
|
||||
For Each GvRow As GridViewRow In GvTemp.Rows
|
||||
GvRow.BackColor = Drawing.ColorTranslator.FromHtml("white")
|
||||
Next
|
||||
|
||||
'GvF.ExportToExcel("Reporte de Inventario Fisico - Productos que Faltan " & Now.ToShortDateString)
|
||||
GvTemp.ExportToExcel("Reporte de Inventario Fisico - Productos que Faltan " & Now.ToShortDateString)
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub ImgExcel2_Click(sender As Object, e As EventArgs) Handles ImgExcel2.Click
|
||||
GvS.ExportToExcel("Reporte de Inventario Fisico - Productos que Sobran " & Now.ToShortDateString)
|
||||
Dim GvTemp As GridView = GvS
|
||||
|
||||
For Each GvRow As GridViewRow In GvTemp.Rows
|
||||
GvRow.BackColor = Drawing.ColorTranslator.FromHtml("white")
|
||||
Next
|
||||
|
||||
'GvS.ExportToExcel("Reporte de Inventario Fisico - Productos que Sobran " & Now.ToShortDateString)
|
||||
GvTemp.ExportToExcel("Reporte de Inventario Fisico - Productos que Sobran " & Now.ToShortDateString)
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub ImgExcelProdcutosCoinciden_Click(sender As Object, e As EventArgs) Handles ImgExcelProdcutosCoinciden.Click
|
||||
GvC.ExportToExcel("Reporte de Inventario Fisico - Productos Coincidentes " & Now.ToShortDateString)
|
||||
Dim GvTemp As GridView = GvC
|
||||
|
||||
For Each GvRow As GridViewRow In GvTemp.Rows
|
||||
GvRow.BackColor = Drawing.ColorTranslator.FromHtml("white")
|
||||
Next
|
||||
'GvC.ExportToExcel("Reporte de Inventario Fisico - Productos Coincidentes " & Now.ToShortDateString)
|
||||
GvTemp.ExportToExcel("Reporte de Inventario Fisico - Productos Coincidentes " & Now.ToShortDateString)
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub LnkDescarExcelGrupos_Click(sender As Object, e As EventArgs) Handles LnkDescarExcelGrupos.Click
|
||||
Dim Filtros As String = "Almacenes:aASDSAF|Clasificaciones:sdfasf|Fecha:12/12/2323"
|
||||
GvGrupos.ExportToExcelGembox("Reporte de Inventario Fisico" & Now.ToShortDateString, UsuarioActual, "Inventario:" & lbTitulo.Text, "", DatosFiltros:=Filtros)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
@@ -531,20 +649,66 @@ Partial Class Inventarios_RepAnomalias
|
||||
Private Sub PSIguales()
|
||||
Dim contadorF As Integer = 0
|
||||
Dim contadorS As Integer = 0
|
||||
For Each dtF As GridViewRow In GvF.Rows
|
||||
contadorS = 0
|
||||
For Each dtS As GridViewRow In GvS.Rows
|
||||
If dtS.DataKey("CvePS") = dtF.DataKey("CvePS") Then
|
||||
GvS.Rows(contadorS).BackColor = Drawing.Color.FromArgb(202, 52, 52)
|
||||
GvF.Rows(contadorF).BackColor = Drawing.Color.FromArgb(202, 52, 52)
|
||||
End If
|
||||
contadorS += 1
|
||||
|
||||
If DdlVista.SelectedValue.ToEntero = 1 Then
|
||||
For Each dtF As GridViewRow In GvF.Rows
|
||||
contadorS = 0
|
||||
For Each dtS As GridViewRow In GvS.Rows
|
||||
If dtS.DataKey("CvePS") = dtF.DataKey("CvePS") Then
|
||||
GvS.Rows(contadorS).BackColor = Drawing.Color.FromArgb(202, 52, 52)
|
||||
GvF.Rows(contadorF).BackColor = Drawing.Color.FromArgb(202, 52, 52)
|
||||
End If
|
||||
contadorS += 1
|
||||
Next
|
||||
contadorF += 1
|
||||
Next
|
||||
contadorF += 1
|
||||
Next
|
||||
Else
|
||||
|
||||
|
||||
For Each dtF As GridViewRow In GvGrupos.Rows
|
||||
contadorS = 0
|
||||
|
||||
If dtF.DataKey("Orden").ToEntero = 1 And dtF.DataKey("CvePS").ToEntero > 0 Then
|
||||
For Each dtS As GridViewRow In GvGrupos.Rows
|
||||
If dtS.DataKey("Orden").ToEntero = 2 Then
|
||||
|
||||
If dtS.DataKey("CvePS") = dtF.DataKey("CvePS") Then
|
||||
GvGrupos.Rows(contadorS).BackColor = Drawing.Color.FromArgb(202, 52, 52)
|
||||
GvGrupos.Rows(contadorF).BackColor = Drawing.Color.FromArgb(202, 52, 52)
|
||||
End If
|
||||
|
||||
End If
|
||||
contadorS += 1
|
||||
Next
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
contadorF += 1
|
||||
|
||||
Next
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub GvGrupos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvGrupos.RowDataBound
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DataKey("CvePS").ToString.ToEntero = 0 Then
|
||||
|
||||
|
||||
e.Row.CssClass = "SubTotales"
|
||||
e.Row.Cells(1).Text = e.Row.DataKey("Grupo").ToString
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -1178,25 +1178,28 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
If Not ErrorMovInv Then
|
||||
|
||||
If ChkEmitirTimbrado.Checked Then
|
||||
|
||||
Dim ObjGral As New ClsGenerales(ObjInventario.IniciaTransacSQL)
|
||||
Dim CveSubProyectoTimbre As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveAlmacen = {DdlAlmacenOrigen.SelectedValue}").Rows(0)("CveSubProyecto").ToString.ToEntero
|
||||
|
||||
CveTimbre = ObjGral.AddGralTimbre("Tra", "-1", -1, "", MinFecha, -1, CveMovimientoSalida, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, -1, ChkEmitirCartaPorte.Checked, CveSubProyectoTimbre, -1, -1, DdlChofer.SelectedValue.ToEntero, DdlUnidadCamion.SelectedValue.ToEntero, TxtFechaEntrega.Text.ToDateTime)
|
||||
Dim CveEntregaAlmacen As Integer = ObjGral.AddInvEntregaAlmacenRuta(CveSubProyectoTimbre, CveMovimientoSalida, -1, -1, DdlChofer.SelectedValue.ToEntero, DdlUnidadCamion.SelectedValue.ToEntero, TxtFechaEntrega.Text.ToDate, "T", -1)
|
||||
|
||||
If CveTimbre > 0 Then
|
||||
SerieInsertadaTimbre = ObjGral.SerieInsertada
|
||||
FolioInsertadoTimbre = ObjGral.FolioInsertado
|
||||
If CveEntregaAlmacen > 0 Then
|
||||
CveTimbre = ObjGral.AddGralTimbre("Tra", "-1", -1, "", MinFecha, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, -1, ChkEmitirCartaPorte.Checked, CveEntregaAlmacen, CveSubProyectoTimbre)
|
||||
|
||||
If CveTimbre > 0 Then
|
||||
SerieInsertadaTimbre = ObjGral.SerieInsertada
|
||||
FolioInsertadoTimbre = ObjGral.FolioInsertado
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If Not ErrorMovInv Then
|
||||
DtTraslado = DtMovimientos.Copy
|
||||
|
||||
@@ -1218,7 +1221,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
If ChkEmitirTimbrado.Checked Then
|
||||
CveMovimientoTimbrado = CveMovimientoSalida
|
||||
Timbrar(CveTimbre, CveMovimientoTimbrado)
|
||||
'Timbrar(CveTimbre, CveMovimientoTimbrado)
|
||||
End If
|
||||
|
||||
Alert(MensajeAlert.ToString, TipoMensaje.MsgInformacion, "")
|
||||
@@ -2150,7 +2153,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Dim FolioVirtualEntrada As Integer = 0
|
||||
If RealizarMovimientoVirtual Then
|
||||
|
||||
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacenRecepcion.SelectedValue.ToEntero).FiltroPrimeroValor("CveAlmacenVirtual", "").ToEntero()
|
||||
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacenEntrada).FiltroPrimeroValor("CveAlmacenVirtual", "").ToEntero()
|
||||
|
||||
If CveAlmacenVirtual > 0 Then
|
||||
|
||||
@@ -2821,13 +2824,13 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Dim Dr As DataRow = DtCamiones.FiltroPrimero(String.Format("CveCamion= {0}", DdlUnidadCamion.SelectedValue))
|
||||
|
||||
If Dr IsNot Nothing Then
|
||||
CartaPorte.FiguraTransporte.AutoTransporteFederal.PermSCT = Dr("ClaveTipoPermisoSCT").ToString '"TPAF01"
|
||||
CartaPorte.FiguraTransporte.AutoTransporteFederal.NumPermisoSCT = Dr("NumPermisoSCT").ToString
|
||||
CartaPorte.FiguraTransporte.AutoTransporteFederal.NombreAseg = Dr("NombreAseguradora").ToString
|
||||
CartaPorte.FiguraTransporte.AutoTransporteFederal.NumPolizaSeguro = Dr("NumPolizaSeguro").ToString
|
||||
CartaPorte.FiguraTransporte.AutoTransporteFederal.Vehiculo.ConfigVehicular = Dr("ConfigCartaPorte").ToString '"C2"
|
||||
CartaPorte.FiguraTransporte.AutoTransporteFederal.Vehiculo.PlacaVM = Dr("Placa").ToString
|
||||
CartaPorte.FiguraTransporte.AutoTransporteFederal.Vehiculo.AnioModeloVM = Dr("Anio").ToString.ToEntero
|
||||
CartaPorte.FiguraTransporte.AutoTransporte.PermSCT = Dr("ClaveTipoPermisoSCT").ToString '"TPAF01"
|
||||
CartaPorte.FiguraTransporte.AutoTransporte.NumPermisoSCT = Dr("NumPermisoSCT").ToString
|
||||
'CartaPorte.FiguraTransporte.AutoTransporte.NombreAseg = Dr("NombreAseguradora").ToString
|
||||
'CartaPorte.FiguraTransporte.AutoTransporte.NumPolizaSeguro = Dr("NumPolizaSeguro").ToString
|
||||
CartaPorte.FiguraTransporte.AutoTransporte.Vehiculo.ConfigVehicular = Dr("ConfigCartaPorte").ToString '"C2"
|
||||
CartaPorte.FiguraTransporte.AutoTransporte.Vehiculo.PlacaVM = Dr("Placa").ToString
|
||||
CartaPorte.FiguraTransporte.AutoTransporte.Vehiculo.AnioModeloVM = Dr("Anio").ToString.ToEntero
|
||||
End If
|
||||
|
||||
Dim CveSubProyectoOrigen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacenOrigen.SelectedValue.ToEntero).FiltroPrimeroValor("CveSubProyecto", "").ToEntero
|
||||
@@ -2858,17 +2861,17 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
.Localidad = ""} ' drr("Localidad").ToString}
|
||||
End If
|
||||
|
||||
Dim Ubica As New CFDICartaPorteUbicaciones
|
||||
Dim Ubica As New CFDICartaPorteUbicacion
|
||||
Ubica.TipoEstacion = ""
|
||||
Ubica.DistanciaRecorridaDestino = 1
|
||||
Ubica.Origen = New CFDICartaPorteUbicacionOrigen With {.RFCRemitente = "",'UsuarioActual.Empresa.RFC,
|
||||
.FechaHoraSalida = Now.ToString("yyyy-MM-ddTHH:mm:ss"),' "2021-08-23T11:13:01",
|
||||
.NombreRemitente = UsuarioActual.Empresa.Empresa,
|
||||
.Domicilio = DomOrigen}
|
||||
Ubica.Destino = New CFDICartaPorteUbicacionDestino With {.RFCDestinatario = "",'UsuarioActual.Empresa.RFC,'"CAMJ841219I33",
|
||||
.FechaHoraProgLlegada = TxtFechaEntrega.Text.ToDate.ToString("yyyy-MM-ddT23:59:59"),
|
||||
.NombreDestinatario = UsuarioActual.Empresa.Empresa,
|
||||
.Domicilio = DomDestino}
|
||||
Ubica.DistanciaRecorrida = 1
|
||||
'Ubica.Origen = New CFDICartaPorteUbicacion With {.RFCRemitente = "",'UsuarioActual.Empresa.RFC,
|
||||
' .FechaHoraSalida = Now.ToString("yyyy-MM-ddTHH:mm:ss"),' "2021-08-23T11:13:01",
|
||||
' .NombreRemitente = UsuarioActual.Empresa.Empresa,
|
||||
' .Domicilio = DomOrigen}
|
||||
'Ubica.Destino = New CFDICartaPorteUbicacion With {.RFCDestinatario = "",'UsuarioActual.Empresa.RFC,'"CAMJ841219I33",
|
||||
' .FechaHoraProgLlegada = TxtFechaEntrega.Text.ToDate.ToString("yyyy-MM-ddT23:59:59"),
|
||||
' .NombreDestinatario = UsuarioActual.Empresa.Empresa,
|
||||
' .Domicilio = DomDestino}
|
||||
|
||||
CartaPorte.Ubicaciones.Add(Ubica)
|
||||
|
||||
@@ -2937,7 +2940,6 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
.ClaveMaterialPeligroso = drr("ClaveMaterialPeligroso").ToString,
|
||||
.Embalaje = drr("ClaveEmbalaje").ToString,
|
||||
.DescripEmbalaje = drr("Embalaje").ToString,
|
||||
.PesoenKg = drr("PesoKg").ToString.ToDecimal,
|
||||
.ValorMercancia = drr("PU").ToString.ToDecimal,
|
||||
.Moneda = "MXN", 'temporal
|
||||
.FraccionArrancelaria = "",
|
||||
@@ -3499,7 +3501,7 @@ Partial Class Timbres
|
||||
Public Property MsgError As StringBuilder
|
||||
Public Property MensajeAlert As StringBuilder
|
||||
|
||||
Private Property CvePaqueteriaGuia As Integer
|
||||
|
||||
Private Property CveMovimiento As Integer
|
||||
Private Property UsuarioActual As Usuario
|
||||
Private Property AplicaCP As Boolean
|
||||
@@ -3719,13 +3721,13 @@ Partial Class Timbres
|
||||
CartaPorte.Mercancias.UnidadPeso = ""
|
||||
CartaPorte.Mercancias.CargoporTasacion = 0
|
||||
|
||||
CartaPorte.FiguraTransporte.AutoTransporteFederal.PermSCT = TipoPermisoSCT '"TPAF01"
|
||||
CartaPorte.FiguraTransporte.AutoTransporteFederal.NumPermisoSCT = NumPermisoSCT
|
||||
CartaPorte.FiguraTransporte.AutoTransporteFederal.NombreAseg = NombreAseguradora
|
||||
CartaPorte.FiguraTransporte.AutoTransporteFederal.NumPolizaSeguro = NumPolizaSeguro
|
||||
CartaPorte.FiguraTransporte.AutoTransporteFederal.Vehiculo.ConfigVehicular = ConfigCartaPorte '"C2"
|
||||
CartaPorte.FiguraTransporte.AutoTransporteFederal.Vehiculo.PlacaVM = Placa
|
||||
CartaPorte.FiguraTransporte.AutoTransporteFederal.Vehiculo.AnioModeloVM = Anio
|
||||
CartaPorte.FiguraTransporte.AutoTransporte.PermSCT = TipoPermisoSCT '"TPAF01"
|
||||
CartaPorte.FiguraTransporte.AutoTransporte.NumPermisoSCT = NumPermisoSCT
|
||||
CartaPorte.FiguraTransporte.AutoTransporte.NombreSeguroResponsabilidadCivil = NombreAseguradora
|
||||
CartaPorte.FiguraTransporte.AutoTransporte.PolizaSeguroResponsabilidadCivil = NumPolizaSeguro
|
||||
CartaPorte.FiguraTransporte.AutoTransporte.Vehiculo.ConfigVehicular = ConfigCartaPorte '"C2"
|
||||
CartaPorte.FiguraTransporte.AutoTransporte.Vehiculo.PlacaVM = Placa
|
||||
CartaPorte.FiguraTransporte.AutoTransporte.Vehiculo.AnioModeloVM = Anio
|
||||
|
||||
Dim DomOrigen As CFDICartaPorteDomicilio = Nothing
|
||||
DomOrigen = New CFDICartaPorteDomicilio With {.Calle = DirOriCalle,
|
||||
@@ -3748,20 +3750,20 @@ Partial Class Timbres
|
||||
.Localidad = DirDesClaveSATLocalidad}
|
||||
|
||||
|
||||
Dim Ubica As New CFDICartaPorteUbicaciones
|
||||
Dim Ubica As New CFDICartaPorteUbicacion
|
||||
Ubica.TipoEstacion = ""
|
||||
Ubica.DistanciaRecorridaDestino = 1
|
||||
Ubica.Origen = New CFDICartaPorteUbicacionOrigen With {.RFCRemitente = "",'UsuarioActual.Empresa.RFC,
|
||||
Ubica.DistanciaRecorrida = 1
|
||||
Ubica = New CFDICartaPorteUbicacion With {.TipoUbicacion = "Origen", .IDUbicacion = "OR001", .RFCRemitenteDestinatario = "",'UsuarioActual.Empresa.RFC,
|
||||
.FechaHoraSalida = Now.ToString("yyyy-MM-ddTHH:mm:ss"),' "2021-08-23T11:13:01",
|
||||
.NombreRemitente = UsuarioActual.Empresa.Empresa,
|
||||
.NombreRemitenteDestinatario = UsuarioActual.Empresa.Empresa,
|
||||
.Domicilio = DomOrigen}
|
||||
Ubica.Destino = New CFDICartaPorteUbicacionDestino With {.RFCDestinatario = "",'UsuarioActual.Empresa.RFC,'"CAMJ841219I33",
|
||||
CartaPorte.Ubicaciones.Add(Ubica)
|
||||
Ubica = New CFDICartaPorteUbicacion With {.TipoUbicacion = "Destino", .IDUbicacion = "DE001", .RFCRemitenteDestinatario = "",'UsuarioActual.Empresa.RFC,'"CAMJ841219I33",
|
||||
.FechaHoraProgLlegada = FechaEntrega.ToString("yyyy-MM-ddT23:59:59"),
|
||||
.NombreDestinatario = UsuarioActual.Empresa.Empresa,
|
||||
.NombreRemitenteDestinatario = UsuarioActual.Empresa.Empresa,
|
||||
.Domicilio = DomDestino}
|
||||
|
||||
CartaPorte.Ubicaciones.Add(Ubica)
|
||||
|
||||
CartaPorte.FiguraTransporte.ClaveTransporte = "01"
|
||||
|
||||
Dim ObjAcar As New ClsAcarreos()
|
||||
@@ -3828,13 +3830,17 @@ Partial Class Timbres
|
||||
.ClaveMaterialPeligroso = drr("ClaveMaterialPeligroso").ToString,
|
||||
.Embalaje = drr("ClaveEmbalaje").ToString,
|
||||
.DescripEmbalaje = drr("Embalaje").ToString,
|
||||
.PesoenKg = drr("PesoKg").ToString.ToDecimal,
|
||||
.ValorMercancia = drr("PU").ToString.ToDecimal,
|
||||
.Moneda = "MXN", 'temporal
|
||||
.FraccionArrancelaria = "",
|
||||
.UUIDComercioExt = ""
|
||||
}
|
||||
|
||||
Dim DetalleMercancia As New CFDICartaPorteMercanciaDetalleMercancia With {.PesoNeto = drr("PesoKg").ToString.ToDecimal}
|
||||
conceptoCarta.DetalleMercancia = DetalleMercancia
|
||||
|
||||
Dim MercanciaTransporta As New CFDICartaPorteMercanciaTransporta With {.Cantidad = drr("Cantidad").ToString.ToDecimal, .IDOrigen = "OR001", .IDDestino = "DE001"}
|
||||
conceptoCarta.DetalleMercancia = DetalleMercancia
|
||||
|
||||
totSubTotal = totSubTotal - concepto.Importe
|
||||
CartaPorte.Mercancias.Mercancias.Add(conceptoCarta)
|
||||
@@ -3996,7 +4002,7 @@ Partial Class Timbres
|
||||
Respuesta = True
|
||||
|
||||
Dim objGrales As New ClsGenerales
|
||||
If Not objGrales.UpdateGralTimbre(CveTimbre, "-1", "-1", -1, ObjTimbrado.UUID, Now, CvePaqueteriaGuia, CveMovimiento, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, UsuarioActual.Empresa.CvePAC, -1, New Date(1900, 1, 1), AplicaCP, -1, -1, -1, -1, -1) Then
|
||||
If Not objGrales.UpdateGralTimbre(CveTimbre, "-1", "-1", -1, ObjTimbrado.UUID, Now, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, UsuarioActual.Empresa.CvePAC, -1, New Date(1900, 1, 1), AplicaCP, "-1") Then
|
||||
GuardaLogAD($"Error no se actualizo registro de timbre {CveTimbre} ")
|
||||
End If
|
||||
objGrales.Dispose()
|
||||
@@ -4068,15 +4074,13 @@ Partial Class Timbres
|
||||
|
||||
If CveTimbre > 0 Then
|
||||
|
||||
If ObjGrales.GetGralTimbre(CveTimbre, "-1", "-1", -1, FI, FF, 0, UsuarioActual.CveEmpresa, -1, -1) Then
|
||||
If ObjGrales.GetGralTimbre(CveTimbre, "-1", "-1", -1, FI, FF, 0, UsuarioActual.CveEmpresa, -1) Then
|
||||
|
||||
|
||||
If ObjGrales.DtResultados.Rows.Count = 1 Then
|
||||
|
||||
|
||||
CveMovimiento = ObjGrales.DtResultados.Rows(0)("CveMovimientoAlmacen").ToString.ToEntero
|
||||
CvePaqueteriaGuia = ObjGrales.DtResultados.Rows(0)("Folio").ToString.ToEntero
|
||||
|
||||
FechaEntrega = ObjGrales.DtResultados.Rows(0)("FechaEntrega").ToString.ToDate
|
||||
|
||||
Serie = ObjGrales.DtResultados.Rows(0)("Serie").ToString
|
||||
|
||||
Reference in New Issue
Block a user