mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-09-20 08:21:34 +02:00
Fixes for bulk download entities
This commit is contained in:
parent
5d91773651
commit
a3dae762d0
@ -91,8 +91,9 @@ class ZipCredits implements ShouldQueue
|
||||
|
||||
foreach ($this->credits as $credit) {
|
||||
|
||||
$download_file = file_get_contents($credit->pdf_file_path($invitation, 'url', true));
|
||||
$zipFile->addFromString(basename($credit->pdf_file_path($invitation)), $download_file);
|
||||
$file = $credit->service()->getCreditPdf($credit->invitations()->first());
|
||||
$zip_file_name = basename($file);
|
||||
$zipFile->addFromString($zip_file_name, Storage::get($file));
|
||||
|
||||
}
|
||||
|
||||
|
@ -91,8 +91,12 @@ class ZipInvoices implements ShouldQueue
|
||||
|
||||
foreach ($this->invoices as $invoice) {
|
||||
|
||||
$download_file = file_get_contents($invoice->pdf_file_path($invitation, 'url', true));
|
||||
$zipFile->addFromString(basename($invoice->pdf_file_path($invitation)), $download_file);
|
||||
$file = $invoice->service()->getInvoicePdf();
|
||||
$zip_file_name = basename($file);
|
||||
$zipFile->addFromString($zip_file_name, Storage::get($file));
|
||||
|
||||
//$download_file = file_get_contents($invoice->pdf_file_path($invitation, 'url', true));
|
||||
//$zipFile->addFromString(basename($invoice->pdf_file_path($invitation)), $download_file);
|
||||
|
||||
}
|
||||
|
||||
|
@ -92,8 +92,12 @@ class ZipQuotes implements ShouldQueue
|
||||
|
||||
foreach ($this->quotes as $quote) {
|
||||
|
||||
$download_file = file_get_contents($quote->pdf_file_path($invitation, 'url', true));
|
||||
$zipFile->addFromString(basename($quote->pdf_file_path($invitation)), $download_file);
|
||||
$file = $quote->service()->getQuotePdf();
|
||||
$zip_file_name = basename($file);
|
||||
$zipFile->addFromString($zip_file_name, Storage::get($file));
|
||||
|
||||
// $download_file = file_get_contents($quote->pdf_file_path($invitation, 'url', true));
|
||||
// $zipFile->addFromString(basename($quote->pdf_file_path($invitation)), $download_file);
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user