1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-02-24 15:27:43 +01:00

Totali sommabili per le fatture e visualizzati in stampa datatables

This commit is contained in:
Luca 2018-05-24 12:51:09 +02:00
parent e18135d8c1
commit 5441da4551
2 changed files with 15 additions and 0 deletions

View File

@ -586,6 +586,16 @@ function start_datatables() {
},
{
extend: 'print',
customize: function ( win ) {
$(win.document.body)
.css( 'font-size', '10pt' )
.append(
'<table class="main-records table table-condensed table-bordered dataTable" ><tfoot><tr><td colspan="3" ></td><td class="pull-right" >'+$('#summable').text()+'</td><td></td></tr></tfoot></table>',
);
$(win.document.body).find( 'table' )
.addClass( 'compact' )
.css( 'font-size', 'inherit' );
},
exportOptions: {
modifier: {
selected: true
@ -724,6 +734,7 @@ function start_datatables() {
this.api().columns().every(function () {
if (sum.summable[i] != undefined) {
$(this.footer()).addClass("text-right");
$(this.footer()).attr("id", "summable");
$(this.footer()).html(sum.summable[i]);
} else $(this.footer()).html("&nbsp;");
i++;

View File

@ -219,3 +219,7 @@ UPDATE `zz_files` SET `id_plugin` = NULL WHERE `id_plugin` = 0;
-- Fix id_module (zz_files)
ALTER TABLE `zz_files` CHANGE `id_module` `id_module` INT(11) NULL;
UPDATE `zz_files` SET `id_module` = NULL WHERE `id_module` = 0;
-- Totali fatture, sommabile
UPDATE `zz_views` SET `summable` = '1' WHERE `zz_views`.`id_module` = (SELECT `id` FROM `zz_modules` WHERE `name` = 'Fatture di vendita') AND name = 'Totale';
UPDATE `zz_views` SET `summable` = '1' WHERE `zz_views`.`id_module` = (SELECT `id` FROM `zz_modules` WHERE `name` = 'Fatture di acquisto') AND name = 'Totale';