mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Download as zip if less than 10 PDFs
This commit is contained in:
parent
0d53a5de2b
commit
224faf73ce
@ -46,7 +46,7 @@ class DownloadInvoices extends Job implements ShouldQueue
|
||||
public function handle(UserMailer $userMailer)
|
||||
{
|
||||
// if queues are disabled download a zip file
|
||||
if (config('queue.default') === 'sync') {
|
||||
if (config('queue.default') === 'sync' || count($this->invoices) <= 10) {
|
||||
$zip = Archive::instance_by_useragent(date('Y-m-d') . '-Invoice_PDFs');
|
||||
foreach ($this->invoices as $invoice) {
|
||||
$zip->add_file($invoice->getFileName(), $invoice->getPDFString());
|
||||
|
Loading…
x
Reference in New Issue
Block a user