From f23a1b40b0e8d2a8a91fce7905ec7be46f96d21e Mon Sep 17 00:00:00 2001 From: Didier 'OdyX' Raboud Date: Sun, 12 Mar 2023 16:30:19 +0100 Subject: [PATCH 1/2] fix: force QR block to have black text In case of coloured watermark, this was not reset to black --- htdocs/core/modules/facture/doc/pdf_swissqr.modules.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/modules/facture/doc/pdf_swissqr.modules.php b/htdocs/core/modules/facture/doc/pdf_swissqr.modules.php index fefb8df..759662f 100644 --- a/htdocs/core/modules/facture/doc/pdf_swissqr.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_swissqr.modules.php @@ -857,6 +857,7 @@ class pdf_swissqr extends ModelePDFFactures // Add page for the Swiss QR-invoice $pdf->AddPage(); $this->_pagehead($pdf, $object, 0, $outputlangs); + $pdf->SetTextColor(0, 0, 0); $this->qrinvoice($pdf, $object, $outputlangs); $pdf->Close(); From 2b253071005c66e28a813e198eddaf60023abda3 Mon Sep 17 00:00:00 2001 From: Didier 'OdyX' Raboud Date: Sun, 12 Mar 2023 16:54:12 +0100 Subject: [PATCH 2/2] fix: do not allow Dolibarr's SwitzerlandQR --- htdocs/core/modules/facture/doc/pdf_swissqr.modules.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/modules/facture/doc/pdf_swissqr.modules.php b/htdocs/core/modules/facture/doc/pdf_swissqr.modules.php index fefb8df..696945a 100644 --- a/htdocs/core/modules/facture/doc/pdf_swissqr.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_swissqr.modules.php @@ -460,7 +460,8 @@ class pdf_swissqr extends ModelePDFFactures if (! empty($conf->global->INVOICE_ADD_ZATCA_QR_CODE)) { $qrcodestring = $object->buildZATCAQRString(); } elseif (! empty($conf->global->INVOICE_ADD_SWISS_QR_CODE)) { - $qrcodestring = $object->buildSwitzerlandQRString(); + // Do not allow another QR code; this module is about having the legit one. + // $qrcodestring = $object->buildSwitzerlandQRString(); } if ($qrcodestring) { $qrcodecolor = array('25', '25', '25');