Remove all non numeric character form invoice ref and set reference to 0 for PROV invoice
This commit is contained in:
parent
8918230c1a
commit
298de15213
|
|
@ -928,15 +928,13 @@ class pdf_swissqr extends ModelePDFFactures
|
||||||
|
|
||||||
$ref = $object->ref;
|
$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 = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$ref = preg_replace('/[^0-9]/', '', $ref);
|
||||||
|
|
||||||
// Add payment reference for QR-IBAN
|
// Add payment reference for QR-IBAN
|
||||||
// This is what you will need to identify incoming payments.
|
// This is what you will need to identify incoming payments.
|
||||||
$referenceNumber = QrBill\Reference\QrPaymentReferenceGenerator::generate(
|
$referenceNumber = QrBill\Reference\QrPaymentReferenceGenerator::generate(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue