diff --git a/src/Prints.php b/src/Prints.php
index 9e7a1cb2e..720cf56a8 100755
--- a/src/Prints.php
+++ b/src/Prints.php
@@ -653,8 +653,6 @@ class Prints
// Footer per l'ultima pagina
if (!empty($options['last-page-footer'])) {
- $is_last_page = true;
-
// Generazione dei contenuti del footer
ob_start();
$print_footer = self::filepath($id_print, 'footer.php');
diff --git a/templates/contratti/footer.php b/templates/contratti/footer.php
index 81623bfaf..bc7ca6a50 100755
--- a/templates/contratti/footer.php
+++ b/templates/contratti/footer.php
@@ -17,7 +17,7 @@
* along with this program. If not, see .
*/
-if (!$is_last_page) {
+if (!empty($options['last-page-footer'])) {
return;
}
diff --git a/templates/ddt/footer.php b/templates/ddt/footer.php
index 360ba91f5..51e90840c 100755
--- a/templates/ddt/footer.php
+++ b/templates/ddt/footer.php
@@ -17,7 +17,7 @@
* along with this program. If not, see .
*/
-if (!empty($options['last-page-footer']) && !$is_last_page) {
+if (!empty($options['last-page-footer'])) {
return;
}
diff --git a/templates/fatture/footer.php b/templates/fatture/footer.php
index 6606f981f..0389fa5cd 100755
--- a/templates/fatture/footer.php
+++ b/templates/fatture/footer.php
@@ -17,7 +17,7 @@
* along with this program. If not, see .
*/
-if (!empty($options['last-page-footer']) && !$is_last_page) {
+if (!empty($options['last-page-footer'])) {
return;
}
diff --git a/templates/preventivi/footer.php b/templates/preventivi/footer.php
index 81623bfaf..bc7ca6a50 100755
--- a/templates/preventivi/footer.php
+++ b/templates/preventivi/footer.php
@@ -17,7 +17,7 @@
* along with this program. If not, see .
*/
-if (!$is_last_page) {
+if (!empty($options['last-page-footer'])) {
return;
}