1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 08:21:34 +02:00

QR codes for invoics as a variable

This commit is contained in:
David Bomba 2022-10-31 09:54:23 +11:00
parent a24f23995e
commit 7d288fc4de

View File

@ -63,17 +63,15 @@ trait Inviteable
{
$renderer = new ImageRenderer(
new RendererStyle(300),
new RendererStyle(200),
new SvgImageBackEnd()
);
$writer = new Writer($renderer);
$qr = $writer->writeString($this->getPaymentLink());
return "<svg viewBox='0 0 300 300' width='300' height='300' preserveAspectRatio='xMidYMid meet' x='0' y='0' xmlns='http://www.w3.org/2000/svg'>
<rect x='0' y='0' width='100%'' height='100%' />
{$qr}
</svg>";
return "<svg viewBox='0 0 200 200' width='200' height='200' x='0' y='0' xmlns='http://www.w3.org/2000/svg'>
<rect x='0' y='0' width='100%'' height='100%' />{$qr}</svg>";
}