Merge remote-tracking branch 'devcode-it/master'

This commit is contained in:
Thomas Zilio 2020-02-14 12:23:56 +01:00
commit c9af0a7a4c
2 changed files with 15 additions and 12 deletions

View File

@ -174,15 +174,15 @@ $totale = $documento->totale;
$show_sconto = $sconto > 0;
// TOTALE COSTI FINALI
if ($options['pricing'] and !isset($options['hide_total'])) {
if (($options['pricing'] && !isset($options['hide_total'])) || $options['show_only_total']) {
// Totale imponibile
echo '
<tr>
<td colspan="3" class="text-right border-top">
<td colspan="'.($options['show_only_total']?1:3).'" class="text-right border-top">
<b>'.tr('Imponibile', [], ['upper' => true]).':</b>
</td>
<th colspan="2" class="text-right">
<th colspan="'.($options['show_only_total']?1:2).'" class="text-right">
<b>'.moneyFormat($show_sconto ? $imponibile : $totale_imponibile, 2).'</b>
</th>
</tr>';
@ -191,11 +191,11 @@ if ($options['pricing'] and !isset($options['hide_total'])) {
if ($show_sconto) {
echo '
<tr>
<td colspan="3" class="text-right border-top">
<td colspan="'.($options['show_only_total']?1:3).'" class="text-right border-top">
<b>'.tr('Sconto', [], ['upper' => true]).':</b>
</td>
<th colspan="2" class="text-right">
<th colspan="'.($options['show_only_total']?1:2).'" class="text-right">
<b>'.moneyFormat($sconto, 2).'</b>
</th>
</tr>';
@ -203,11 +203,11 @@ if ($options['pricing'] and !isset($options['hide_total'])) {
// Totale imponibile
echo '
<tr>
<td colspan="3" class="text-right border-top">
<td colspan="'.($options['show_only_total']?1:3).'" class="text-right border-top">
<b>'.tr('Totale imponibile', [], ['upper' => true]).':</b>
</td>
<th colspan="2" class="text-right">
<th colspan="'.($options['show_only_total']?1:2).'" class="text-right">
<b>'.moneyFormat($totale_imponibile, 2).'</b>
</th>
</tr>';
@ -216,11 +216,11 @@ if ($options['pricing'] and !isset($options['hide_total'])) {
// IVA
echo '
<tr>
<td colspan="3" class="text-right border-top">
<td colspan="'.($options['show_only_total']?1:3).'" class="text-right border-top">
<b>'.tr('Totale IVA', [], ['upper' => true]).':</b>
</td>
<th colspan="2" class="text-right">
<th colspan="'.($options['show_only_total']?1:2).'" class="text-right">
<b>'.moneyFormat($totale_iva, 2).'</b>
</th>
</tr>';
@ -228,10 +228,10 @@ if ($options['pricing'] and !isset($options['hide_total'])) {
// TOTALE
echo '
<tr>
<td colspan="3" class="text-right border-top">
<td colspan="'.($options['show_only_total']?1:3).'" class="text-right border-top">
<b>'.tr('Totale documento', [], ['upper' => true]).':</b>
</td>
<th colspan="2" class="text-right">
<th colspan="'.($options['show_only_total']?1:2).'" class="text-right">
<b>'.moneyFormat($totale, 2).'</b>
</th>
</tr>';

View File

@ -30,4 +30,7 @@ ALTER TABLE `dt_righe_ddt` CHANGE `qta_evasa` `qta_evasa` decimal(14, 6) NOT NUL
ALTER TABLE `co_righe_preventivi` CHANGE `qta_evasa` `qta_evasa` decimal(14, 6) NOT NULL;
ALTER TABLE `co_righe_documenti` CHANGE `qta_evasa` `qta_evasa` decimal(14, 6) NOT NULL;
ALTER TABLE `co_righe_contratti` CHANGE `qta_evasa` `qta_evasa` decimal(14, 6) NOT NULL;
ALTER TABLE `mg_articoli` CHANGE `threshold_qta` `threshold_qta` decimal(14, 6) NOT NULL;
ALTER TABLE `mg_articoli` CHANGE `threshold_qta` `threshold_qta` decimal(14, 6) NOT NULL;
INSERT INTO `zz_prints` (`id`, `id_module`, `is_record`, `name`, `title`, `filename`, `directory`, `previous`, `options`, `icon`, `version`, `compatibility`, `order`, `predefined`, `default`, `enabled`) VALUES
(NULL, (SELECT id FROM zz_modules WHERE `name`='Preventivi'), 1, 'Preventivo (solo totale)', 'Preventivo (solo totale)', 'Preventivo num. {numero} del {data}', 'preventivi', 'idpreventivo', '{\"pricing\":false, \"show_only_total\":true}', 'fa fa-print', '', '', 0, 0, 1, 1);