mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-02 17:07:01 +01:00
Aggiunto sconto finale nelle stampe dei documenti se presente
This commit is contained in:
parent
6998ace12b
commit
a0e7ee02aa
@ -193,6 +193,8 @@ $sconto = $documento->sconto;
|
||||
$totale_imponibile = $documento->totale_imponibile;
|
||||
$totale_iva = $documento->iva;
|
||||
$totale = $documento->totale;
|
||||
$sconto_finale = $documento->getScontoFinale();
|
||||
$netto_a_pagare = $documento->netto;
|
||||
|
||||
$show_sconto = $sconto > 0;
|
||||
|
||||
@ -258,6 +260,30 @@ if ($options['pricing']) {
|
||||
<b>'.moneyFormat($totale, 2).'</b>
|
||||
</th>
|
||||
</tr>';
|
||||
|
||||
if($sconto_finale){
|
||||
// SCONTO FINALE
|
||||
echo '
|
||||
<tr>
|
||||
<td colspan="3" class="text-right border-top">
|
||||
<b>'.tr('Sconto finale', [], ['upper' => true]).':</b>
|
||||
</td>
|
||||
<th colspan="2" class="text-right">
|
||||
<b>'.moneyFormat($sconto_finale, 2).'</b>
|
||||
</th>
|
||||
</tr>';
|
||||
|
||||
// NETTO A PAGARE
|
||||
echo '
|
||||
<tr>
|
||||
<td colspan="3" class="text-right border-top">
|
||||
<b>'.tr('Netto a pagare', [], ['upper' => true]).':</b>
|
||||
</td>
|
||||
<th colspan="2" class="text-right">
|
||||
<b>'.moneyFormat($netto_a_pagare, 2).'</b>
|
||||
</th>
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
echo '
|
||||
</table>';
|
||||
|
@ -27,6 +27,8 @@ $sconto = $documento->sconto;
|
||||
$totale_imponibile = $documento->totale_imponibile;
|
||||
$totale_iva = $documento->iva;
|
||||
$totale = $documento->totale;
|
||||
$sconto_finale = $documento->getScontoFinale();
|
||||
$netto_a_pagare = $documento->netto;
|
||||
|
||||
$volume = $documento->volume ?: $documento->volume_calcolato;
|
||||
$peso_lordo = $documento->peso ?: $documento->peso_calcolato;
|
||||
@ -39,7 +41,7 @@ if ($options['pricing']) {
|
||||
// Riga 1
|
||||
echo "
|
||||
<tr>
|
||||
<td rowspan='7'>
|
||||
<td rowspan='10'>
|
||||
<p class='small-bold'>".tr('Note', [], ['upper' => true]).'</p>
|
||||
<p>'.nl2br($documento['note'])."</p>
|
||||
</td>
|
||||
@ -83,6 +85,36 @@ if ($options['pricing']) {
|
||||
".moneyFormat($totale, 2).'
|
||||
</td>
|
||||
</tr>';
|
||||
|
||||
if($sconto_finale){
|
||||
// Riga 4 SCONTO FINALE
|
||||
echo "
|
||||
<tr>
|
||||
<td>
|
||||
<p class='small-bold'>".tr('Sconto finale', [], ['upper' => true])."</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='cell-padded text-right'>
|
||||
".moneyFormat($sconto_finale, 2)."
|
||||
</td>
|
||||
</tr>";
|
||||
|
||||
// Riga 5 NETTO A PAGARE
|
||||
echo "
|
||||
<tr>
|
||||
<td>
|
||||
<p class='small-bold'>".tr('Netto a pagare', [], ['upper' => true])."</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='cell-padded text-right'>
|
||||
".moneyFormat($netto_a_pagare, 2)."
|
||||
</td>
|
||||
</tr>";
|
||||
}
|
||||
} else {
|
||||
// Riga 1
|
||||
echo "
|
||||
|
@ -216,6 +216,8 @@ $sconto = $documento->sconto;
|
||||
$totale_imponibile = $documento->totale_imponibile;
|
||||
$totale_iva = $documento->iva;
|
||||
$totale = $documento->totale;
|
||||
$sconto_finale = $documento->getScontoFinale();
|
||||
$netto_a_pagare = $documento->netto;
|
||||
|
||||
$show_sconto = $sconto > 0;
|
||||
|
||||
@ -285,6 +287,30 @@ if ($options['pricing']) {
|
||||
<b>'.moneyFormat($totale, 2).'</b>
|
||||
</th>
|
||||
</tr>';
|
||||
|
||||
if($sconto_finale){
|
||||
// SCONTO FINALE
|
||||
echo '
|
||||
<tr>
|
||||
<td colspan="'.$colspan.'" class="text-right border-top">
|
||||
<b>'.tr('Sconto finale', [], ['upper' => true]).':</b>
|
||||
</td>
|
||||
<th colspan="2" class="text-right">
|
||||
<b>'.moneyFormat($sconto_finale, 2).'</b>
|
||||
</th>
|
||||
</tr>';
|
||||
|
||||
// NETTO A PAGARE
|
||||
echo '
|
||||
<tr>
|
||||
<td colspan="'.$colspan.'" class="text-right border-top">
|
||||
<b>'.tr('Netto a pagare', [], ['upper' => true]).':</b>
|
||||
</td>
|
||||
<th colspan="2" class="text-right">
|
||||
<b>'.moneyFormat($netto_a_pagare, 2).'</b>
|
||||
</th>
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
|
||||
echo '
|
||||
|
@ -254,6 +254,8 @@ $sconto = $documento->sconto;
|
||||
$totale_imponibile = $documento->totale_imponibile;
|
||||
$totale_iva = $documento->iva;
|
||||
$totale = $documento->totale;
|
||||
$sconto_finale = $documento->getScontoFinale();
|
||||
$netto_a_pagare = $documento->netto;
|
||||
|
||||
$show_sconto = $sconto > 0;
|
||||
|
||||
@ -319,6 +321,30 @@ if (($options['pricing'] && !isset($options['hide_total'])) || $options['show_on
|
||||
<b>'.moneyFormat($totale, 2).'</b>
|
||||
</th>
|
||||
</tr>';
|
||||
|
||||
if($sconto_finale){
|
||||
// SCONTO FINALE
|
||||
echo '
|
||||
<tr>
|
||||
<td colspan="'.($options['show_only_total'] ? 2 : 4).'" class="text-right border-top">
|
||||
<b>'.tr('Sconto finale', [], ['upper' => true]).':</b>
|
||||
</td>
|
||||
<th colspan="'.($options['show_only_total'] ? (($has_images) ? 2 : 1) : (($has_images) ? 3 : 2)).'" class="text-right">
|
||||
<b>'.moneyFormat($sconto_finale, 2).'</b>
|
||||
</th>
|
||||
</tr>';
|
||||
|
||||
// NETTO A PAGARE
|
||||
echo '
|
||||
<tr>
|
||||
<td colspan="'.($options['show_only_total'] ? 2 : 4).'" class="text-right border-top">
|
||||
<b>'.tr('Netto a pagare', [], ['upper' => true]).':</b>
|
||||
</td>
|
||||
<th colspan="'.($options['show_only_total'] ? (($has_images) ? 2 : 1) : (($has_images) ? 3 : 2)).'" class="text-right">
|
||||
<b>'.moneyFormat($netto_a_pagare, 2).'</b>
|
||||
</th>
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
|
||||
echo '
|
||||
|
Loading…
x
Reference in New Issue
Block a user