In the company settings, the QR IBAN and the BESR ID can be set. I am looking for a solution to my specific problem and wondered if this could only be solved by an additional attitude.
Problem:
I would like to use the Public Notes field for the detailed report. According to the standard behavior of InvoiceNinja, the file app/Helpers/SwissQr/SwissQrGenerator.php checks whether public notes are present. If they exist, they are shortened to 140 characters and displayed in the Additional Information field of the QrBill. If there are no public notes, the string āInvoice + $numberā is returned in the field. The text I enter in the public notes is not suitable for the QrBill.
I tried this:
Created a custom text field (Multi Line) so that I can enter the content of public notes there. Unfortunately, the custom field does not support HTML/markdown nor are new lines respected. The Text becomes one long string.
Possible solution 1:
Insert an additional option in the company settings, where you can define whether the public notes should be used for the Additional Information field (Checkbox Toggle = On) or whether the field should be filled with āInvoice + $numberā (Checkbox Toggle = Off).
Possible Solution 2:
A second option would be to insert another field (like Public Notes) called "Additional Information for QrBill " in the invoice and to hand it over to SwissQrGenerator instead of the public notes. Then only one line would have to be changed in the SwissQrGenerator.
// Optionally, add some human-readable information about what the bill is for.
$qrBill->setAdditionalInformation(
QrBill\DataGroup\Element\AdditionalInformation::create(
$this->invoice->additional_qr_info ? substr($this->invoice->additional_qr_info, 0, 139) : ctrans('texts.invoice_number_placeholder', ['invoice' => $this->invoice->number])
)
);
What do you think? Is there any solution I have overlooked? Would that make sense to expand this?
Thank you and best regards