mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-09-20 08:21:34 +02:00
Create raw version of qr code
This commit is contained in:
parent
26278aec63
commit
160d961974
@ -176,7 +176,10 @@ class HtmlEngine
|
||||
$data['$credit.datetime'] = &$data['$entity.datetime'];
|
||||
$data['$payment_button'] = ['value' => $this->buildViewButton($this->invitation->getPaymentLink(), ctrans('texts.pay_now')), 'label' => ctrans('texts.pay_now')];
|
||||
$data['$payment_link'] = ['value' => $this->invitation->getPaymentLink(), 'label' => ctrans('texts.pay_now')];
|
||||
|
||||
$data['$payment_qrcode'] = ['value' => $this->invitation->getPaymentQrCode(), 'label' => ctrans('texts.pay_now')];
|
||||
$data['$payment_qrcode_raw'] = ['value' => $this->invitation->getPaymentQrCodeRaw(), 'label' => ctrans('texts.pay_now')];
|
||||
|
||||
$data['$exchange_rate'] = ['value' => $this->entity->exchange_rate ?: ' ', 'label' => ctrans('texts.exchange_rate')];
|
||||
$data['$triangular_tax'] = ['value' => ctrans('texts.triangular_tax'), 'label' => ''];
|
||||
$data['$tax_info'] = ['value' => $this->taxLabel(), 'label' => ''];
|
||||
|
@ -60,6 +60,14 @@ trait Inviteable
|
||||
|
||||
public function getPaymentQrCode()
|
||||
{
|
||||
return htmlentities(
|
||||
sprintf('<div>%s</div>', $this->getPaymentQrCodeRaw())
|
||||
);
|
||||
}
|
||||
|
||||
public function getPaymentQrCodeRaw()
|
||||
{
|
||||
|
||||
$renderer = new ImageRenderer(
|
||||
new RendererStyle(150, margin: 0),
|
||||
new SvgImageBackEnd()
|
||||
@ -68,9 +76,8 @@ trait Inviteable
|
||||
|
||||
$qr = $writer->writeString($this->getPaymentLink(), 'utf-8');
|
||||
|
||||
return htmlentities(
|
||||
sprintf('<div>%s</div>', $qr)
|
||||
);
|
||||
return $qr;
|
||||
|
||||
}
|
||||
|
||||
public function getUnsubscribeLink()
|
||||
|
Loading…
Reference in New Issue
Block a user