diff --git a/modules/stampe/edit.php b/modules/stampe/edit.php index 6a4677838..e6d6f7313 100755 --- a/modules/stampe/edit.php +++ b/modules/stampe/edit.php @@ -55,7 +55,7 @@ $id_files = $dbo->select('zz_files_print', 'id_file', [], ['id_print' => $id_rec
- {[ "type": "select", "multiple": "1", "label": "", "name": "id_files[]", "value": "", "ajax-source": "allegati", "select-options": $id_module, 'id_record' => $id_record]); ?>, "link": "allegato" ]} + {[ "type": "select", "multiple": "1", "label": "", "name": "id_files[]", "value": "", "help": "", "ajax-source": "allegati", "select-options": $id_module, 'id_record' => $id_record]); ?>, "link": "allegato" ]}
diff --git a/modules/stato_servizi/elenco-sessioni.php b/modules/stato_servizi/elenco-sessioni.php index 945c37b75..666b599e2 100644 --- a/modules/stato_servizi/elenco-sessioni.php +++ b/modules/stato_servizi/elenco-sessioni.php @@ -93,5 +93,5 @@ if (setting('Attiva notifica di presenza utenti sul record')) { '; } else { - echo 'Non è possibile monitorare la presenta degli utenti.'; + echo ''.tr('Non è possibile monitorare la presenta degli utenti, attiva l\'impostazione di notifica di presenza utenti sul record').'.'; } diff --git a/modules/stato_servizi/widgets/spazio_utilizzato.php b/modules/stato_servizi/widgets/spazio_utilizzato.php index 735876a15..d4ca7b1ee 100755 --- a/modules/stato_servizi/widgets/spazio_utilizzato.php +++ b/modules/stato_servizi/widgets/spazio_utilizzato.php @@ -36,7 +36,7 @@ $(document).ready(function() { url: globals.rootdir + "/actions.php", type: "get", data: { - id_module: '.$id_module.', + id_module: '.$id_module. ', op: "sizes", }, success: function(data) { @@ -90,17 +90,16 @@ function crea_grafico(values){ } - - $labels.push(element.description + " (" + element.formattedSize + ")" + " [" + element.count + "]" ) - - + }); options = { + responsive: true, + maintainAspectRatio: false, legend: { display: true, - position: "right" + position: "right", }, animation:{ animateScale: true, @@ -164,6 +163,6 @@ function crea_grafico(values){ }
-
+
'; diff --git a/src/Prints.php b/src/Prints.php index 9e7a1cb2e..720cf56a8 100755 --- a/src/Prints.php +++ b/src/Prints.php @@ -653,8 +653,6 @@ class Prints // Footer per l'ultima pagina if (!empty($options['last-page-footer'])) { - $is_last_page = true; - // Generazione dei contenuti del footer ob_start(); $print_footer = self::filepath($id_print, 'footer.php'); diff --git a/templates/contratti/body.php b/templates/contratti/body.php index 6a5c62347..91fbc9cae 100755 --- a/templates/contratti/body.php +++ b/templates/contratti/body.php @@ -24,8 +24,20 @@ include_once __DIR__.'/../../core.php'; $prezzi_ivati = setting('Utilizza prezzi di vendita comprensivi di IVA'); +// Righe documento +$righe = $documento->getRighe(); + +$has_image = $righe->search(fn ($item) => !empty($item->articolo->immagine)) !== false && $options['images'] == true; + +$columns = $options['no-iva'] ? 5 : 6; +$columns = $options['pricing'] ? $columns : 3; + +if ($has_image) { + ++$columns; +} + // Creazione righe fantasma -$autofill = new Util\Autofill($options['pricing'] ? 4 : 2); +$autofill = new Util\Autofill($columns); $autofill->setRows(20, 10); echo ' @@ -111,13 +123,26 @@ echo " + "; + +if ($has_image) { + echo " + "; +} + +echo " '; if ($options['pricing']) { echo " - - '; + '; + if (!$options['no-iva']) { + echo " + '; + } + echo " + '; } echo ' @@ -126,8 +151,8 @@ echo ' '; -// Righe documento -$righe = $documento->getRighe(); + + if (!setting('Visualizza riferimento su ogni riga in stampa')) { $riferimenti = []; @@ -147,15 +172,37 @@ if (!setting('Visualizza riferimento su ogni riga in stampa')) { } } } - +$num = 0; foreach ($righe as $riga) { + ++$num; $r = $riga->toArray(); $autofill->count($r['descrizione']); - echo ' + echo + ' + '; + + if ($has_image) { + if ($riga->isArticolo() && !empty($riga->articolo->image)) { + echo ' + '; + + $autofill->set(5); + } else { + echo ' + '; + } + } + +echo ' - - '; @@ -288,11 +335,11 @@ if ($options['pricing']) { if ($show_sconto) { echo ' - - '; @@ -300,66 +347,77 @@ if ($options['pricing']) { // Totale imponibile echo ' - - '; } - - // IVA - echo ' - - - - - '; - - // TOTALE - echo ' - - - - '; - - if ($sconto_finale) { - // SCONTO IN FATTURA + if (!$options['no-iva']) { + // IVA echo ' - - '; - // NETTO A PAGARE + // TOTALE echo ' - + '; + + if ($sconto_finale) { + // SCONTO IN FATTURA + echo ' + + + + '; + + // NETTO A PAGARE + echo ' + + + + '; + } } } echo '
#Foto".tr('Descrizione', [], ['upper' => true])." ".tr('Q.tà', [], ['upper' => true]).'".tr('Prezzo unitario', [], ['upper' => true])."".tr('Imponibile', [], ['upper' => true]).'" . tr('Prezzo unitario', [], ['upper' => true]) . '" . tr('IVA', [], ['upper' => true]) . ' (%)" . ($options['hide-total'] ? tr('Importo ivato', [], ['upper' => true]) : tr('Importo', [], ['upper' => true])) . '
+ ' . $num . ' + + + '; + $text = ''; foreach ($riferimenti as $key => $riferimento) { @@ -271,15 +318,15 @@ $netto_a_pagare = $documento->netto; $show_sconto = $sconto > 0; // TOTALE COSTI FINALI -if ($options['pricing']) { +if (($options['pricing'] && !isset($options['hide-total'])) || $options['show-only-total']) { // Totale imponibile echo '
- '.tr('Imponibile', [], ['upper' => true]).': + + '.tr('Imponibile', [], ['upper' => true]). ': + '.moneyFormat($show_sconto ? $imponibile : $totale_imponibile, $d_totali).'
- '.tr('Sconto', [], ['upper' => true]).': + + '.tr('Sconto', [], ['upper' => true]). ': + '.moneyFormat($sconto, $d_totali).'
- '.tr('Totale imponibile', [], ['upper' => true]).': + + '.tr('Totale imponibile', [], ['upper' => true]). ': + '.moneyFormat($totale_imponibile, $d_totali).'
- '.tr('Totale IVA', [], ['upper' => true]).': - - '.moneyFormat($totale_iva, $d_totali).' -
- '.tr('Totale documento', [], ['upper' => true]).': - - '.moneyFormat($totale, $d_totali).' -
- '.tr('Sconto in fattura', [], ['upper' => true]).': + + '.tr('Totale IVA', [], ['upper' => true]). ': - '.moneyFormat($sconto_finale, $d_totali).' + + + '.moneyFormat($totale_iva, $d_totali).'
- '.tr('Netto a pagare', [], ['upper' => true]).': + + '.tr('Totale documento', [], ['upper' => true]).': - '.moneyFormat($netto_a_pagare, $d_totali).' + '.moneyFormat($totale, $d_totali).'
+ '.tr('Sconto in fattura', [], ['upper' => true]). ': + + '.moneyFormat($sconto_finale, $d_totali).' +
+ '.tr('Netto a pagare', [], ['upper' => true]). ': + + '.moneyFormat($netto_a_pagare, $d_totali).' +
'; +if ($options['no-iva']) { + echo ' +

+ Importo IVA esclusa +

+'; +} + + // CONDIZIONI GENERALI DI FORNITURA $pagamento = Pagamento::find($documento['idpagamento']); diff --git a/templates/contratti/footer.php b/templates/contratti/footer.php index 81623bfaf..bc7ca6a50 100755 --- a/templates/contratti/footer.php +++ b/templates/contratti/footer.php @@ -17,7 +17,7 @@ * along with this program. If not, see . */ -if (!$is_last_page) { +if (!empty($options['last-page-footer'])) { return; } diff --git a/templates/ddt/footer.php b/templates/ddt/footer.php index 360ba91f5..51e90840c 100755 --- a/templates/ddt/footer.php +++ b/templates/ddt/footer.php @@ -17,7 +17,7 @@ * along with this program. If not, see . */ -if (!empty($options['last-page-footer']) && !$is_last_page) { +if (!empty($options['last-page-footer'])) { return; } diff --git a/templates/fatture/footer.php b/templates/fatture/footer.php index 6606f981f..0389fa5cd 100755 --- a/templates/fatture/footer.php +++ b/templates/fatture/footer.php @@ -17,7 +17,7 @@ * along with this program. If not, see . */ -if (!empty($options['last-page-footer']) && !$is_last_page) { +if (!empty($options['last-page-footer'])) { return; } diff --git a/templates/preventivi/body.php b/templates/preventivi/body.php index 0e3c103b1..325d96625 100755 --- a/templates/preventivi/body.php +++ b/templates/preventivi/body.php @@ -419,6 +419,7 @@ if (($options['pricing'] && !isset($options['hide-total'])) || $options['show-on '.tr('Totale documento', [], ['upper' => true]).': + '.moneyFormat($totale, $d_totali).' diff --git a/templates/preventivi/footer.php b/templates/preventivi/footer.php index 81623bfaf..bc7ca6a50 100755 --- a/templates/preventivi/footer.php +++ b/templates/preventivi/footer.php @@ -17,7 +17,7 @@ * along with this program. If not, see . */ -if (!$is_last_page) { +if (!empty($options['last-page-footer'])) { return; } diff --git a/update/2_4_42.sql b/update/2_4_42.sql index f6855442f..5d1ebb573 100644 --- a/update/2_4_42.sql +++ b/update/2_4_42.sql @@ -10,6 +10,7 @@ UPDATE `zz_widgets` SET `class` = NULL; -- Aggiunto available_options per zz_prints ALTER TABLE `zz_prints` ADD `available_options` TEXT NULL AFTER `enabled`; +-- Opzioni possibili per stampa "Preventivo" UPDATE `zz_prints` SET `available_options` = '{\"pricing\":\"Visualizzare i prezzi\", \"hide-total\": \"Nascondere i totali delle righe\", \"show-only-total\": \"Visualizzare solo i totali del documento\", \"hide-header\": \"Nascondere intestazione\", \"hide-footer\": \"Nascondere footer\", \"last-page-footer\": \"Visualizzare footer solo su ultima pagina\", \"hide-item-number\": \"Nascondere i codici degli articoli\"}' WHERE `zz_prints`.`name` = 'Preventivo'; UPDATE `zz_prints` SET `options` = '{\"pricing\": true, \"last-page-footer\": true, \"hide-item-number\": true}' WHERE `zz_prints`.`name` = 'Ordine cliente (senza codici)'; diff --git a/update/2_5_2.sql b/update/2_5_2.sql index 80fb7c7ce..bb0cdbb38 100644 --- a/update/2_5_2.sql +++ b/update/2_5_2.sql @@ -159,4 +159,8 @@ WHERE HAVING 2=2 ORDER BY - `matricola`" WHERE `name` = 'Impianti'; \ No newline at end of file + `matricola`" WHERE `name` = 'Impianti'; + + +-- Opzioni possibili per stampa del Contratto +UPDATE `zz_prints` SET `available_options` = '{\"pricing\":\"Visualizzare i prezzi\", \"hide-total\": \"Nascondere i totali delle righe\", \"show-only-total\": \"Visualizzare solo i totali del documento\", \"hide-header\": \"Nascondere intestazione\", \"hide-footer\": \"Nascondere footer\", \"last-page-footer\": \"Visualizzare footer solo su ultima pagina\", \"hide-item-number\": \"Nascondere i codici degli articoli\"}' WHERE `zz_prints`.`name` = 'Contratto'; \ No newline at end of file