mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Document date on export #1784
This commit is contained in:
parent
60935cb85d
commit
8ea29ea0ad
@ -50,7 +50,7 @@ class DocumentReport extends AbstractReport
|
||||
$zip = Archive::instance_by_useragent(date('Y-m-d') . '_' . str_replace(' ', '_', trans('texts.documents')));
|
||||
foreach ($records as $record) {
|
||||
foreach ($record->documents as $document) {
|
||||
$name = sprintf('%s_%s_%s', date('Y-m-d'), $record->present()->titledName, $document->name);
|
||||
$name = sprintf('%s_%s_%s', $document->created_at->format('Y-m-d'), $record->present()->titledName, $document->name);
|
||||
$name = str_replace(' ', '_', $name);
|
||||
$name = str_replace('#', '', $name);
|
||||
$zip->add_file($name, $document->getRaw());
|
||||
|
@ -39,7 +39,7 @@ class ExpenseReport extends AbstractReport
|
||||
foreach ($expenses->get() as $expense) {
|
||||
foreach ($expense->documents as $document) {
|
||||
$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 = sprintf('%s_%s_%s_%s', $expense->expense_date ?: date('Y-m-d'), trans('texts.expense'), $expenseId, $document->name);
|
||||
$name = str_replace(' ', '_', $name);
|
||||
$zip->add_file($name, $document->getRaw());
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ class InvoiceReport extends AbstractReport
|
||||
foreach ($clients->get() as $client) {
|
||||
foreach ($client->invoices as $invoice) {
|
||||
foreach ($invoice->documents as $document) {
|
||||
$name = sprintf('%s_%s_%s', date('Y-m-d'), $invoice->present()->titledName, $document->name);
|
||||
$name = sprintf('%s_%s_%s', $invoice->invoice_date ?: date('Y-m-d'), $invoice->present()->titledName, $document->name);
|
||||
$zip->add_file($name, $document->getRaw());
|
||||
}
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ class QuoteReport extends AbstractReport
|
||||
foreach ($clients->get() as $client) {
|
||||
foreach ($client->invoices as $invoice) {
|
||||
foreach ($invoice->documents as $document) {
|
||||
$name = sprintf('%s_%s_%s', date('Y-m-d'), $invoice->present()->titledName, $document->name);
|
||||
$name = sprintf('%s_%s_%s', $invoice->invoice_date ?: date('Y-m-d'), $invoice->present()->titledName, $document->name);
|
||||
$name = str_replace(' ', '_', $name);
|
||||
$zip->add_file($name, $document->getRaw());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user