mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
[Little Change Request] for downloading documents in reports #1747
This commit is contained in:
parent
1d2134e59f
commit
a16de19ee7
@ -38,7 +38,8 @@ class ExpenseReport extends AbstractReport
|
||||
$zip = Archive::instance_by_useragent(date('Y-m-d') . '_' . str_replace(' ', '_', trans('texts.expense_documents')));
|
||||
foreach ($expenses->get() as $expense) {
|
||||
foreach ($expense->documents as $document) {
|
||||
$name = sprintf('%s_%s_%s_%s', date('Y-m-d'), trans('texts.expense'), $expense->public_id, $document->name);
|
||||
$expenseId = str_pad($expense->public_id, $account->invoice_number_padding, '0', STR_PAD_LEFT);
|
||||
$name = sprintf('%s_%s_%s_%s', date('Y-m-d'), trans('texts.expense'), $expenseId, $document->name);
|
||||
$name = str_replace(' ', '_', $name);
|
||||
$zip->add_file($name, $document->getRaw());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user