diff --git a/htdocs/core/modules/facture/doc/pdf_swissqr.modules.php b/htdocs/core/modules/facture/doc/pdf_swissqr.modules.php index 185c249..fdee638 100644 --- a/htdocs/core/modules/facture/doc/pdf_swissqr.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_swissqr.modules.php @@ -928,15 +928,13 @@ class pdf_swissqr extends ModelePDFFactures $ref = $object->ref; - if (str_contains($ref, 'FA')) + if (str_contains($ref, 'PROV')) { - // Remove FA and - from the invoice reference - $ref = str_replace('FA', '', $ref); - $ref = str_replace('-', '', $ref); - } else { $ref = 0; } + $ref = preg_replace('/[^0-9]/', '', $ref); + // Add payment reference for QR-IBAN // This is what you will need to identify incoming payments. $referenceNumber = QrBill\Reference\QrPaymentReferenceGenerator::generate(