This commit is contained in:
MatteoPistorello 2022-10-05 12:06:53 +02:00
commit 818aade69c
2 changed files with 25 additions and 33 deletions

View File

@ -258,7 +258,7 @@ $diff = sum($budget, -$totale);
echo '
<div class="well text-center">
<br><span><big>
<b>'.tr('Rapporto budget/spesa').':<br>';
<b>'.tr('Budget rimanente').':<br>';
if ($diff > 0) {
echo '
<span class="text-success"><big>+'.moneyFormat($diff).'</big></span>';
@ -278,11 +278,11 @@ if ($diff > 0) {
<table class="table text-left table-striped table-bordered">
<tr>
<th>'.tr('Tipologia').'</th>
<th width="10%">'.tr('Ore').'</th>
<th width="16%">'.tr('Costo').'</th>
<th width="16%">'.tr('Ricavo').'</th>
<th width="10%">'.tr('Margine').'</th>
<th width="10%">'.tr('Ricarico').'</th>
<th width="11%">'.tr('Ore').'</th>
<th width="15%">'.tr('Costo').'</th>
<th width="15%">'.tr('Ricavo').'</th>
<th width="15%">'.tr('Margine').'</th>
<th width="15%">'.tr('Ricarico').'</th>
</tr>';
ksort($tipologie);
foreach ($tipologie as $key => $tipologia){
@ -307,12 +307,12 @@ if ($diff > 0) {
<table class="table text-left table-striped table-bordered">
<tr>
<th>'.tr('Tecnici').'</th>
<th width="7%">'.tr('km').'</th>
<th width="10%">'.tr('Ore').'</th>
<th width="16%">'.tr('Costo').'</th>
<th width="16%">'.tr('Ricavo').'</th>
<th width="10%">'.tr('Margine').'</th>
<th width="10%">'.tr('Ricarico').'</th>
<th width="11%">'.tr('Km').'</th>
<th width="11%">'.tr('Ore').'</th>
<th width="15%">'.tr('Costo').'</th>
<th width="15%">'.tr('Ricavo').'</th>
<th width="15%">'.tr('Margine').'</th>
<th width="15%">'.tr('Ricarico').'</th>
</tr>';
ksort($tecnici);
foreach ($tecnici as $key => $tecnico){
@ -322,8 +322,8 @@ if ($diff > 0) {
echo '
<tr>
<td>'.$key.'</td>
<td class="text-right">'.Translator::numberToLocale($tecnico['km']).'</td>
<td class="text-right">'.Translator::numberToLocale($tecnico['ore']).'</td>
<td class="text-right">'.(int)$tecnico['km'].'</td>
<td class="text-right">'.Translator::numberToLocale($tecnico['costo']).' </td>
<td class="text-right">'.Translator::numberToLocale($tecnico['ricavo']).' </td>
<td class="text-right '.($margine>0 ? 'bg-success' : 'bg-danger').'">'.Translator::numberToLocale($margine).' ('.$margine_prc.'%)</td>
@ -340,11 +340,11 @@ if ($diff > 0) {
<table class="table text-left table-striped table-bordered">
<tr>
<th>'.tr('Stato').'</th>
<th width="10%">'.tr('Ore').'</th>
<th width="16%">'.tr('Costo').'</th>
<th width="16%">'.tr('Ricavo').'</th>
<th width="10%">'.tr('Margine').'</th>
<th width="10%">'.tr('Ricarico').'</th>
<th width="11%">'.tr('Ore').'</th>
<th width="15%">'.tr('Costo').'</th>
<th width="15%">'.tr('Ricavo').'</th>
<th width="15%">'.tr('Margine').'</th>
<th width="15%">'.tr('Ricarico').'</th>
</tr>';
ksort($stati_intervento);
foreach ($stati_intervento as $key => $stato){
@ -369,11 +369,11 @@ if ($diff > 0) {
<table class="table text-left table-striped table-bordered">
<tr>
<th>'.tr('Materiale').'</th>
<th width="8%">'.tr('Qtà').'</th>
<th width="16%">'.tr('Costo').'</th>
<th width="16%">'.tr('Ricavo').'</th>
<th width="10%">'.tr('Margine').'</th>
<th width="10%">'.tr('Ricarico').'</th>
<th width="11%">'.tr('Qtà').'</th>
<th width="15%">'.tr('Costo').'</th>
<th width="15%">'.tr('Ricavo').'</th>
<th width="15%">'.tr('Margine').'</th>
<th width="15%">'.tr('Ricarico').'</th>
</tr>';
ksort($materiali_art);
foreach ($materiali_art as $key => $materiali_array1){

View File

@ -309,10 +309,6 @@ $margine = $preventivo->margine;
$margine_class = ($margine <= 0 && $preventivo->totale > 0) ? 'danger' : 'success';
$margine_icon = ($margine <= 0 && $preventivo->totale > 0) ? 'warning' : 'check';
// Ricarico
$ricarico_class = ($margine <= 0 && $preventivo->totale > 0) ? 'danger' : 'success';
$ricarico_icon = ($margine <= 0 && $preventivo->totale > 0) ? 'warning' : 'check';
echo '
<tr>
<td colspan="7" class="text-right">
@ -345,10 +341,10 @@ echo '
'_PRC_' => numberFormat($preventivo->margine_percentuale),
]).':
</td>
<td class="text-right" class="'.$margine_class.'">
<td class="text-right '.$margine_class.'" rowspan="2" style="vertical-align:middle;">
<i class="fa fa-'.$margine_icon.' text-'.$margine_class.'"></i> '.moneyFormat($preventivo->margine).'
</td>
<td></td>
<td rowspan="2"></td>
</tr>
<tr>
@ -357,10 +353,6 @@ echo '
'_PRC_' => numberFormat($preventivo->ricarico_percentuale),
]).':
</td>
<td class="text-right" class="'.$ricarico_class.'">
<i class="fa fa-'.$ricarico_icon.' text-'.$ricarico_class.'"></i> '.moneyFormat($preventivo->margine).'
</td>
<td></td>
</tr>';
echo '