mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 10:54:41 -04:00
fix SEPA QR Code recurring invoice
This commit is contained in:
parent
03d8864652
commit
2a3ef46493
@ -13,6 +13,7 @@ namespace App\Helpers\Epc;
|
||||
|
||||
use App\Models\Company;
|
||||
use App\Models\Invoice;
|
||||
use App\Models\RecurringInvoice;
|
||||
use App\Utils\Ninja;
|
||||
use BaconQrCode\Renderer\ImageRenderer;
|
||||
use BaconQrCode\Renderer\Image\SvgImageBackEnd;
|
||||
@ -35,7 +36,7 @@ class EpcQrGenerator
|
||||
|
||||
];
|
||||
|
||||
public function __construct(protected Company $company, protected Invoice $invoice, protected float $amount){}
|
||||
public function __construct(protected Company $company, protected Invoice|RecurringInvoice $invoice, protected float $amount){}
|
||||
|
||||
public function getQrCode()
|
||||
{
|
||||
|
@ -596,7 +596,7 @@ class HtmlEngine
|
||||
$data['$payments'] = ['value' => $payment_list, 'label' => ctrans('texts.payments')];
|
||||
}
|
||||
|
||||
if($this->entity_string == 'invoice' && isset($this->company?->custom_fields?->company1))
|
||||
if(($this->entity_string == 'invoice' || $this->entity_string == 'recurring_invoice') && isset($this->company?->custom_fields?->company1))
|
||||
{
|
||||
$data['$sepa_qr_code'] = ['value' => (new EpcQrGenerator($this->company, $this->entity,$data['$amount_raw']['value']))->getQrCode(), 'label' => ''];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user