From bdedec19db6b737990c176ef7e9489c93782335c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Tue, 8 Dec 2020 13:19:38 +0100 Subject: [PATCH] remove balance due & total from delivery note pdf --- app/Services/PdfMaker/Design.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/Services/PdfMaker/Design.php b/app/Services/PdfMaker/Design.php index f4897c8aa9..3c5115facb 100644 --- a/app/Services/PdfMaker/Design.php +++ b/app/Services/PdfMaker/Design.php @@ -192,6 +192,13 @@ class Design extends BaseDesign $elements = []; + // We don't want to show account balance or invoice total on PDF.. or any amount with currency. + if ($this->type == 'delivery_note') { + $variables = array_filter($variables, function ($m) { + return !in_array($m, ['$invoice.balance_due', '$invoice.total']); + }); + } + foreach ($variables as $variable) { $_variable = explode('.', $variable)[1]; $_customs = ['custom1', 'custom2', 'custom3', 'custom4'];