291 lines
16 KiB
Plaintext
291 lines
16 KiB
Plaintext
<%@ Page Title="REPORTE DE ALMACÉN" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAlmacen.aspx.vb" Inherits="Inventarios_RepAlmacen" %>
|
|
|
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
|
<style>
|
|
.GVAlmacen > tbody > tr:nth-child(2) {
|
|
background: #CCCCCC;
|
|
color: #67809F;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.GVAlmacen > tbody > tr > td:nth-child(2) {
|
|
text-align: right;
|
|
}
|
|
|
|
.GVAlmacen > tbody > tr > td:nth-child(3) {
|
|
text-align: center;
|
|
}
|
|
|
|
.select2 .select2-selection__rendered {
|
|
line-height: 1;
|
|
color: #111;
|
|
}
|
|
|
|
.select2 .select2-selection--multiple {
|
|
box-sizing: border-box;
|
|
cursor: pointer;
|
|
display: block;
|
|
min-height: 20px;
|
|
user-select: none;
|
|
-webkit-user-select: none;
|
|
}
|
|
|
|
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
|
margin-top: 10px;
|
|
}
|
|
|
|
.select2-selection__rendered {
|
|
margin-top: 0px;
|
|
height: 25px;
|
|
}
|
|
|
|
.select2-selection {
|
|
margin-top: 0px;
|
|
height: 31px;
|
|
}
|
|
|
|
.select2-container--default.select2-container--focus .select2-selection--multiple {
|
|
border: none;
|
|
outline: 0;
|
|
}
|
|
|
|
#chartdiv {
|
|
width: 100%;
|
|
height: 500px;
|
|
}
|
|
|
|
.v-center {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
</style>
|
|
</asp:Content>
|
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
|
REPORTE DE ALMACÉN
|
|
</asp:Content>
|
|
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
|
<li>
|
|
<asp:LinkButton ID="LnkPdf" runat="server"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
|
</li>
|
|
<li>
|
|
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
|
</li>
|
|
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<li>
|
|
<asp:LinkButton ID="LnkVerGrafica" OnClick="LnkVerGrafica_Click" runat="server"><i class="fa fa-signal"></i> Ver Grafica</asp:LinkButton>
|
|
</li>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
</asp:Content>
|
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
|
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<div class="portlet solid grey-cascade portlet-filter">
|
|
<div class="portlet-title portlet-filterT smalltitle">
|
|
<div class="tools">
|
|
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
|
|
<a href="javascript;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
|
|
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
|
</div>
|
|
<div class="titlefiltros caption">
|
|
<div class="row v-center">
|
|
<div class="col-md-1 truncate" style="text-align: right!important">Fecha Inicio:</div>
|
|
<div class="col-md-1 v-center">
|
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 95px !important; padding: 0px;">
|
|
<asp:TextBox Style="width: 80px !important;" ID="TxtFechaI" runat="server" CssClass="form-control" 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>
|
|
<div class="col-md-1 truncate" style="text-align: right!important">Fecha Fin:</div>
|
|
<div class="col-md-1 v-center">
|
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 95px !important; padding: 0px;">
|
|
<asp:TextBox Style="width: 80px !important;" ID="TxtFechaF" runat="server" CssClass="form-control" 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 class="col-md-1 truncate v-center" style="text-align: right!important">Almacen:</div>
|
|
<div class="col-md-2 v-center">
|
|
<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>
|
|
<div class="col-md-1 truncate" style="text-align: right!important">Sucursal:</div>
|
|
<div class="col-md-2">
|
|
<asp:DropDownList ID="DdlSucursal" runat="server" CssClass="input-small input-sm select2me" Width="100%" DataTextField="SubProyecto" DataValueField="CveSubProyecto">
|
|
<asp:ListItem Text="Todas" Value="-1" Selected="True"> </asp:ListItem>
|
|
</asp:DropDownList>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="portlet-body" style=" <%= IIf(chkexpand.Checked = True, "display:block;", "display:none;")%>">
|
|
<div class="row">
|
|
<div class="col-md-1 truncate" style="text-align: right!important">Modalidad:</div>
|
|
<div class="col-md-1">
|
|
<asp:DropDownList ID="DdlModalidadFiltro" runat="server" CssClass="input-small input-sm select2me" Width="100%">
|
|
<asp:ListItem Text="Todas" Value="-1" Selected="True"> </asp:ListItem>
|
|
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
|
<asp:ListItem Text="No Contable" Value="0"></asp:ListItem>
|
|
</asp:DropDownList>
|
|
</div>
|
|
<div class="col-md-1 truncate v-center" style="text-align: right!important">Tipo Almacen:</div>
|
|
<div class="col-md-2 v-center">
|
|
<asp:ListBox ID="DdlTipoAlmacen" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" DataTextField="TipoAlmacen" DataValueField="CveTipoAlmacen" Style="width: 100%;" runat="server"></asp:ListBox>
|
|
</div>
|
|
<div class="col-md-1 truncate" style="text-align: right!important">Aplica Almacen</div>
|
|
<div class="col-md-2">
|
|
<asp:DropDownList ID="DdlAplicaInventario" runat="server" CssClass="input-small input-sm select2me" Width="100%">
|
|
<asp:ListItem Text="Todos" Value="-1" Selected="True"> </asp:ListItem>
|
|
<asp:ListItem Text="Inventariable" Value="1"></asp:ListItem>
|
|
<asp:ListItem Text="No Inventariable" Value="0"></asp:ListItem>
|
|
</asp:DropDownList>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
|
|
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<asp:GridView ID="GVAlmacen" runat="server" AutoGenerateColumns="False" data-sort="true" EmptyDataText="No se encontraron Almacenes" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None">
|
|
<Columns>
|
|
<asp:TemplateField HeaderText="Almacén">
|
|
<ItemTemplate>
|
|
<asp:HyperLink ID="HyperLink1" Target="_blank" NavigateUrl='<%# String.Format("/Inventarios/RepEntradasSalidas.aspx?CveAlmacen={0}&FechaInicio={1:d}&FechaCorte={2:d}", Eval("CveAlmacen").ToString, Eval("FechaInicio"), Eval("FechaFin"))%>' runat="server"><%# Eval("Almacen") %></asp:HyperLink>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="Tipo Almacén">
|
|
<ItemTemplate>
|
|
<asp:Label ID="LtlAlmacen" runat="server" Text='<%# Eval("TipoAlmacen")%>'></asp:Label>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:BoundField HeaderText="Existencia" DataField="Existencia" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
|
</Columns>
|
|
</asp:GridView>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
|
|
<div id="DivModalGrafica" class="modal ADS fade" role="dialog">
|
|
<asp:UpdatePanel class="modal-dialog modal-lg" runat="server" ID="UPModalProd" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
<h4 class="modal-title">
|
|
<asp:Label ID="LblTituloGrafica" runat="server" ClientIDMode="Static" Text="Almacenes"></asp:Label>
|
|
</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="row">
|
|
<div class="col-md-2"></div>
|
|
<label class="col-md-1 truncate">Grafica:</label>
|
|
<div class="col-md-2">
|
|
<asp:DropDownList ID="DdlGrafica" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlGrafica_SelectedIndexChanged" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
|
<asp:ListItem Selected="True" Text="Barras" Value="1"></asp:ListItem>
|
|
<asp:ListItem Text="Pastel" Value="2"></asp:ListItem>
|
|
</asp:DropDownList>
|
|
</div>
|
|
<label class="col-md-1 truncate"> Ver:</label>
|
|
<div class="col-md-2">
|
|
<asp:DropDownList ID="DdlVer" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlVer_SelectedIndexChanged" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
|
<asp:ListItem Selected="True" Text="Existencias" Value="1"></asp:ListItem>
|
|
<asp:ListItem Text="Total" Value="2"></asp:ListItem>
|
|
</asp:DropDownList>
|
|
</div>
|
|
</div>
|
|
<br />
|
|
<div id="chartdiv"></div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
|
|
</div>
|
|
</div>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
</div>
|
|
|
|
|
|
</asp:Content>
|
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
|
<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
|
|
<script src="https://www.amcharts.com/lib/3/serial.js"></script>
|
|
<script src="https://www.amcharts.com/lib/3/pie.js"></script>
|
|
<script src="https://www.amcharts.com/lib/3/plugins/export/export.min.js"></script>
|
|
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
|
|
<script src="https://www.amcharts.com/lib/3/themes/light.js"></script>
|
|
|
|
<script>
|
|
|
|
function CargaGraficaBarras(data, title) {
|
|
|
|
var chart = AmCharts.makeChart("chartdiv", {
|
|
"type": "serial",
|
|
"theme": "light",
|
|
"dataProvider": data,
|
|
"startDuration": 2,
|
|
"valueAxes": [{
|
|
"position": "left",
|
|
"title": title
|
|
}],
|
|
"graphs": [{
|
|
"balloonText": "[[category]]: <b>[[value]]</b>",
|
|
"colorField": "Color",
|
|
"fillAlphas": 1,
|
|
"lineAlpha": 0.1,
|
|
"type": "column",
|
|
"valueField": "Valor"
|
|
}],
|
|
"depth3D": 20,
|
|
"angle": 30,
|
|
"chartCursor": {
|
|
"categoryBalloonEnabled": false,
|
|
"cursorAlpha": 0,
|
|
"zoomable": false
|
|
},
|
|
"categoryField": "Texto",
|
|
"categoryAxis": {
|
|
"gridPosition": "start",
|
|
"labelRotation": 90
|
|
},
|
|
"export": {
|
|
"enabled": true
|
|
}
|
|
});
|
|
}
|
|
|
|
function CargaGraficaPastel(data) {
|
|
|
|
var chart = AmCharts.makeChart("chartdiv", {
|
|
"type": "pie",
|
|
"theme": "light",
|
|
"dataProvider":
|
|
data,
|
|
"valueField": "Valor",
|
|
"titleField": "Texto",
|
|
"outlineAlpha": 0.4,
|
|
"depth3D": 0,
|
|
"balloonText": "[[title]]<br><span style='font-size:14px'><b>[[value]]</b> ([[percents]]%)</span>",
|
|
"angle": 0,
|
|
"export": {
|
|
"enabled": true
|
|
}
|
|
});
|
|
}
|
|
|
|
</script>
|
|
</asp:Content>
|
|
|