Requests | Blesta

Requests

Invoice PDF Generation

Barry Flanagan shared this idea 6 years ago
Completed

Blesta creates the PDF invoice from scratch every time it is viewed or downloaded. This is not the correct thing to do with an invoice - it should really not change once it is generated. For example, if a logo is changed or the address, then the invoice shows these new details whereas it should not.

Comments (7)

photo
1

We have an option to cache/save the invoice to disk when it is generated, then it would first be downloaded from there if it exists. See https://dev.blesta.com/browse/CORE-923 Any comments on this task?

photo
1

Yes , sometimes error correction have to be made , but them must be allowed only to administrators not clients, so no misuse can be done. If no change is allowed by an admin anymore, that's will be translated in a credit note generation of the incorrect invoice and generation of a new invoice. I think that's not the right way of doing it.

photo
1

So you want admins to be able to edit the invoice, and just re-cache an updated version of the invoice? Caching of invoice PDFs to disk will eventually use a fair amount of disk.

photo
1

Invoices display a list of goods and services purchased alongside the total amount that a customer must pay. Important information such as the balance, due date, and payment status are in the invoice record itself. proofreading and editing services

photo
1

Hi!

By default the invoice should be cached to disk (on initial generation).

If you want to implement editing the invoice, then i would suggest adding a "re-generate" button for the invoice. (So ppl that know what they are doing, can do it)

Generally:

A lot of Countries/Juristications have regulations against editing invoices that are sent out to a customer.

Local businesses here (for example) will generally leave the original invoice and then add a correction invoice/note. without editing the original one. (So: Wrong invoice amount (83 EUR) => Cancellation Invoice (-83 EUR) => New and Correct Invoice (45))

As tempering with invoices that are already sent out to a customer (via mail for example (default)) ends with the customer having two invoices for for 2 different amounts.

See https://smallbusiness.chron.com/fix-invoice-mistakes-80684.html for inspiration.

photo
1

I would also like to add "fair amount of disk use".

The default invoice is around 80KB. Lets assume we add a logo and make it 200kb in total.

Lets assume 250 clients w. 2 invoices per month each. (500 invoices/month total)

2 invoices/client* 250 clients * 200kb => 100 megabytes /month in data gain.

12 months in a year: 1.2 gigabytes total per year

10 years: 12 gigabytes

shouldn't be an issue with most hosting services/plans.

photo
1

Maybe set an invoice retention time ? Most countries regulations nequire to keep invoices for a certain amount of years. (usually between 7 and 10).

So you could add a limiter. And then remove historic invoices (older than the limit) from the system.

(remove from display in clientarea/adminarea, remove cached files)

photo