mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-16 19:40:44 +01:00
Migliorate logiche options per stampe
This commit is contained in:
parent
c7b79990a8
commit
1423f98e40
@ -128,7 +128,7 @@ foreach ($righe as $riga) {
|
|||||||
'.nl2br($r['descrizione']);
|
'.nl2br($r['descrizione']);
|
||||||
|
|
||||||
if ($riga->isArticolo()) {
|
if ($riga->isArticolo()) {
|
||||||
if ($documento->direzione == 'entrata' && !$options['hide_codice']) {
|
if ($documento->direzione == 'entrata' && !$options['hide-item-number']) {
|
||||||
// Codice articolo
|
// Codice articolo
|
||||||
$text = tr('COD. _COD_', [
|
$text = tr('COD. _COD_', [
|
||||||
'_COD_' => $riga->codice,
|
'_COD_' => $riga->codice,
|
||||||
|
@ -171,7 +171,7 @@ echo "
|
|||||||
if ($options['pricing']) {
|
if ($options['pricing']) {
|
||||||
echo "
|
echo "
|
||||||
<th class='text-center' style='width:15%'>".tr('Prezzo unitario', [], ['upper' => true])."</th>
|
<th class='text-center' style='width:15%'>".tr('Prezzo unitario', [], ['upper' => true])."</th>
|
||||||
<th class='text-center' style='width:15%'>".( $options['hide_total'] ? tr('Importo ivato', [], ['upper' => true ]) : tr( 'Importo', [], ['upper' => true]) )."</th>
|
<th class='text-center' style='width:15%'>".( $options['hide-total'] ? tr('Importo ivato', [], ['upper' => true ]) : tr( 'Importo', [], ['upper' => true]) )."</th>
|
||||||
<th class='text-center' style='width:10%'>".tr('IVA', [], ['upper' => true]).' (%)</th>';
|
<th class='text-center' style='width:10%'>".tr('IVA', [], ['upper' => true]).' (%)</th>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -259,7 +259,7 @@ foreach ($righe as $riga) {
|
|||||||
// Imponibile
|
// Imponibile
|
||||||
echo '
|
echo '
|
||||||
<td class="text-right" style="vertical-align: middle" >
|
<td class="text-right" style="vertical-align: middle" >
|
||||||
'.( ($options['hide_total'] || $prezzi_ivati) ? moneyFormat($riga->totale) : moneyFormat($riga->totale_imponibile) ).'
|
'.( ($options['hide-total'] || $prezzi_ivati) ? moneyFormat($riga->totale) : moneyFormat($riga->totale_imponibile) ).'
|
||||||
</td>';
|
</td>';
|
||||||
|
|
||||||
// Iva
|
// Iva
|
||||||
@ -302,15 +302,15 @@ $netto_a_pagare = $documento->netto;
|
|||||||
$show_sconto = $sconto > 0;
|
$show_sconto = $sconto > 0;
|
||||||
|
|
||||||
// TOTALE COSTI FINALI
|
// TOTALE COSTI FINALI
|
||||||
if (($options['pricing'] && !isset($options['hide_total'])) || $options['show_only_total']) {
|
if (($options['pricing'] && !isset($options['hide-total'])) || $options['show-only-total']) {
|
||||||
// Totale imponibile
|
// Totale imponibile
|
||||||
echo '
|
echo '
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="'.($options['show_only_total'] ? 2 : 4).'" class="text-right border-top">
|
<td colspan="'.($options['show-only-total'] ? 2 : 4).'" class="text-right border-top">
|
||||||
<b>'.tr('Imponibile', [], ['upper' => true]).':</b>
|
<b>'.tr('Imponibile', [], ['upper' => true]).':</b>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<th colspan="'.($options['show_only_total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 2)).'" class="text-right">
|
<th colspan="'.($options['show-only-total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 2)).'" class="text-right">
|
||||||
<b>'.moneyFormat($show_sconto ? $imponibile : $totale_imponibile, 2).'</b>
|
<b>'.moneyFormat($show_sconto ? $imponibile : $totale_imponibile, 2).'</b>
|
||||||
</th>
|
</th>
|
||||||
</tr>';
|
</tr>';
|
||||||
@ -319,11 +319,11 @@ if (($options['pricing'] && !isset($options['hide_total'])) || $options['show_on
|
|||||||
if ($show_sconto) {
|
if ($show_sconto) {
|
||||||
echo '
|
echo '
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="'.($options['show_only_total'] ? 2 : 4).'" class="text-right border-top">
|
<td colspan="'.($options['show-only-total'] ? 2 : 4).'" class="text-right border-top">
|
||||||
<b>'.tr('Sconto', [], ['upper' => true]).':</b>
|
<b>'.tr('Sconto', [], ['upper' => true]).':</b>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<th colspan="'.($options['show_only_total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 2)).'" class="text-right">
|
<th colspan="'.($options['show-only-total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 2)).'" class="text-right">
|
||||||
<b>'.moneyFormat($sconto, 2).'</b>
|
<b>'.moneyFormat($sconto, 2).'</b>
|
||||||
</th>
|
</th>
|
||||||
</tr>';
|
</tr>';
|
||||||
@ -331,11 +331,11 @@ if (($options['pricing'] && !isset($options['hide_total'])) || $options['show_on
|
|||||||
// Totale imponibile
|
// Totale imponibile
|
||||||
echo '
|
echo '
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="'.($options['show_only_total'] ? 2 : 4).'" class="text-right border-top">
|
<td colspan="'.($options['show-only-total'] ? 2 : 4).'" class="text-right border-top">
|
||||||
<b>'.tr('Totale imponibile', [], ['upper' => true]).':</b>
|
<b>'.tr('Totale imponibile', [], ['upper' => true]).':</b>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<th colspan="'.($options['show_only_total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 2)).'" class="text-right">
|
<th colspan="'.($options['show-only-total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 2)).'" class="text-right">
|
||||||
<b>'.moneyFormat($totale_imponibile, 2).'</b>
|
<b>'.moneyFormat($totale_imponibile, 2).'</b>
|
||||||
</th>
|
</th>
|
||||||
</tr>';
|
</tr>';
|
||||||
@ -344,11 +344,11 @@ if (($options['pricing'] && !isset($options['hide_total'])) || $options['show_on
|
|||||||
// IVA
|
// IVA
|
||||||
echo '
|
echo '
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="'.($options['show_only_total'] ? 2 : 4).'" class="text-right border-top">
|
<td colspan="'.($options['show-only-total'] ? 2 : 4).'" class="text-right border-top">
|
||||||
<b>'.tr('Totale IVA', [], ['upper' => true]).':</b>
|
<b>'.tr('Totale IVA', [], ['upper' => true]).':</b>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<th colspan="'.($options['show_only_total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 2)).'" class="text-right">
|
<th colspan="'.($options['show-only-total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 2)).'" class="text-right">
|
||||||
<b>'.moneyFormat($totale_iva, 2).'</b>
|
<b>'.moneyFormat($totale_iva, 2).'</b>
|
||||||
</th>
|
</th>
|
||||||
</tr>';
|
</tr>';
|
||||||
@ -356,10 +356,10 @@ if (($options['pricing'] && !isset($options['hide_total'])) || $options['show_on
|
|||||||
// TOTALE
|
// TOTALE
|
||||||
echo '
|
echo '
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="'.($options['show_only_total'] ? 2 : 4).'" class="text-right border-top">
|
<td colspan="'.($options['show-only-total'] ? 2 : 4).'" class="text-right border-top">
|
||||||
<b>'.tr('Totale documento', [], ['upper' => true]).':</b>
|
<b>'.tr('Totale documento', [], ['upper' => true]).':</b>
|
||||||
</td>
|
</td>
|
||||||
<th colspan="'.($options['show_only_total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 2)).'" class="text-right">
|
<th colspan="'.($options['show-only-total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 2)).'" class="text-right">
|
||||||
<b>'.moneyFormat($totale, 2).'</b>
|
<b>'.moneyFormat($totale, 2).'</b>
|
||||||
</th>
|
</th>
|
||||||
</tr>';
|
</tr>';
|
||||||
@ -368,10 +368,10 @@ if (($options['pricing'] && !isset($options['hide_total'])) || $options['show_on
|
|||||||
// SCONTO IN FATTURA
|
// SCONTO IN FATTURA
|
||||||
echo '
|
echo '
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="'.($options['show_only_total'] ? 2 : 4).'" class="text-right border-top">
|
<td colspan="'.($options['show-only-total'] ? 2 : 4).'" class="text-right border-top">
|
||||||
<b>'.tr('Sconto in fattura', [], ['upper' => true]).':</b>
|
<b>'.tr('Sconto in fattura', [], ['upper' => true]).':</b>
|
||||||
</td>
|
</td>
|
||||||
<th colspan="'.($options['show_only_total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 2)).'" class="text-right">
|
<th colspan="'.($options['show-only-total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 2)).'" class="text-right">
|
||||||
<b>'.moneyFormat($sconto_finale, 2).'</b>
|
<b>'.moneyFormat($sconto_finale, 2).'</b>
|
||||||
</th>
|
</th>
|
||||||
</tr>';
|
</tr>';
|
||||||
@ -379,10 +379,10 @@ if (($options['pricing'] && !isset($options['hide_total'])) || $options['show_on
|
|||||||
// NETTO A PAGARE
|
// NETTO A PAGARE
|
||||||
echo '
|
echo '
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="'.($options['show_only_total'] ? 2 : 4).'" class="text-right border-top">
|
<td colspan="'.($options['show-only-total'] ? 2 : 4).'" class="text-right border-top">
|
||||||
<b>'.tr('Netto a pagare', [], ['upper' => true]).':</b>
|
<b>'.tr('Netto a pagare', [], ['upper' => true]).':</b>
|
||||||
</td>
|
</td>
|
||||||
<th colspan="'.($options['show_only_total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 2)).'" class="text-right">
|
<th colspan="'.($options['show-only-total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 2)).'" class="text-right">
|
||||||
<b>'.moneyFormat($netto_a_pagare, 2).'</b>
|
<b>'.moneyFormat($netto_a_pagare, 2).'</b>
|
||||||
</th>
|
</th>
|
||||||
</tr>';
|
</tr>';
|
||||||
|
@ -28,5 +28,11 @@ UPDATE `zz_settings` SET `valore` = 'col-md-3', `tipo` = 'list[col-md-1,col-md-2
|
|||||||
UPDATE `zz_widgets` SET `class` = NULL;
|
UPDATE `zz_widgets` SET `class` = NULL;
|
||||||
|
|
||||||
-- Aggiunto available_options per zz_prints
|
-- Aggiunto available_options per zz_prints
|
||||||
ALTER TABLE `zz_prints` ADD `available_options` VARCHAR(255) NULL AFTER `enabled`;
|
ALTER TABLE `zz_prints` ADD `available_options` TEXT NULL AFTER `enabled`;
|
||||||
UPDATE `zz_prints` SET `available_options` = '{"pricing":"Visualizza prezzi sulla stampa", "last-page-footer": "Visualizza footer ultima pagina", "hide-item-number": "Nasconde codici degli articoli"}' WHERE `zz_prints`.`name` = '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)';
|
||||||
|
|
||||||
|
UPDATE `zz_prints` SET `options` = '{\"pricing\":true, \"hide-total\":true}' WHERE `zz_prints`.`name` = 'Preventivo (senza totali)';
|
||||||
|
UPDATE `zz_prints` SET `options` = '{\"pricing\":false, \"show-only-total\":true}' WHERE `zz_prints`.`name` = 'Preventivo (solo totale)';
|
Loading…
x
Reference in New Issue
Block a user