From a5d1f1f68f0c9c3f8cf3d43629a858bd14869bc2 Mon Sep 17 00:00:00 2001 From: Florian Mortgat Date: Fri, 28 Aug 2020 10:02:43 +0200 Subject: [PATCH 1/3] FIX: expenses lines overlapping the frame for total amounts. If there is no room for this frame when printing the last expense line, this line should be on a new page. --- htdocs/core/modules/expensereport/doc/pdf_standard.modules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php index 32a8714cf12..e3d64f190d0 100644 --- a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php @@ -358,7 +358,7 @@ class pdf_standard extends ModeleExpenseReport while ($i < $nblines) { $pdf->SetFont('', '', $default_font_size - 2); // Into loop to work with multipage $pdf->SetTextColor(0, 0, 0); - if (empty($showpricebeforepagebreak)) { + if (empty($showpricebeforepagebreak) && $i !== $nblines - 1) { $pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it. } else { $pdf->setPageOrientation('', 1, $heightforfooter + $heightforfreetext + $heightforinfotot); // The only function to edit the bottom margin of current page to set it. From 173ad057f9805db7eddf7e1deba2b819874d6185 Mon Sep 17 00:00:00 2001 From: FlorianMortgat <5845502+FlorianMortgat@users.noreply.github.com> Date: Fri, 28 Aug 2020 20:46:35 +0200 Subject: [PATCH 2/3] + parentheses around expression for readability --- htdocs/core/modules/expensereport/doc/pdf_standard.modules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php index e3d64f190d0..669827ad14c 100644 --- a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php @@ -358,7 +358,7 @@ class pdf_standard extends ModeleExpenseReport while ($i < $nblines) { $pdf->SetFont('', '', $default_font_size - 2); // Into loop to work with multipage $pdf->SetTextColor(0, 0, 0); - if (empty($showpricebeforepagebreak) && $i !== $nblines - 1) { + if (empty($showpricebeforepagebreak) && $i !== ($nblines - 1)) { $pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it. } else { $pdf->setPageOrientation('', 1, $heightforfooter + $heightforfreetext + $heightforinfotot); // The only function to edit the bottom margin of current page to set it. From c25463a4ba2aa73c5301a7457437849e820acc31 Mon Sep 17 00:00:00 2001 From: FlorianMortgat <5845502+FlorianMortgat@users.noreply.github.com> Date: Fri, 28 Aug 2020 21:07:11 +0200 Subject: [PATCH 3/3] + more parentheses around expression for readability --- htdocs/core/modules/expensereport/doc/pdf_standard.modules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php index 669827ad14c..1b578da172f 100644 --- a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php @@ -358,7 +358,7 @@ class pdf_standard extends ModeleExpenseReport while ($i < $nblines) { $pdf->SetFont('', '', $default_font_size - 2); // Into loop to work with multipage $pdf->SetTextColor(0, 0, 0); - if (empty($showpricebeforepagebreak) && $i !== ($nblines - 1)) { + if (empty($showpricebeforepagebreak) && ($i !== ($nblines - 1))) { $pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it. } else { $pdf->setPageOrientation('', 1, $heightforfooter + $heightforfreetext + $heightforinfotot); // The only function to edit the bottom margin of current page to set it.