mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-01 02:04:46 -04:00
Update for Swiss QR
This commit is contained in:
parent
b7b55a7a91
commit
04b053fc29
@ -166,7 +166,7 @@ class SwissQrGenerator
|
|||||||
|
|
||||||
// Now get the QR code image and save it as a file.
|
// Now get the QR code image and save it as a file.
|
||||||
try {
|
try {
|
||||||
$output = new QrBill\PaymentPart\Output\HtmlOutput\HtmlOutput($qrBill, $this->client->locale() ?: 'en');
|
$output = new QrBill\PaymentPart\Output\HtmlOutput\HtmlOutput($qrBill, $this->resolveLanguage());
|
||||||
|
|
||||||
$html = $output
|
$html = $output
|
||||||
->setPrintable(false)
|
->setPrintable(false)
|
||||||
@ -190,4 +190,28 @@ class SwissQrGenerator
|
|||||||
// return $e->getMessage();
|
// return $e->getMessage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function resolveLanguage(): string
|
||||||
|
{
|
||||||
|
$language = $this->client->locale() ?: 'en';
|
||||||
|
|
||||||
|
switch ($language) {
|
||||||
|
case 'de':
|
||||||
|
return 'de';
|
||||||
|
case 'en':
|
||||||
|
case 'en_GB':
|
||||||
|
return 'en';
|
||||||
|
case 'it':
|
||||||
|
return 'it';
|
||||||
|
case 'fr':
|
||||||
|
case 'fr_CA':
|
||||||
|
case 'fr_CH':
|
||||||
|
return 'fr';
|
||||||
|
|
||||||
|
default:
|
||||||
|
return 'en';
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -44,6 +44,8 @@ class PreviewReport implements ShouldQueue
|
|||||||
else
|
else
|
||||||
$report = $export->run();
|
$report = $export->run();
|
||||||
|
|
||||||
|
// nlog($report);
|
||||||
|
|
||||||
Cache::put($this->hash, $report, 60 * 60);
|
Cache::put($this->hash, $report, 60 * 60);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@
|
|||||||
"socialiteproviders/apple": "^5.2",
|
"socialiteproviders/apple": "^5.2",
|
||||||
"socialiteproviders/microsoft": "^4.1",
|
"socialiteproviders/microsoft": "^4.1",
|
||||||
"spatie/laravel-data": "^3.5",
|
"spatie/laravel-data": "^3.5",
|
||||||
"sprain/swiss-qr-bill": "^3.2",
|
"sprain/swiss-qr-bill": "^4.3",
|
||||||
"square/square": "30.0.0.*",
|
"square/square": "30.0.0.*",
|
||||||
"stripe/stripe-php": "^12",
|
"stripe/stripe-php": "^12",
|
||||||
"symfony/http-client": "^6.0",
|
"symfony/http-client": "^6.0",
|
||||||
|
722
composer.lock
generated
722
composer.lock
generated
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user