Excel de productos y modificacion en grids para inventario fisco
This commit is contained in:
@@ -166,7 +166,7 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<asp:GridView ID="GvAlmacen" runat="server" GridLines="None" DataKeyNames="CveAlmacen,Almacen" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn scrollAD" Width="100%" AutoGenerateColumns="False" EmptyDataText="No ha seleccionado un almacen" ToolTip="Listado de Almacenes">
|
<asp:GridView ID="GvAlmacen" runat="server" GridLines="None" DataKeyNames="CveAlmacen,Almacen" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn ScrollAD" data-heightfijo="150" data-height="150" Width="380px" AutoGenerateColumns="False" EmptyDataText="No ha seleccionado un almacen" ToolTip="Listado de Almacenes">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField DataField="Almacen" HeaderText="Almacen" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField DataField="Almacen" HeaderText="Almacen" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Comandos">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Comandos">
|
||||||
@@ -211,7 +211,7 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<asp:GridView ID="GvClasificacion" runat="server" GridLines="None" DataKeyNames="CveClasificacion,Clasificacion" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn ADSCroll" Width="100%" AutoGenerateColumns="False" ToolTip="Listado de Clasificaciones" >
|
<asp:GridView ID="GvClasificacion" runat="server" GridLines="None" DataKeyNames="CveClasificacion,Clasificacion" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn ScrollAD" data-heightfijo="150" data-height="150" Width="380px" AutoGenerateColumns="False" ToolTip="Listado de Clasificaciones" >
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField DataField="Clasificacion" HeaderText="Clasificacion" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField DataField="Clasificacion" HeaderText="Clasificacion" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Comandos">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Comandos">
|
||||||
@@ -258,10 +258,10 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<asp:GridView ID="GvPS" runat="server" GridLines="None" DataKeyNames="CvePS" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn ScrollAD" data-heightfijo="150" data-height="150" Width="100%" AutoGenerateColumns="False" EmptyDataText="">
|
<asp:GridView ID="GvPS" runat="server" GridLines="None" DataKeyNames="CvePS" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn ScrollAD" data-heightfijo="150" data-height="150" Width="380px" AutoGenerateColumns="False" EmptyDataText="">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField DataField="CodigoPS" HeaderText="Productos" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField DataField="CodigoPS" HeaderText="Productos" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="310px" HeaderStyle-Width="310px"/>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Comandos">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Comandos" ItemStyle-Width="70px" HeaderStyle-Width="70px">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" OnClick="DeleteProductosServicios_Click" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" OnClick="DeleteProductosServicios_Click" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
@@ -302,7 +302,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<asp:GridView ID="GvClasificacionExcluida" runat="server" GridLines="None" DataKeyNames="CveClasificacion,Clasificacion" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn ADSCroll" Width="100%" AutoGenerateColumns="False" ToolTip="Listado de Clasificaciones Excluidas">
|
<asp:GridView ID="GvClasificacionExcluida" runat="server" GridLines="None" DataKeyNames="CveClasificacion,Clasificacion" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn ScrollAD" data-heightfijo="150" data-height="150" Width="380px" AutoGenerateColumns="False" ToolTip="Listado de Clasificaciones Excluidas">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField DataField="Clasificacion" HeaderText="Clasificacion" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField DataField="Clasificacion" HeaderText="Clasificacion" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Comandos">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Comandos">
|
||||||
@@ -349,7 +349,7 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<asp:GridView ID="GvPSExcluye" runat="server" GridLines="None" DataKeyNames="CvePS" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn ScrollAD" data-heightfijo="150" data-height="150" Width="100%" max-heigth="" AutoGenerateColumns="False" EmptyDataText="">
|
<asp:GridView ID="GvPSExcluye" runat="server" GridLines="None" DataKeyNames="CvePS" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn ScrollAD" data-heightfijo="150" data-height="150" Width="380px" AutoGenerateColumns="False" EmptyDataText="">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField DataField="CodigoPS" HeaderText="Productos" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField DataField="CodigoPS" HeaderText="Productos" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Comandos">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Comandos">
|
||||||
@@ -394,7 +394,7 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<asp:GridView ID="GvProveedor" runat="server" GridLines="None" DataKeyNames="CveProveedor,RazonSocial" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn ADSCroll" Width="100%" AutoGenerateColumns="False" ToolTip="Listado de Clasificaciones" >
|
<asp:GridView ID="GvProveedor" runat="server" GridLines="None" DataKeyNames="CveProveedor,RazonSocial" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn ScrollAD" data-heightfijo="150" data-height="150" Width="380px" AutoGenerateColumns="False" ToolTip="Listado de Proveedores" >
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField DataField="RazonSocial" HeaderText="Proveedor" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField DataField="RazonSocial" HeaderText="Proveedor" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Comandos">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Comandos">
|
||||||
|
|||||||
@@ -83,6 +83,15 @@
|
|||||||
.SinColor th {
|
.SinColor th {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.divmodal{
|
||||||
|
width: 500px;
|
||||||
|
}
|
||||||
|
.center {
|
||||||
|
float: none;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
@@ -106,6 +115,7 @@
|
|||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LnkExcel" runat="server"><i class="fa fa-ad-excel"></i> Imprimir EXCEL</asp:LinkButton>
|
<asp:LinkButton ID="LnkExcel" runat="server"><i class="fa fa-ad-excel"></i> Imprimir EXCEL</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
<Triggers>
|
<Triggers>
|
||||||
<asp:PostBackTrigger ControlID="LnkPDF" />
|
<asp:PostBackTrigger ControlID="LnkPDF" />
|
||||||
@@ -113,7 +123,9 @@
|
|||||||
<asp:PostBackTrigger ControlID="LnkExcel" />
|
<asp:PostBackTrigger ControlID="LnkExcel" />
|
||||||
</Triggers>
|
</Triggers>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkExcelUniverso" runat="server" ToolTip="Descarga listado de todos los productos que se consideran para la verificación de existencias"><i class="fa fa-ad-excel"></i> Descargar productos</asp:LinkButton>
|
||||||
|
</li>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||||
Inventario Físico Detalle
|
Inventario Físico Detalle
|
||||||
@@ -357,7 +369,7 @@
|
|||||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvIFD.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvIFD.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
<div style="display: inline-block;" id="SumFiltra"></div>
|
<div style="display: inline-block;" id="SumFiltra"></div>
|
||||||
</div>
|
</div>
|
||||||
<asp:GridView ID="GvIFD" ClientIDMode="Static" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" GridLines="None" DataKeyNames="CveInventarioFisicoDetalle" ShowHeaderWhenEmpty="True" CssClass="table table-striped table-hover Widthall">
|
<asp:GridView ID="GvIFD" ClientIDMode="Static" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" GridLines="None" DataKeyNames="CveInventarioFisicoDetalle, CvePS, SerieLote, Lote, FechaCaducidad, Cantidad, CveUnidadMedida" ShowHeaderWhenEmpty="True" CssClass="table table-striped table-hover Widthall">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField HeaderText="Fecha" DataField="FechaInvFisico" DataFormatString="{0:g}"></asp:BoundField>
|
<asp:BoundField HeaderText="Fecha" DataField="FechaInvFisico" DataFormatString="{0:g}"></asp:BoundField>
|
||||||
<asp:BoundField HeaderText="Código Barras" DataField="CodigoBarras" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
|
<asp:BoundField HeaderText="Código Barras" DataField="CodigoBarras" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
|
||||||
@@ -368,6 +380,11 @@
|
|||||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-HorizontalAlign="Left" Visible="false"></asp:BoundField>
|
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-HorizontalAlign="Left" Visible="false"></asp:BoundField>
|
||||||
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-HorizontalAlign="Left" Visible="false" DataFormatString="{0:d}"></asp:BoundField>
|
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-HorizontalAlign="Left" Visible="false" DataFormatString="{0:d}"></asp:BoundField>
|
||||||
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right"></asp:BoundField>
|
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right"></asp:BoundField>
|
||||||
|
<asp:TemplateField HeaderText="Editar" ItemStyle-HorizontalAlign="Center">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton ID="LnkEditar" OnClick="LnkEditar_Click" runat="server" AlternateText="Editar" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Eliminar" ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField HeaderText="Eliminar" ItemStyle-HorizontalAlign="Center">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-xs red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Estas seguro que desea eliminar el registro?" data-btn-ok-label="si" />
|
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-xs red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Estas seguro que desea eliminar el registro?" data-btn-ok-label="si" />
|
||||||
@@ -381,6 +398,55 @@
|
|||||||
</Triggers>
|
</Triggers>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="ModalEditarPS" class="modal ADS fade centered" role="dialog">
|
||||||
|
<div class="modal-dialog" id="modal">
|
||||||
|
<asp:UpdatePanel ID="UpAddInventarioFisico" class="modal-content divmodal" 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="myModalLabel" runat="server">Editar PS</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<asp:UpdatePanel ID="UpEditarPS" UpdateMode="Conditional" runat="server">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:HiddenField ID="HfCveInventarioFisicoDetalle" Value="" runat="server"/>
|
||||||
|
<asp:HiddenField ID="HfCvePS" Value="" runat="server"/>
|
||||||
|
<asp:HiddenField ID="HfCveUM" Value="" runat="server"/>
|
||||||
|
<div class="form-group form-md-line-input input-iconright" id="DivSerieEdit" runat="server">
|
||||||
|
<asp:TextBox ID="TxtSerieLote" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="500" Width="175px"></asp:TextBox>
|
||||||
|
<label for="<%= TxtSerieLote.ClientID.ToString()%>">Serie:</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-group form-md-line-input input-iconright" id="DivLoteEdit" runat="server">
|
||||||
|
<asp:TextBox ID="TxtLoteEdit" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="500" Width="175px"></asp:TextBox>
|
||||||
|
|
||||||
|
<label for="<%= TxtLoteEdit.ClientID.ToString()%>">Lote:</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-group form-md-line-input input-iconright" id="DivFechaEdit" runat="server">
|
||||||
|
<asp:TextBox ID="TxtFechaCaducida" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="500" Width="175px"></asp:TextBox>
|
||||||
|
<label for="<%= TxtFechaCaducida.ClientID.ToString()%>">Fecha Caducida:</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-group form-md-line-input input-iconright" id="DivCantidadEdit" runat="server">
|
||||||
|
<asp:TextBox ID="TxtCantidad" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="500" Width="175px"></asp:TextBox>
|
||||||
|
<label for="<%= TxtCantidad.ClientID.ToString()%>">Cantidad:</label>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<asp:UpdatePanel ID="UpFooter" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:LinkButton ID="BtnGuadarEditarPS" OnClick="BtnGuadarEditarPS_Click" runat="server" CssClass="btn btn-primary" ValidationGroup="GrpObligatorio"> <i class='material-icons'>done_all</i> Guardar</asp:LinkButton>
|
||||||
|
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ Option Explicit On
|
|||||||
|
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
|
Imports GemBox.Spreadsheet
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
|
||||||
Partial Class Inventarios_InventarioFisicoDetalle
|
Partial Class Inventarios_InventarioFisicoDetalle
|
||||||
@@ -49,6 +50,7 @@ Partial Class Inventarios_InventarioFisicoDetalle
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
@@ -153,7 +155,14 @@ Partial Class Inventarios_InventarioFisicoDetalle
|
|||||||
CveAlmacenesStr.AppendFormat("{0},", dr("CveAlmacen"))
|
CveAlmacenesStr.AppendFormat("{0},", dr("CveAlmacen"))
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
LblAlmacenes.Text = str.ToString
|
If str.ToString.Length > 500 Then
|
||||||
|
LblAlmacenes.Text = str.ToString.Substring(0, 500)
|
||||||
|
LblAlmacenes.ToolTip = str.ToString
|
||||||
|
Else
|
||||||
|
LblAlmacenes.Text = str.ToString
|
||||||
|
End If
|
||||||
|
str.Clear()
|
||||||
|
|
||||||
CveAlmacenes = CveAlmacenesStr.ToString.Substring(0, CveAlmacenesStr.Length - 1)
|
CveAlmacenes = CveAlmacenesStr.ToString.Substring(0, CveAlmacenesStr.Length - 1)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -165,12 +174,24 @@ Partial Class Inventarios_InventarioFisicoDetalle
|
|||||||
For Each dr As DataRow In dt.FiltraParametros("Incluye = 1").Rows
|
For Each dr As DataRow In dt.FiltraParametros("Incluye = 1").Rows
|
||||||
str.AppendFormat("{0},", dr("Clasificacion"))
|
str.AppendFormat("{0},", dr("Clasificacion"))
|
||||||
Next
|
Next
|
||||||
LblClasif.Text = str.ToString
|
If str.ToString.Length > 500 Then
|
||||||
|
LblClasif.Text = str.ToString.Substring(0, 29)
|
||||||
|
LblClasif.ToolTip = str.ToString
|
||||||
|
Else
|
||||||
|
LblClasif.Text = str.ToString
|
||||||
|
End If
|
||||||
str.Clear()
|
str.Clear()
|
||||||
For Each dr As DataRow In dt.FiltraParametros("Incluye = 0").Rows
|
For Each dr As DataRow In dt.FiltraParametros("Incluye = 0").Rows
|
||||||
str.AppendFormat("{0},", dr("Clasificacion"))
|
str.AppendFormat("{0},", dr("Clasificacion"))
|
||||||
Next
|
Next
|
||||||
LblClasificacionesExcluidas.Text = str.ToString
|
If str.ToString.Length > 500 Then
|
||||||
|
LblClasificacionesExcluidas.Text = str.ToString.Substring(0, 500)
|
||||||
|
LblClasificacionesExcluidas.ToolTip = str.ToString
|
||||||
|
Else
|
||||||
|
LblClasificacionesExcluidas.Text = str.ToString
|
||||||
|
End If
|
||||||
|
str.Clear()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -183,12 +204,25 @@ Partial Class Inventarios_InventarioFisicoDetalle
|
|||||||
For Each dr As DataRow In dt.FiltraParametros("Incluye = 1").Rows
|
For Each dr As DataRow In dt.FiltraParametros("Incluye = 1").Rows
|
||||||
str.AppendFormat("{0},", dr("CodigoPS"))
|
str.AppendFormat("{0},", dr("CodigoPS"))
|
||||||
Next
|
Next
|
||||||
LblProductos.Text = str.ToString
|
If str.ToString.Length > 500 Then
|
||||||
|
LblProductos.Text = str.ToString.Substring(0, 500)
|
||||||
|
LblProductos.ToolTip = str.ToString
|
||||||
|
|
||||||
|
Else
|
||||||
|
LblProductos.Text = str.ToString
|
||||||
|
End If
|
||||||
str.Clear()
|
str.Clear()
|
||||||
For Each dr As DataRow In dt.FiltraParametros("Incluye = 0").Rows
|
For Each dr As DataRow In dt.FiltraParametros("Incluye = 0").Rows
|
||||||
str.AppendFormat("{0},", dr("CodigoPS"))
|
str.AppendFormat("{0},", dr("CodigoPS"))
|
||||||
Next
|
Next
|
||||||
LblProductosExcluidos.Text = str.ToString
|
If str.ToString.Length > 500 Then
|
||||||
|
LblProductosExcluidos.Text = str.ToString.Substring(0, 500)
|
||||||
|
LblProductosExcluidos.ToolTip = str.ToString
|
||||||
|
Else
|
||||||
|
LblProductosExcluidos.Text = str.ToString
|
||||||
|
End If
|
||||||
|
str.Clear()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -201,7 +235,12 @@ Partial Class Inventarios_InventarioFisicoDetalle
|
|||||||
For Each dr As DataRow In dt.FiltraParametros("Incluye = 1").Rows
|
For Each dr As DataRow In dt.FiltraParametros("Incluye = 1").Rows
|
||||||
str.AppendFormat("{0},", dr("RazonSocial"))
|
str.AppendFormat("{0},", dr("RazonSocial"))
|
||||||
Next
|
Next
|
||||||
LblProveedores.Text = str.ToString
|
If str.ToString.Length > 500 Then
|
||||||
|
LblProveedores.Text = str.ToString.Substring(0, 500)
|
||||||
|
LblProveedores.ToolTip = str.ToString
|
||||||
|
Else
|
||||||
|
LblProveedores.Text = str.ToString
|
||||||
|
End If
|
||||||
str.Clear()
|
str.Clear()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -566,7 +605,6 @@ Partial Class Inventarios_InventarioFisicoDetalle
|
|||||||
Private Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click
|
Private Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click
|
||||||
Impimir(Formato:="EXCEL")
|
Impimir(Formato:="EXCEL")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub Impimir(Optional Formato As String = "PDF", Optional Agrupar As Boolean = False)
|
Protected Sub Impimir(Optional Formato As String = "PDF", Optional Agrupar As Boolean = False)
|
||||||
Dim DtDatos As New DataTable
|
Dim DtDatos As New DataTable
|
||||||
Dim ObjInventario As New ClsInventarios()
|
Dim ObjInventario As New ClsInventarios()
|
||||||
@@ -607,6 +645,86 @@ Partial Class Inventarios_InventarioFisicoDetalle
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub LnkExcelUniverso_Click(sender As Object, e As EventArgs) Handles LnkExcelUniverso.Click
|
||||||
|
Dim IncluyePS, ExcluyePS, IncluyeClasificacion, ExcluyeClasificacion, IncluyeProveedor As New StringBuilder
|
||||||
|
Dim ObjInventario As New ClsInventarios
|
||||||
|
|
||||||
|
If ObjInventario.GetInventarioFisicoDetallesClasificacion(CveInventarioFisico, UsuarioActual.CveEmpresa) Then
|
||||||
|
Dim dt As DataTable = ObjInventario.DtResultados
|
||||||
|
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||||
|
For Each dr As DataRow In dt.FiltraParametros("Incluye = 1").Rows
|
||||||
|
IncluyeClasificacion.AppendFormat("{0},", dr("CveClasificacion"))
|
||||||
|
Next
|
||||||
|
For Each dr As DataRow In dt.FiltraParametros("Incluye = 0").Rows
|
||||||
|
ExcluyeClasificacion.AppendFormat("{0},", dr("CveClasificacion"))
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ObjInventario.GetInventarioFisicoDetallesProductosServicios(CveInventarioFisico, UsuarioActual.CveEmpresa) Then
|
||||||
|
Dim dt As DataTable = ObjInventario.DtResultados
|
||||||
|
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||||
|
For Each dr As DataRow In dt.FiltraParametros("Incluye = 1").Rows
|
||||||
|
IncluyePS.AppendFormat("{0},", dr("CvePS"))
|
||||||
|
Next
|
||||||
|
For Each dr As DataRow In dt.FiltraParametros("Incluye = 0").Rows
|
||||||
|
ExcluyePS.AppendFormat("{0},", dr("CvePS"))
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ObjInventario.GetInventarioFisicoDetallesProveedores(CveInventarioFisico, UsuarioActual.CveEmpresa) Then
|
||||||
|
Dim dt As DataTable = ObjInventario.DtResultados
|
||||||
|
Dim str As New StringBuilder
|
||||||
|
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||||
|
For Each dr As DataRow In dt.FiltraParametros("Incluye = 1").Rows
|
||||||
|
IncluyeProveedor.AppendFormat("{0},", dr("CveProveedor"))
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Dim dtPS As DataTable = GlobalDTPS(UsuarioActual.CveEmpresa)
|
||||||
|
If IncluyePS.ToString <> "" Then
|
||||||
|
dtPS = dtPS.FiltraParametros(String.Format("CvePS IN ({0})", IncluyePS.ToString.TrimEnd(",")))
|
||||||
|
End If
|
||||||
|
If ExcluyePS.ToString <> "" Then
|
||||||
|
dtPS = dtPS.FiltraParametros(String.Format("CvePS NOT IN ({0})", ExcluyePS.ToString.TrimEnd(",")))
|
||||||
|
End If
|
||||||
|
If IncluyeClasificacion.ToString <> "" Then
|
||||||
|
dtPS = dtPS.FiltraParametros(String.Format("CveClasificacion IN ({0})", IncluyeClasificacion.ToString.TrimEnd(",")))
|
||||||
|
End If
|
||||||
|
If ExcluyeClasificacion.ToString <> "" Then
|
||||||
|
dtPS = dtPS.FiltraParametros(String.Format("CveClasificacion NOT IN ({0})", ExcluyeClasificacion.ToString.TrimEnd(",")))
|
||||||
|
End If
|
||||||
|
If IncluyeProveedor.ToString <> "" Then
|
||||||
|
dtPS = dtPS.FiltraParametros(String.Format("CveProveedorCompra IN ({0})", IncluyeProveedor.ToString.TrimEnd(",")))
|
||||||
|
End If
|
||||||
|
dtPS = dtPS.FiltraParametros("", "PS", {"Codigo", "PS"})
|
||||||
|
Dim NombreArchivo As String
|
||||||
|
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||||
|
Dim workbook As New ExcelFile()
|
||||||
|
Dim worksheet = workbook.Worksheets.Add("Cxp")
|
||||||
|
worksheet.InsertDataTable(dtPS, New InsertDataTableOptions() With
|
||||||
|
{
|
||||||
|
.ColumnHeaders = True,
|
||||||
|
.StartRow = 0,
|
||||||
|
.StartColumn = 0
|
||||||
|
})
|
||||||
|
|
||||||
|
'worksheet.Columns("B").Style.FillPattern.SetPattern(FillPatternStyle.Solid, SpreadsheetColor.FromArgb(217, 217, 217), SpreadsheetColor.FromArgb(255, 255, 255))
|
||||||
|
'worksheet.Columns("C").Style.FillPattern.SetPattern(FillPatternStyle.Solid, SpreadsheetColor.FromArgb(217, 217, 217), SpreadsheetColor.FromArgb(255, 255, 255))
|
||||||
|
'worksheet.Columns("Q").Style.FillPattern.SetPattern(FillPatternStyle.Solid, SpreadsheetColor.FromArgb(217, 217, 217), SpreadsheetColor.FromArgb(255, 255, 255))
|
||||||
|
worksheet.Rows(0).Style.FillPattern.SetPattern(FillPatternStyle.Solid, SpreadsheetColor.FromArgb(217, 217, 217), SpreadsheetColor.FromArgb(255, 255, 255))
|
||||||
|
|
||||||
|
Dim columnCount = worksheet.CalculateMaxUsedColumns()
|
||||||
|
For i = 0 To columnCount
|
||||||
|
worksheet.Columns(i).AutoFit(1, worksheet.Rows(0), worksheet.Rows(worksheet.Rows.Count - 1))
|
||||||
|
Next
|
||||||
|
|
||||||
|
NombreArchivo = "CxP"
|
||||||
|
workbook.Save(Response, $"{NombreArchivo}.xlsx", SaveOptions.XlsxDefault)
|
||||||
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Protected Sub BtnBuscarCodVarras_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnBuscarCodVarras_Click(sender As Object, e As EventArgs)
|
||||||
@@ -647,4 +765,68 @@ Partial Class Inventarios_InventarioFisicoDetalle
|
|||||||
|
|
||||||
' UPAgregarPro.Update()
|
' UPAgregarPro.Update()
|
||||||
'End Sub
|
'End Sub
|
||||||
|
|
||||||
|
Protected Sub LnkEditar_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||||
|
LimpiarModal()
|
||||||
|
HfCveInventarioFisicoDetalle.Value = GvRow.DataKey("CveInventarioFisicoDetalle").ToString
|
||||||
|
|
||||||
|
HfCvePS.Value = GvRow.DataKey("CvePS").ToString
|
||||||
|
HfCveUM.Value = GvRow.DataKey("CveUnidadMedida").ToString
|
||||||
|
|
||||||
|
TxtSerieLote.Text = GvRow.DataKey("SerieLote").ToString
|
||||||
|
TxtLoteEdit.Text = GvRow.DataKey("Lote").ToString
|
||||||
|
TxtFechaCaducida.Text = GvRow.DataKey("FechaCaducidad").ToString
|
||||||
|
TxtCantidad.Text = GvRow.DataKey("Cantidad").ToString
|
||||||
|
UpEditarPS.Update()
|
||||||
|
|
||||||
|
RegistraScript("$('#ModalEditarPS').modal('show')")
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub LimpiarModal()
|
||||||
|
HfCveInventarioFisicoDetalle.Value = ""
|
||||||
|
HfCvePS.Value = ""
|
||||||
|
HfCveUM.Value = ""
|
||||||
|
TxtSerieLote.Text = ""
|
||||||
|
TxtLoteEdit.Text = ""
|
||||||
|
TxtFechaCaducida.Text = ""
|
||||||
|
TxtCantidad.Text = ""
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnGuadarEditarPS_Click(sender As Object, e As EventArgs)
|
||||||
|
Dim objInventario As New ClsInventarios
|
||||||
|
If Not TxtCantidad.Text.ToEntero > 0 Then
|
||||||
|
Alert("La cantidad debe ser mayor a 0", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
Dim serie As String = IIf(TxtSerieLote.Text.ToString = "", "-1", TxtSerieLote.Text.ToString)
|
||||||
|
Dim Lote As String = IIf(TxtLoteEdit.Text.ToString = "", "-1", TxtLoteEdit.Text.ToString)
|
||||||
|
Dim FechaCaducida As Date = IIf(TxtFechaCaducida.Text.ToString = "", MinFecha, TxtFechaCaducida.Text.ToString.ToDate)
|
||||||
|
|
||||||
|
If objInventario.UpdateInventarioFisicoDetalles(HfCveInventarioFisicoDetalle.Value.ToEntero, HfCvePS.Value.ToEntero, HfCveUM.Value.ToEntero, TxtCantidad.Text.ToEntero, serie, Lote, FechaCaducida) Then
|
||||||
|
If objInventario.GetInventarioFisicoDetalle(CveInventarioFisico, ddlUsuario.SelectedValue.ToString.ToEntero) Then
|
||||||
|
GvIFD.DataSource = objInventario.DtResultados
|
||||||
|
End If
|
||||||
|
|
||||||
|
GvIFD.DataBind()
|
||||||
|
|
||||||
|
If (GvIFD.Rows.Count > 0) Then
|
||||||
|
GvIFD.UseAccessibleHeader = True
|
||||||
|
GvIFD.HeaderRow.TableSection = TableRowSection.TableHeader
|
||||||
|
RegistraScript("OrdenarGV();")
|
||||||
|
End If
|
||||||
|
|
||||||
|
UPPInventario.Update()
|
||||||
|
UPAgregarPro.Update()
|
||||||
|
RegistraScript("$('#ModalEditarPS').modal('hide')")
|
||||||
|
Alert("Se modico el producto correctamente", TipoMensaje.MsgInformacion)
|
||||||
|
Else
|
||||||
|
Alert("Ocurrio un error al actuliazar", TipoMensaje.MsgError)
|
||||||
|
End If
|
||||||
|
|
||||||
|
objInventario.Dispose()
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
Reference in New Issue
Block a user