mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Minor fixes for QR Code generation for live previews
This commit is contained in:
parent
a75fbc1e85
commit
6cb3f5c372
@ -105,11 +105,21 @@ class SwissQrGenerator
|
|||||||
// Add payment reference
|
// Add payment reference
|
||||||
// This is what you will need to identify incoming payments.
|
// This is what you will need to identify incoming payments.
|
||||||
|
|
||||||
|
if(stripos($this->invoice->number, "Live-") === 0)
|
||||||
|
{
|
||||||
|
// we're currently in preview status. Let's give a dummy reference for now
|
||||||
|
$invoice_number = "123456789";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$invoice_number = $this->invoice->number;
|
||||||
|
}
|
||||||
|
|
||||||
if(strlen($this->company->present()->besr_id()) > 1)
|
if(strlen($this->company->present()->besr_id()) > 1)
|
||||||
{
|
{
|
||||||
$referenceNumber = QrBill\Reference\QrPaymentReferenceGenerator::generate(
|
$referenceNumber = QrBill\Reference\QrPaymentReferenceGenerator::generate(
|
||||||
$this->company->present()->besr_id() ?: '', // You receive this number from your bank (BESR-ID). Unless your bank is PostFinance, in that case use NULL.
|
$this->company->present()->besr_id() ?: '', // You receive this number from your bank (BESR-ID). Unless your bank is PostFinance, in that case use NULL.
|
||||||
$this->invoice->number// A number to match the payment with your internal data, e.g. an invoice number
|
$invoice_number// A number to match the payment with your internal data, e.g. an invoice number
|
||||||
);
|
);
|
||||||
|
|
||||||
$qrBill->setPaymentReference(
|
$qrBill->setPaymentReference(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user