mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-03-30 11:00:23 +02:00
Fix minori su piano dei conti
This commit is contained in:
parent
1d0fad6f19
commit
bc75f0b852
@ -83,8 +83,12 @@ foreach ($primo_livello as $conto_primo) {
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>'.tr('Descrizione').'</th>
|
<th>'.tr('Descrizione').'</th>
|
||||||
<th style="width: 10%" class="text-center">'.tr('Importo').'</th>
|
<th style="width: 10%" class="text-center">'.tr('Importo').'</th>';
|
||||||
<th style="width: 10%" class="text-center">'.tr('Importo reddito').'</th>
|
if($conto_primo['descrizione']=='Economico'){
|
||||||
|
echo '
|
||||||
|
<th style="width: 10%" class="text-center">'.tr('Importo reddito').'</th>';
|
||||||
|
}
|
||||||
|
echo '
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
@ -120,21 +124,9 @@ foreach ($primo_livello as $conto_primo) {
|
|||||||
$totale_conto = -$totale_conto;
|
$totale_conto = -$totale_conto;
|
||||||
$totale_reddito = -$totale_reddito;
|
$totale_reddito = -$totale_reddito;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Somma dei totali
|
$totale_conto2 += $totale_conto;
|
||||||
if ($conto_primo['descrizione'] == 'Patrimoniale') {
|
$totale_reddito2 += $totale_reddito;
|
||||||
if ($totale_conto > 0) {
|
|
||||||
$totale_attivita[] = abs($totale_conto);
|
|
||||||
} else {
|
|
||||||
$totale_passivita[] = abs($totale_conto);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if ($totale_conto > 0) {
|
|
||||||
$totale_ricavi[] = abs($totale_conto);
|
|
||||||
} else {
|
|
||||||
$totale_costi[] = abs($totale_conto);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
<tr style="'.(!empty($numero_movimenti) ? '' : 'opacity: 0.5;').'">
|
<tr style="'.(!empty($numero_movimenti) ? '' : 'opacity: 0.5;').'">
|
||||||
@ -198,10 +190,14 @@ foreach ($primo_livello as $conto_primo) {
|
|||||||
|
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
'.moneyFormat($totale_conto, 2).'
|
'.moneyFormat($totale_conto, 2).'
|
||||||
</td>
|
</td>';
|
||||||
<td class="text-right">
|
if($conto_primo['descrizione']=='Economico'){
|
||||||
'.moneyFormat($totale_reddito, 2).'
|
echo '
|
||||||
</td>
|
<td class="text-right">
|
||||||
|
'.moneyFormat($totale_reddito, 2).'
|
||||||
|
</td>';
|
||||||
|
}
|
||||||
|
echo '
|
||||||
</tr>';
|
</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -210,9 +206,12 @@ foreach ($primo_livello as $conto_primo) {
|
|||||||
|
|
||||||
<tfoot>
|
<tfoot>
|
||||||
<tr>
|
<tr>
|
||||||
<th>'.tr('Descrizione').'</th>
|
<th class="text-right">'.tr('Totale').'</th>
|
||||||
<th class="text-center">'.tr('Importo').'</th>
|
<th class="text-right">'.moneyFormat($totale_conto2).'</th>';
|
||||||
<th class="text-center">'.tr('Importo reddito').'</th>
|
if($conto_primo['descrizione']=='Economico'){
|
||||||
|
echo '<th class="text-right">'.moneyFormat($totale_reddito2).'</th>';
|
||||||
|
}
|
||||||
|
echo '
|
||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
</table>';
|
</table>';
|
||||||
@ -225,6 +224,23 @@ foreach ($primo_livello as $conto_primo) {
|
|||||||
|
|
||||||
<br><br>
|
<br><br>
|
||||||
</div>';
|
</div>';
|
||||||
|
// Somma dei totali
|
||||||
|
if ($conto_primo['descrizione'] == 'Patrimoniale') {
|
||||||
|
if ($totale_conto2 > 0) {
|
||||||
|
$totale_attivita[] = abs($totale_conto2);
|
||||||
|
} else {
|
||||||
|
$totale_passivita[] = abs($totale_conto2);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if ($totale_conto2 > 0) {
|
||||||
|
$totale_ricavi[] = abs($totale_conto2);
|
||||||
|
} else {
|
||||||
|
$totale_costi[] = abs($totale_conto2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$totale_conto2=0;
|
||||||
|
$totale_reddito2=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
|
Loading…
x
Reference in New Issue
Block a user