InvoicePlane icon indicating copy to clipboard operation
InvoicePlane copied to clipboard

[Feature Request] Add option to add PDF417 barcode to invoice

Open bgradis opened this issue 2 years ago • 38 comments

Expected Behavior

I would like to have an option to add a PDF417 barcode to the invoice which is used in Croatian invoices.

PDF417 spec can be found here (in Croatian language): https://www.hub.hr/sites/default/files/inline-files/2DBK_EUR_Uputa_1.pdf

Current Behavior

Screenshots

Example of an invoice with PDF417 barcode: image

Possible Solution

Steps to Reproduce

Context (Environment)

Detailed Description

Possible Implementation

Failure Logs

bgradis avatar Jan 18 '24 11:01 bgradis

Refering: PDF417

helpful resource: https://github.com/leongrdic/php-pdf417

marneu avatar Jan 18 '24 12:01 marneu

@bgradis thank you for your issue and @marneu thank you for the suggestion. On the forums we're talking about all those QR possibilities, because, well, everyone invented their own standards https://community.invoiceplane.com/t/topic/10627

nielsdrost7 avatar Jan 18 '24 14:01 nielsdrost7

@bgradis, In the screenshot of your invoice, I also see a QR code. Is this the the equivalent of this pdf417 barcode? If so can you take me a screenshot (without resizing) so I can decode the (text?) data. (Just to see what the content looks like.) A QR code is actually easier to create and put on your invoice.

Verony-makesIT avatar Jan 19 '24 14:01 Verony-makesIT

Hmm, I should explain in detail.

QR codes on Croatian invoices are usually used for checking invoice validity on the tax administration server. QR code contains URL to https://porezna.gov.hr and sends ZKI or JIR code and invoice date. ZKI code is issuer_id and is always created based on the certificate provided by the tax administration. JIR code is received from the tax administration server as a response to sending ZKI to the tax server and is also required but in case of network issues, you have 48 hours to send all remaining ZKI codes.

All invoices/receipts that have cash or card transactions must have that code as fiscalisation law states. Transactional invoices don't need that.

Specifications for fiscalisation and QR codes can be found here: https://www.porezna-uprava.hr/HR_Fiskalizacija/Documents/Fiskalizacija-Tehnicka%20specifikacija%20za%20korisnike_v2.0.pdf (page 48)

Example of QR code used for fiscalisation: image

PDF417 or maybe it would be better to say HUB-3 PDF417. HUB-3 means Croatian Banking Association (Hrvatska Udruga Banaka) and they define payment slip (not sure if correct translation) type which is called HUB-3 and it looks like this: image You usually receive that from the utility company for paying the bill. You can see that the PDF417 code is on the screenshot of the HUB3 payment slip. This is handy for scanning with mobile banking apps and accountants which have handheld scanners. I think almost all Croatian banks provide some sort of mobile app with some sort of mPayment variant. Ad of one of the banks: image

PDF417 barcode on the HUB3 payment slip contains all data from it in the structure defined in the following document: https://www.hub.hr/sites/default/files/inline-files/2DBK_EUR_Uputa_1.pdf

So basically instead of typing all invoice data, you can scan the code with your mPayment app and the payment order in the app will be prepared with all fields waiting for you to confirm so the transaction can be made. So for example, HUB3 payment slip with following data structure and arrangement: image

will have the corresponding PDF417 code: image

bgradis avatar Jan 19 '24 15:01 bgradis

@bgradis, Thank you for this detailed explanation. I had hoped for a moment that the QR code could also be useful for your purpose. Not so. Maybe these links can help you a bit further on your way?

  1. https://github.com/mpdf/mpdf/issues/475
  2. https://github.com/ihabunek/pdf417-php

Verony-makesIT avatar Jan 29 '24 15:01 Verony-makesIT