mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04: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['$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_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_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'] = ['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['$exchange_rate'] = ['value' => $this->entity->exchange_rate ?: ' ', 'label' => ctrans('texts.exchange_rate')];
|
||||||
$data['$triangular_tax'] = ['value' => ctrans('texts.triangular_tax'), 'label' => ''];
|
$data['$triangular_tax'] = ['value' => ctrans('texts.triangular_tax'), 'label' => ''];
|
||||||
$data['$tax_info'] = ['value' => $this->taxLabel(), 'label' => ''];
|
$data['$tax_info'] = ['value' => $this->taxLabel(), 'label' => ''];
|
||||||
|
@ -60,6 +60,14 @@ trait Inviteable
|
|||||||
|
|
||||||
public function getPaymentQrCode()
|
public function getPaymentQrCode()
|
||||||
{
|
{
|
||||||
|
return htmlentities(
|
||||||
|
sprintf('<div>%s</div>', $this->getPaymentQrCodeRaw())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getPaymentQrCodeRaw()
|
||||||
|
{
|
||||||
|
|
||||||
$renderer = new ImageRenderer(
|
$renderer = new ImageRenderer(
|
||||||
new RendererStyle(150, margin: 0),
|
new RendererStyle(150, margin: 0),
|
||||||
new SvgImageBackEnd()
|
new SvgImageBackEnd()
|
||||||
@ -68,9 +76,8 @@ trait Inviteable
|
|||||||
|
|
||||||
$qr = $writer->writeString($this->getPaymentLink(), 'utf-8');
|
$qr = $writer->writeString($this->getPaymentLink(), 'utf-8');
|
||||||
|
|
||||||
return htmlentities(
|
return $qr;
|
||||||
sprintf('<div>%s</div>', $qr)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getUnsubscribeLink()
|
public function getUnsubscribeLink()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user