Fixes to export [skip ci]

This commit is contained in:
James Cole
2016-02-07 09:19:51 +01:00
parent 9a1710eb27
commit deb140e3bc
2 changed files with 11 additions and 3 deletions

View File

@@ -83,9 +83,16 @@ class AttachmentCollector extends BasicCollector implements CollectorInterface
{ {
/** @var TransactionJournal $journal */ /** @var TransactionJournal $journal */
$journal = $attachment->attachable; $journal = $attachment->attachable;
$string = 'Attachment #' . $attachment->id . ' is part of ' . strtolower($journal->transactionType->type) . ' #' . $journal->id $args = [
. ', with description "' . $journal->description . '". This transaction was for ' . Amount::formatJournal($journal, false) . 'attachment_name' => $attachment->filename,
' and occured on ' . $journal->date->formatLocalized(config('config.month_and_day')) . "\n\n"; 'attachment_id' => $attachment->id,
'type' => strtolower($journal->transactionType->type),
'description' => $journal->description,
'journal_id' => $journal->id,
'date' => $journal->date->formatLocalized(trans('config.month_and_day')),
'amount' => Amount::formatJournal($journal, false),
];
$string = trans('firefly.attachment_explanation', $args) . "\n";
$this->explanationString .= $string; $this->explanationString .= $string;
} }

View File

@@ -74,6 +74,7 @@ return [
'export_status_created_zip_file' => 'Created a zip file!', 'export_status_created_zip_file' => 'Created a zip file!',
'export_status_finished' => 'Export has succesfully finished! Yay!', 'export_status_finished' => 'Export has succesfully finished! Yay!',
'export_data_please_wait' => 'Please wait...', 'export_data_please_wait' => 'Please wait...',
'attachment_explanation' => 'The file called \':attachment_name\' (#:attachment_id) was originally uploaded to :type \':description\' (#:journal_id) dated :date for the amount of :amount.',
// rules // rules
'rules' => 'Rules', 'rules' => 'Rules',