cleanup: simplify QR language selection

This commit is contained in:
Didier 'OdyX' Raboud 2023-03-12 14:48:56 +01:00
parent 408b958226
commit eafde2ad7e
No known key found for this signature in database
GPG Key ID: EA830BC6A684CD7C
1 changed files with 2 additions and 8 deletions

View File

@ -961,14 +961,8 @@ class pdf_swissqr extends ModelePDFFactures
exit; exit;
} }
// Define the translation to use $qrLang = in_array($langs->shortlang, ['de', 'fr', 'it']) ? $langs->shortlang : 'en';
if ($langs->shortlang == 'de' || $langs->shortlang == 'fr' || $langs->shortlang == 'it' || $langs->shortlang == 'en') $output = new QrBill\PaymentPart\Output\TcPdfOutput\TcPdfOutput($qrBill, $qrLang, $pdf);
{
$output = new QrBill\PaymentPart\Output\TcPdfOutput\TcPdfOutput($qrBill, $langs->shortlang, $pdf);
} else
{
$output = new QrBill\PaymentPart\Output\TcPdfOutput\TcPdfOutput($qrBill, 'en', $pdf);
}
$output->setPrintable(false)->getPaymentPart(); $output->setPrintable(false)->getPaymentPart();
} }