Unknown Posted March 21 Report Posted March 21 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.) Quote
Paul Posted Tuesday at 03:50 PM Report Posted Tuesday at 03:50 PM The invoice (pdf+json) cache can only be generated when the invoice is actually generated for view, which occurs if the invoice is being sent to the client or the client or staff view the invoice. Are you suggesting that the invoice PDF+json should be generated as soon as it is created? There are a few concerns with this. 1. Staff may create an invoice, and want to edit it. If it hasn't been sent to the client or viewed yet, then it could be edited prior to being sent. 2. Generating the PDF takes a significant amount of memory and CPU time. If PDFs are always generated when invoices are created, it will require significantly more resources and time during the "Create Invoice" automation task, at least for cases when not using proforma. Keeping invoice creation light increases reliability. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.