mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Add support for QR code variables
This commit is contained in:
parent
ce0ebaa63a
commit
e9e4c39f17
@ -90,4 +90,14 @@ class CompanyPresenter extends EntityPresenter
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function getSpcQrCode($client_custom, $invoice_number, $balance)
|
||||
{
|
||||
$settings = $this->entity->settings;
|
||||
|
||||
return
|
||||
|
||||
"SPC\n0200\n1\nCH860021421411198240K\nK\n{$this->name}\n{$settings->address1}\n{$settings->postal_code} {$settings->city}\n\n\nCH\n\n\n\n\n\n\n\n{$balance}\n{$client_custom}\n\n\n\n\n\n\n\nNON\n\n{$invoice_number}\nEPD\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -274,6 +274,8 @@ class HtmlEngine
|
||||
$data['$company.website'] = ['value' => $this->settings->website ?: ' ', 'label' => ctrans('texts.website')];
|
||||
$data['$company.address'] = ['value' => $this->company->present()->address($this->settings) ?: ' ', 'label' => ctrans('texts.address')];
|
||||
|
||||
$data['$spc_qr_code'] = ['value' => $this->company->present()->getSpcQrCode($this->client->custom1, $this->entity->number, $this->entity->balance), 'label' => ''];
|
||||
|
||||
$logo = $this->company->present()->logo($this->settings);
|
||||
|
||||
$data['$company.logo'] = ['value' => $logo ?: ' ', 'label' => ctrans('texts.logo')];
|
||||
|
Loading…
Reference in New Issue
Block a user