1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-02-22 14:27:42 +01:00

Bugfix stampa interventi

This commit is contained in:
Thomas Zilio 2018-09-05 15:00:19 +02:00
parent c14d0c3ea0
commit eabf705388
2 changed files with 5 additions and 15 deletions

View File

@ -1,5 +1,7 @@
<?php
use Models\Plugin;
/**
* Classe per la gestione delle informazioni relative ai plugin installati.
*

View File

@ -447,9 +447,7 @@ if ($options['pricing']) {
</th>
</tr>';
//$sconto_addebito = $costi_intervento['totale_addebito'] - $costi_intervento['totale_scontato'];
$totale_sconto = $costi_intervento['totale_addebito'] - $costi_intervento['totale_scontato'];
//$totale_sconto = $costi_intervento['sconto_globale'] + $sconto_addebito;
// Eventuale sconto totale
if (!empty($totale_sconto)) {
@ -477,29 +475,19 @@ if ($options['pricing']) {
</tr>';
}
// Leggo iva da applicare
$rs1 = $dbo->fetchArray('SELECT percentuale FROM co_iva WHERE id='.prepare(setting('Iva predefinita')));
$percentuale_iva = $rs1[0]['percentuale'];
$iva = ($costi_intervento['totale_scontato'] / 100 * $percentuale_iva);
// IVA
// Totale intervento
echo '
<tr>
<td colspan="4" class="text-right">
<b>'.tr('Iva (_PRC_%)', [
'_PRC_' => Translator::numberToLocale($percentuale_iva, 0),
], ['upper' => true]).':</b>
<b>'.tr('Iva', [], ['upper' => true]).':</b>
</td>
<th class="text-center">
<b>'.Translator::numberToLocale($iva).' &euro;</b>
<b>'.Translator::numberToLocale($costi_intervento['iva_totale']).' &euro;</b>
</th>
</tr>';
$totale = sum($costi_intervento['totale_scontato'], $iva);
// TOTALE INTERVENTO
echo '
<tr>
@ -507,7 +495,7 @@ if ($options['pricing']) {
<b>'.tr('Totale intervento', [], ['upper' => true]).':</b>
</td>
<th class="text-center">
<b>'.Translator::numberToLocale($totale).' &euro;</b>
<b>'.Translator::numberToLocale($costi_intervento['totale']).' &euro;</b>
</th>
</tr>';
}