From 8918230c1a1eb8dd1b4356ecd7bbe129622e04e1 Mon Sep 17 00:00:00 2001 From: Benoit Vianin Date: Sun, 12 Mar 2023 10:16:18 +0100 Subject: [PATCH] Add check if IBAN is set before adding the QR part --- htdocs/core/modules/facture/doc/pdf_swissqr.modules.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/htdocs/core/modules/facture/doc/pdf_swissqr.modules.php b/htdocs/core/modules/facture/doc/pdf_swissqr.modules.php index 8909773..185c249 100644 --- a/htdocs/core/modules/facture/doc/pdf_swissqr.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_swissqr.modules.php @@ -855,9 +855,12 @@ class pdf_swissqr extends ModelePDFFactures } // Add page for the Swiss QR-invoice - $pdf->AddPage(); - $this->_pagehead($pdf, $object, 0, $outputlangs); - $this->qrinvoice($pdf, $object, $outputlangs, $conf); + if (isset($object->iban)) + { + $pdf->AddPage(); + $this->_pagehead($pdf, $object, 0, $outputlangs); + $this->qrinvoice($pdf, $object, $outputlangs, $conf); + } $pdf->Close();