123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178 |
- <?xml version="1.0" encoding="UTF-8"?>
- <template xml:space="preserve">
- <t t-name="ReportCustomerRanking">
- <div class="report_view">
- <div class="reporting_page_header">
- <h1 class="report_title">Ranking de Clientes</h1>
- </div>
- <div class="container search-form" style="border-bottom:1px solid #eee; width:95%;">
- <div class="row">
- <div class="col-lg-3 company filter-style">
- <label>Empresa</label>
- <select id="current-company" class="form-control form-control-sm"></select>
- </div>
- <div class="col-lg-3 store filter-style">
- <label>Sucursal</label>
- <select id="current-store" class="form-control form-control-sm">
- </select>
- </div>
- <div class="col-lg-3 type filter-style">
- <label>Tipo de Venta</label>
- <select id="current-type" class="form-control form-control-sm">
- <option value="9999999">Todos los tipos</option>
- <option value="tpv">Terminal</option>
- <option value="sale">Normal</option>
- </select>
- </div>
- <div class="col-lg-3 category filter-style">
- <label>Categoría</label>
- <select id="current-category" class="form-control form-control-sm">
- </select>
- </div>
- <div class="col-lg-3 brand filter-style">
- <label>Marca</label>
- <select id="current-brand" class="form-control form-control-sm">
- </select>
- </div>
- <div class="col-lg-3 attribute filter-style">
- <label>Atributo</label>
- <select id="current-attribute" class="form-control form-control-sm">
- </select>
- </div>
- <div class="col-lg-3 attribute-value filter-style">
- <label>Valor del Atributo</label>
- <select id="current-attribute-value" class="form-control form-control-sm">
- </select>
- </div>
- <div class="col-lg-3 filter-style">
- <label>Fechas</label>
- <select id="current-date" class="form-control form-control-sm">
- <option value="9999999">Sin fechas</option>
- <option value="today">Hoy</option>
- <option value="yesterday">Ayer</option>
- <option value="currentMonth">Mes Actual</option>
- <option value="lastMonth">Mes Pasado</option>
- <option value="range">Busqueda Avanzada</option>
- </select>
- </div>
- </div>
- <div class="row" >
- <div class="datepicker" style="display:none;">
- <div class="col-lg-3 filter-style col-md-offset-3">
- <div class="input-group">
- <span class="input-group-addon" id="basic-addon1">Desde</span>
- <input type="text" id="from" class="form-control" aria-describedby="basic-addon1"/>
- </div>
- </div>
- <div class="col-lg-3 filter-style">
- <div class="input-group">
- <span class="input-group-addon" id="basic-addon1">Hasta</span>
- <input type="text" id="to" class="form-control" aria-describedby="basic-addon1"/>
- </div>
- </div>
- </div>
- </div>
- <div class="row">
- <div class="text-center" style="padding-top:20px;">
- <button id="generate" class="oe_button oe_form_button myButton">Generar</button>
- </div>
- <br/>
- </div>
- </div>
- <div class="report-form" style="display:none;">
- <div id="toolbar">
- <button class="myButton print-report" value="pdf">Imprimir Informe</button>
- </div>
- <div class="container" style="width:95%;">
- <table class="table" id="table"
- data-pagination="true"
- data-toggle="table"
- data-toolbar="#toolbar"
- data-show-columns="true"
- data-classes="table table-condensed"
- data-row-style="rowStyle"
- data-search="true"
- data-show-export="true"
- data-show-toggle="true"
- data-show-footer="true"
- data-footer-style="footerStyle"
- data-buttons-class="oe_button oe_form_button myButton"
- data-show-pagination-switch="true"
- data-page-size="10"
- data-search-on-enter-key="true"
- data-undefined-text=" "
- data-pagination-v-align="top"
- >
- <thead style="background:none;">
- <tr>
- <th data-field="ruc"
- data-align="left"
- data-footer-formatter="Totales"
- >RUC</th>
- <th data-field="name"
- data-align="left"
- >Clientes</th>
- <th data-field="total"
- data-align="right"
- data-footer-formatter="TotalFooter"
- >Monto</th>
- </tr>
- </thead>
- </table>
- </div>
- </div>
- <script>
- <!--
- TOTAL CANTIDAD
- -->
- function QuantityFooter(rowsTable) {
- var decimal_places = 0;
- var thousands_separator = '.';
- var decimal_separator = ',';
- if(rowsTable.length > 0){
- decimal_places = rowsTable[0].decimal_places;
- thousands_separator = rowsTable[0].thousands_separator;
- decimal_separator = rowsTable[0].decimal_separator;
- }
- var amount = _.reduce(_.map(rowsTable,function(item){
- return item.quantity_no_format;
- }), function(memo, num){
- return memo + num;
- },0);
- return accounting.formatNumber(amount,decimal_places,thousands_separator,decimal_separator);
- }
- <!--
- TOTAL MONTO
- -->
- function TotalFooter(rowsTable) {
- var decimal_places = 0;
- var thousands_separator = '.';
- var decimal_separator = ',';
- if(rowsTable.length > 0){
- decimal_places = rowsTable[0].decimal_places;
- thousands_separator = rowsTable[0].thousands_separator;
- decimal_separator = rowsTable[0].decimal_separator;
- }
- var amount = _.reduce(_.map(rowsTable,function(item){
- return item.total_no_format;
- }), function(memo, num){
- return memo + num;
- },0);
- return accounting.formatNumber(amount,decimal_places,thousands_separator,decimal_separator);
- }
- <!--
- FOOTER STYLE
- -->
- function footerStyle(row, index) {
- return {
- css: {
- "font-weight": "bold"
- }
- };
- };
- </script>
- </div>
- </t>
- </template>
|