Merge branch 'master' into 2.4.11

This commit is contained in:
Thomas Zilio 2019-07-16 10:34:51 +02:00
commit ab147b00a3
4 changed files with 31 additions and 6 deletions

View File

@ -5,6 +5,7 @@ use Modules\Interventi\Intervento;
include_once __DIR__.'/../../core.php';
$documento = Intervento::find($id_record);
$costi = get_costi_intervento($id_record);
// Impostazioni per la gestione
$options = [

View File

@ -5,6 +5,7 @@ use Modules\Interventi\Intervento;
include_once __DIR__.'/../../core.php';
$documento = Intervento::find($id_record);
$costi = get_costi_intervento($id_record);
// Impostazioni per la gestione
$options = [

View File

@ -139,11 +139,11 @@ echo '
<tr>
<td class="cell-padded">
'.(!empty($peso_lordo) ? Translator::numberToLocale($peso_lordo) : '').'&nbsp;KG
'.(!empty($peso_lordo) ? Translator::numberToLocale($peso_lordo).'&nbsp;KG' : '').'
</td>
<td class="cell-padded">
'.(!empty($volume) ? Translator::numberToLocale($volume) : '').'&nbsp;M<sup>3</sup>
'.(!empty($volume) ? Translator::numberToLocale($volume).'&nbsp;M<sup>3</sup>' : '').'
</td>
<td class="cell-padded">

View File

@ -10,6 +10,13 @@ $netto_a_pagare = abs($documento->netto);
$show_sconto = $sconto > 0;
$volume = $righe->sum(function ($item) {
return $item->isArticolo() ? $item->articolo->volume : 0;
});
$peso_lordo = $righe->sum(function ($item) {
return $item->isArticolo() ? $item->articolo->peso_lordo : 0;
});
$width = round(100 / ($show_sconto ? 5 : 3), 2);
// SCADENZE | TOTALI
@ -298,24 +305,40 @@ if ($fattura_accompagnatoria) {
echo '
<table class="table-bordered">
<tr>
<th class="small" class style="width:25%">
<th class="small" class style="width:15%">
'.tr('Peso lordo', [], ['upper' => true]).'
</th>
<th class="small" class style="width:15%">
'.tr('Volume', [], ['upper' => true]).'
</th>
<th class="small" class style="width:15%">
'.tr('Aspetto beni', [], ['upper' => true]).'
</th>
<th class="small" class style="width:20%">
'.tr('Num. colli', [], ['upper' => true]).'
<th class="small" class style="width:10%">
'.tr('Colli', [], ['upper' => true]).'
</th>
<th class="small" style="width:30%">
'.tr('Causale trasporto', [], ['upper' => true]).'
</th>
<th class="small" style="width:25%">
<th class="small" style="width:15%">
'.tr('Porto', [], ['upper' => true]).'
</th>
</tr>
<tr>
<td class="cell-padded">
'.(!empty($peso_lordo) ? Translator::numberToLocale($peso_lordo).'&nbsp;KG' : '').'
</td>
<td class="cell-padded">
'.(!empty($volume) ? Translator::numberToLocale($volume).'&nbsp;M<sup>3</sup>' : '').'
</td>
<td class="cell-padded">
$aspettobeni$ &nbsp;
</td>