1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-02-23 06:47:40 +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 <?php
use Models\Plugin;
/** /**
* Classe per la gestione delle informazioni relative ai plugin installati. * Classe per la gestione delle informazioni relative ai plugin installati.
* *

View File

@ -447,9 +447,7 @@ if ($options['pricing']) {
</th> </th>
</tr>'; </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['totale_addebito'] - $costi_intervento['totale_scontato'];
//$totale_sconto = $costi_intervento['sconto_globale'] + $sconto_addebito;
// Eventuale sconto totale // Eventuale sconto totale
if (!empty($totale_sconto)) { if (!empty($totale_sconto)) {
@ -477,29 +475,19 @@ if ($options['pricing']) {
</tr>'; </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 // IVA
// Totale intervento // Totale intervento
echo ' echo '
<tr> <tr>
<td colspan="4" class="text-right"> <td colspan="4" class="text-right">
<b>'.tr('Iva (_PRC_%)', [ <b>'.tr('Iva', [], ['upper' => true]).':</b>
'_PRC_' => Translator::numberToLocale($percentuale_iva, 0),
], ['upper' => true]).':</b>
</td> </td>
<th class="text-center"> <th class="text-center">
<b>'.Translator::numberToLocale($iva).' &euro;</b> <b>'.Translator::numberToLocale($costi_intervento['iva_totale']).' &euro;</b>
</th> </th>
</tr>'; </tr>';
$totale = sum($costi_intervento['totale_scontato'], $iva);
// TOTALE INTERVENTO // TOTALE INTERVENTO
echo ' echo '
<tr> <tr>
@ -507,7 +495,7 @@ if ($options['pricing']) {
<b>'.tr('Totale intervento', [], ['upper' => true]).':</b> <b>'.tr('Totale intervento', [], ['upper' => true]).':</b>
</td> </td>
<th class="text-center"> <th class="text-center">
<b>'.Translator::numberToLocale($totale).' &euro;</b> <b>'.Translator::numberToLocale($costi_intervento['totale']).' &euro;</b>
</th> </th>
</tr>'; </tr>';
} }