diff --git a/src/Prints.php b/src/Prints.php
index 2d19f31b9..2965500b0 100755
--- a/src/Prints.php
+++ b/src/Prints.php
@@ -224,7 +224,7 @@ class Prints
$link .= !empty($infos['previous']) && !empty($id_record) ? '&'.$infos['previous'].'='.$id_record : '';
} else {
- $link .= 'id_print='.$infos['id'];
+ $link .= 'id_print='.$infos;
$link .= !empty($id_record) ? '&id_record='.$id_record : '';
}
diff --git a/templates/bilancio/body.php b/templates/bilancio/body.php
index b75d56033..465f21be0 100644
--- a/templates/bilancio/body.php
+++ b/templates/bilancio/body.php
@@ -93,7 +93,7 @@ foreach ($liv2_patrimoniale as $liv2_p) {
echo '
Totale Attività |
- '.numberFormat(abs($totale_attivita), 2).' |
+ '.($totale_attivita ? numberFormat(abs($totale_attivita), 2): '').' |
';
if ($utile_perdita > 0) {
echo '
@@ -182,7 +182,7 @@ foreach ($liv2_patrimoniale as $liv2_p) {
echo '
Totale Passività |
- '.numberFormat(abs($totale_passivita), 2).' |
+ '.($totale_passivita ? numberFormat(abs($totale_passivita), 2):'').' |
';
if ($utile_perdita < 0) {
echo '
@@ -262,7 +262,7 @@ foreach ($liv2_economico as $liv2_e) {
echo '
Totale costi |
- '.numberFormat(abs($totale_costi), 2).' |
+ '.($totale_costi ? numberFormat(abs($totale_costi), 2) : '').' |
|
';
if ($utile_perdita < 0) {
@@ -274,7 +274,7 @@ if ($utile_perdita < 0) {
Totale a pareggio |
- '.numberFormat(abs($totale_costi) + abs($utile_perdita), 2).' |
+ '.($totale_costi ? numberFormat(abs($totale_costi)) : 0) + ($utile_perdita ? numberFormat(abs($utile_perdita), 2) : 0).' |
|
';
}
@@ -335,7 +335,7 @@ foreach ($liv2_economico as $liv2_e) {
echo '
Totale ricavi |
- '.numberFormat(abs($totale_ricavi), 2).' |
+ '.($totale_ricavi ? numberFormat(abs($totale_ricavi), 2) : '').' |
|
';
if ($utile_perdita > 0) {
diff --git a/templates/partitario_mastrino/bottom.php b/templates/partitario_mastrino/bottom.php
index f8d129901..16357c056 100644
--- a/templates/partitario_mastrino/bottom.php
+++ b/templates/partitario_mastrino/bottom.php
@@ -48,8 +48,9 @@ if (get('lev') == '2' || get('lev') == '3') {
$totale_passivo += $patrimoniale[$i]['totale'];
}
}
- echo '
-
+
TOTALE ATTIVITÀ |
'.moneyFormat(abs($totale_attivo), 2).' |
@@ -60,19 +61,19 @@ if (get('lev') == '2' || get('lev') == '3') {
if ($utile_perdita['totale'] <= 0) {
echo '
- |
- |
- UTILE |
- '.moneyFormat(abs($utile_perdita['totale']), 2).' |
-
';
+ |
+ |
+ UTILE |
+ '.($utile_perdita['totale'] ? moneyFormat(abs($utile_perdita['totale']), 2) : 0).' |
+ ';
$totale_passivo = abs($totale_passivo + $utile_perdita['totale']);
} else {
echo '
- PERDITA |
- '.moneyFormat(abs($utile_perdita['totale']), 2).' |
- |
- |
- ';
+ PERDITA |
+ '.moneyFormat(abs($utile_perdita['totale']), 2).' |
+ |
+ |
+ ';
$totale_attivo = abs($totale_attivo + $utile_perdita['totale']);
}
@@ -83,7 +84,5 @@ if (get('lev') == '2' || get('lev') == '3') {
TOTALE A PAREGGIO |
'.moneyFormat(abs($totale_passivo), 2).' |
-
';
+';
}
-
-echo '';