283 lines
18 KiB
Plaintext
283 lines
18 KiB
Plaintext
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepExistenciasCostos.aspx.vb" Inherits="Inventarios_RepExistenciasCostos" %>
|
|
|
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
|
<style>
|
|
.table-GvM .SubTotales2 {
|
|
background-color: #FAFAFA;
|
|
}
|
|
|
|
.table-GvM .SubTotales {
|
|
background-color: #E5E5E5;
|
|
}
|
|
</style>
|
|
</asp:Content>
|
|
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
|
Reporte de Existencias y Costos
|
|
</asp:Content>
|
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
|
<li>
|
|
<asp:LinkButton ID="LnkImprimir" runat="server"><i class="fa fa-ad-pdf"></i> Generar PDF</asp:LinkButton>
|
|
</li>
|
|
<li>
|
|
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-ad-excel"></i> Generar Excel</asp:LinkButton>
|
|
</li>
|
|
<li>
|
|
<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivPersonalizar" ID="ImgPersonalizar" runat="server"> <i class="fa fa-pencil"></i> Personalizar</asp:HyperLink>
|
|
</li>
|
|
<li>
|
|
<asp:HyperLink ID="LnkKardex" runat="server" Visible="false"> Ver Kardex</asp:HyperLink>
|
|
</li>
|
|
</asp:Content>
|
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
|
|
|
|
|
<asp:UpdatePanel ID="UpFiltros" runat="server">
|
|
<ContentTemplate>
|
|
<asp:Panel ID="Panel1" runat="server">
|
|
<div class="portlet solid grey-cascade portlet-filter">
|
|
<div class="portlet-title portlet-filterT smalltitle">
|
|
<div class="tools">
|
|
<asp:Button ID="btConsultar" runat="server" ValidationGroup="GrpConsultar" Text="Consultar" class="btn btn-primary" />
|
|
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
|
</div>
|
|
<div class="titlefiltros caption" style="position: relative;">
|
|
<div class="row">
|
|
<label class="col-md-1">Proveedor:</label>
|
|
<div class="col-md-3">
|
|
<asp:DropDownList ID="DdlProveedor" runat="server" DataValueField="CveProveedor" DataTextField="RazonSocial" Class="form-control input-sm select2me" Style="max-width: 400px !important;"></asp:DropDownList>
|
|
</div>
|
|
<label class="col-md-1">Fecha Inicio:</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: 120px !important; padding: 0px;">
|
|
<asp:TextBox ID="TxtFechaI" runat="server" CssClass="form-control" Style="width: 118px;" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
|
<span class="input-group-btn ">
|
|
<asp:LinkButton ID="ImgFechaI" 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="CEFechaI" TargetControlID="TxtFechaI" PopupButtonID="ImgFechaI" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
|
</div>
|
|
<label class="col-md-1">Fecha Fin:</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: 120px !important; padding: 0px;">
|
|
<asp:TextBox ID="TxtFechaF" runat="server" CssClass="form-control" Style="width: 118px;" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
|
<span class="input-group-btn ">
|
|
<asp:LinkButton ID="ImgFechaF" 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="CalendarExtender1" TargetControlID="TxtFechaF" PopupButtonID="ImgFechaF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<label class="col-md-1">Concepto:</label>
|
|
<div class="col-md-3">
|
|
<asp:DropDownList ID="DdlTipoMovimiento" runat="server" DataTextField="Concepto" DataValueField="CveConcepto" Class="form-control input-sm select2me"></asp:DropDownList>
|
|
|
|
</div>
|
|
<label class="col-md-1">Almacen</label>
|
|
<div class="col-md-2">
|
|
<%--<asp:DropDownList ID="DdlAlmacen" runat="server" CssClass="form-control input-sm select2me" DataTextField="Almacen" DataValueField="CveAlmacen"></asp:DropDownList>--%>
|
|
<asp:ListBox ID="DdlAlmacen" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" DataTextField="Almacen" DataValueField="CveAlmacen" Style="width: 100%;" runat="server"></asp:ListBox>
|
|
</div>
|
|
<label class="col-md-1">Moneda:</label>
|
|
<div class="col-md-2">
|
|
<asp:DropDownList ID="DdlMoneda" runat="server" DataTextField="Moneda" DataValueField="CveMoneda" Class="form-control input-sm select2me"></asp:DropDownList>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<label class="col-md-1 truncate">Clasificación:</label>
|
|
<div class="col-md-3">
|
|
<asp:DropDownList ID="DdlClasificacion" CssClass="form-control select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Class="table-group-action-input form-control input-inline input-small input-sm">
|
|
<asp:ListItem Selected="True" Text="Seleccione la Clasificación (Todas)" Value="-1"></asp:ListItem>
|
|
</asp:DropDownList>
|
|
</div>
|
|
<label class="col-md-1 truncate">Producto:</label>
|
|
<div class="col-md-2 ">
|
|
<asp:DropDownList ID="ddlProducto" CssClass="form-control select2me" runat="server" DataTextField="PSCodigo" DataValueField="CvePS" Class="table-group-action-input form-control col-md-3"></asp:DropDownList>
|
|
<select id="DdlProductows" runat="server" class="form-control col-md-3"></select>
|
|
<asp:HiddenField ID="HFProducto" runat="server" />
|
|
<asp:Button ID="myhidenbutton" CssClass="hidden" runat="server" Text="Button" />
|
|
<asp:HiddenField ID="HFTProducto" runat="server" />
|
|
</div>
|
|
<div class="col-md-1 truncate">Personal</div>
|
|
<div class="col-md-2">
|
|
<asp:DropDownList ID="DdlPersonal" runat="server" CssClass="select2me" Width="100%" DataValueField="CvePersonal" DataTextField="CodigoNombreCompleto"></asp:DropDownList>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
|
|
<div class="col-md-1 truncate">Opción:</div>
|
|
<div class="col-md-2">
|
|
<asp:DropDownList ID="DdlMovs" CssClass="form-control input-sm select2me" runat="server" Width="100%" DataValueField="CveAlmacen" DataTextField="Almacen">
|
|
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
|
<asp:ListItem Text="Con Movimientos" Value="2"></asp:ListItem>
|
|
<asp:ListItem Text="Sin Movimientos" Value="5"></asp:ListItem>
|
|
<asp:ListItem Text="Con Existencias" Value="3"></asp:ListItem>
|
|
<asp:ListItem Text="Sin Existencias" Value="4"></asp:ListItem>
|
|
</asp:DropDownList>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</asp:Panel>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
|
|
<br />
|
|
<div class="row col-md-12" align="right">
|
|
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvM.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvM.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
|
</div>
|
|
<br />
|
|
<br />
|
|
|
|
<asp:UpdatePanel ID="UPPEquiv" runat="server" RenderMode="Inline" UpdateMode="Conditional" ViewStateMode="Inherit">
|
|
<ContentTemplate>
|
|
<div id="gv-container" class="table-VH-container">
|
|
<asp:GridView ID="GvM" runat="server" ShowHeader="True" EmptyDataText="Aún no hay registros." AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False"
|
|
ShowHeaderWhenEmpty="false" CssClass="table table-advance table-GvM Widthall" GridLines="None">
|
|
<Columns>
|
|
<asp:HyperLinkField HeaderText="Fecha" ItemStyle-Width="75px" DataTextField="FechaMovto" ItemStyle-CssClass="Texto" DataNavigateUrlFields="CveMovimiento" DataNavigateUrlFormatString="/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}" />
|
|
<asp:BoundField HeaderText="Almacen" DataField="Almacen" />
|
|
<asp:HyperLinkField HeaderText="Folio" ItemStyle-Width="100px" DataTextField="Folio" ItemStyle-CssClass="Texto" DataNavigateUrlFields="CveMovimiento" ItemStyle-HorizontalAlign="Right" DataNavigateUrlFormatString="/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}" />
|
|
<asp:BoundField HeaderText="Activo Fijo" DataField="CodigoAF" ItemStyle-HorizontalAlign="Left" Visible="false" />
|
|
<asp:BoundField HeaderText="SubProyecto" DataField="SubProyecto" ItemStyle-HorizontalAlign="Left" Visible="false" />
|
|
<asp:BoundField HeaderText="Entradas" ItemStyle-Width="75px" DataField="Entradas" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right"/>
|
|
<asp:BoundField HeaderText="Costo" ItemStyle-Width="100px" DataField="CostoE" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right"/>
|
|
<asp:BoundField HeaderText="Salidas" ItemStyle-Width="75px" DataField="Salidas" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right"/>
|
|
<asp:BoundField HeaderText="Costo" ItemStyle-Width="100px" DataField="CostoS" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right"/>
|
|
<asp:BoundField HeaderText="Existencia" ItemStyle-Width="75px" DataField="ExistenciaAcum" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right"/>
|
|
<asp:BoundField HeaderText="Valor" ItemStyle-Width="100px" DataField="ValorAcum" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right"/>
|
|
</Columns>
|
|
</asp:GridView>
|
|
</div>
|
|
</ContentTemplate>
|
|
<Triggers>
|
|
<asp:AsyncPostBackTrigger ControlID="btConsultar" EventName="Click" />
|
|
</Triggers>
|
|
</asp:UpdatePanel>
|
|
|
|
|
|
<asp:UpdatePanel runat="server" ID="UPPersonalizar" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<div id="DivPersonalizar" class="modal fade" role="dialog">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
<h4 class="modal-title">
|
|
<asp:Label ID="Label1" runat="server" ClientIDMode="Static" Text="Personalizar Columnas"></asp:Label></h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<table class="table table-striped table-advance table-hover Widthall">
|
|
<tbody>
|
|
<tr>
|
|
<td style="text-align: left;">
|
|
<asp:CheckBox ID="ChkActivoFijo" runat="server" Text="Activo Fijo" /></td>
|
|
<td style="text-align: left;">
|
|
<asp:CheckBox ID="ChkSubProyecto" runat="server" Text="SubProyecto" /></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<asp:Button ID="BtnPersonalizar" runat="server" Text="Personalizar" class="btn btn-success" />
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
|
|
</asp:Content>
|
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
|
<script type="text/javascript">
|
|
|
|
function LimpiaPS() {
|
|
$('#<%= HFProducto.ClientID %>').val(-1);
|
|
$('#<%= HFTProducto.ClientID%>').val('Todos');
|
|
$('#<%= myhidenbutton.ClientID %>').click();
|
|
}
|
|
|
|
function AddItem(Text, Value) {
|
|
var opt = document.createElement("option");
|
|
if (document.getElementById('<%= DdlProductows.ClientID%>')) {
|
|
document.getElementById('<%= DdlProductows.ClientID%>').options.add(opt);
|
|
opt.text = Text;
|
|
opt.value = Value;
|
|
}
|
|
}
|
|
|
|
function opsws() {
|
|
if ($("#<%= DdlProductows.ClientID%>")) {
|
|
if (!($('#<%= HFProducto.ClientID %>').val() === '')) {
|
|
AddItem($('#<%= HFTProducto.ClientID%>').val(), $('#<%= HFProducto.ClientID %>').val());
|
|
}
|
|
}
|
|
if ($("#<%= DdlProductows.ClientID%>").data('creado') === '1') { } else {
|
|
$("#<%= DdlProductows.ClientID%>").data('creado', '1')
|
|
$("#<%= DdlProductows.ClientID%>").select2({
|
|
ajax: {
|
|
url: "/Ashx/SIGWeb.ashx",
|
|
dataType: 'json',
|
|
delay: 250,
|
|
data: function (params) {
|
|
return {
|
|
Name: params.term, // search term
|
|
Metodo: 'getps'
|
|
};
|
|
},
|
|
processResults: function (data, params) {
|
|
// parse the results into the format expected by Select2
|
|
// since we are using custom formatting functions we do not need to
|
|
// alter the remote JSON data, except to indicate that infinite
|
|
// scrolling can be used
|
|
params.page = params.page || 1;
|
|
data.push({ id: -1, text: 'Todos' });
|
|
return {
|
|
results: data,
|
|
pagination: {
|
|
more: (params.page * 30) < data.total_count
|
|
}
|
|
};
|
|
},
|
|
cache: true
|
|
},
|
|
escapeMarkup: function (markup) { return markup; }, // let our custom formatter work
|
|
minimumInputLength: 3
|
|
});
|
|
}
|
|
if ($("#<%= DdlProductows.ClientID%>")) {
|
|
|
|
$("#<%= DdlProductows.ClientID%>").on("select2:select", function (e) { console.log(e); $('#<%= HFProducto.ClientID %>').val(e.params.data.id); $('#<%= HFTProducto.ClientID%>').val(e.params.data.text); $('#<%= myhidenbutton.ClientID %>').click(); });
|
|
}
|
|
|
|
if ($("#<%= DdlProducto.ClientID%>")) {
|
|
$("#<%= DdlProducto.ClientID%>").on("select2:select", function (e) { console.log(e); $('#<%= HFProducto.ClientID %>').val(e.params.data.id); $('#<%= HFTProducto.ClientID%>').val(e.params.data.text); });
|
|
|
|
}
|
|
}
|
|
Sys.Application.add_load(function (s, e) {
|
|
var Tam = TamañoVentana();
|
|
var Alto = Tam.height - 350;
|
|
if (Alto < 100) {
|
|
Alto = 100;
|
|
}
|
|
$('#<%= GvM.ClientID%>').ADScroll({ 'height': Alto });
|
|
opsws();
|
|
|
|
});
|
|
|
|
</script>
|
|
</asp:Content>
|