Jump to content
  • 0

Download Invoices in Bulk


Question

Posted

I realise I can go into an individual sales transaction and download a pdf version invoice.

I need to provide a copy of every sales invoice for the last two years - is there any way to do this in bulk via a plugin or other method?

2 answers to this question

Recommended Posts

  • 0
Posted

The simplest way to do this is to piggy back off the print queue feature. To start, you can add existing invoices to the print queue with a query like this:

INSERT INTO invoice_delivery (invoice_id, method)
SELECT invoices.id, 'paper' FROM invoices WHERE invoices.date_billed >= '2019-07-01 00:00:00' AND invoices.date_billed <= '2019-08-31 23:59:59';

Just change the dates, keeping in mind that the times are in UTC (adjust accordingly), and go to Billing > Print Queue.

If you want to show a lot of invoices at a time, rather than the default 20, you can edit  config/blesta.php and change:

Configure::set('Blesta.results_per_page', 20);

To

Configure::set('Blesta.results_per_page', 2000);

To show 2000 instead of 20. This controls lists throughout Blesta, so you'll definitely want to change it back when you're done.

When done downloading the PDF of your invoices, click the button to "Mark as Printed" to remove them from the queue.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...