Blesta-Version:
5.11.2
Setup:
Enable Invoice Caching (pdf+json)
Enable Proforma Invoicing
Expected Behavior:
When an invoice is generated (ie: after client has made the payment) and the "Invoice" is generated, then this should be immediately written to the disk.
Actual Behavior:
Invoice Data (to be cached) is actually written either when the invoice is sent out by e-mail (cron run) or when a user (client or staff) clicks on the invoice > View option in the user-interface.
How to reproduce:
Yes, set up as outlined before. Add an Invoice or Service (leading to invoice generation) to a client. Check the uploads/companyid/invoices folder. No generated cache files.
Click on view in the web-interface or wait for cron to run and sent out the e-mail: Files present.
Additional Item related to this (Low Priority)
Proforma Invoices should also be written to disk when generated if invoice caching is enabled. This is not happening at all at the moment..
Bug Affects:
Compliance (Regulatory)
API Requests / Plugins wanting to fetch invoice data (You will receive a blank PDF, if the invoice has not been viewed by a user or mailed out yet.)