mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-06 22:21:42 +00:00
Added invoice date
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
This commit is contained in:
@@ -175,6 +175,7 @@ class PreferencesController extends Controller
|
||||
'process_date' => isset($setOptions['process_date']),
|
||||
'due_date' => isset($setOptions['due_date']),
|
||||
'payment_date' => isset($setOptions['payment_date']),
|
||||
'invoice_date' => isset($setOptions['invoice_date']),
|
||||
'internal_reference' => isset($setOptions['internal_reference']),
|
||||
'notes' => isset($setOptions['notes']),
|
||||
'attachments' => isset($setOptions['attachments']),
|
||||
|
||||
@@ -177,6 +177,7 @@ class TransactionController extends Controller
|
||||
// new custom fields:
|
||||
'due_date' => TransactionJournal::dateAsString($journal, 'due_date'),
|
||||
'payment_date' => TransactionJournal::dateAsString($journal, 'payment_date'),
|
||||
'invoice_date' => TransactionJournal::dateAsString($journal, 'invoice_date'),
|
||||
'interal_reference' => $journal->getMeta('internal_reference'),
|
||||
'notes' => $journal->getMeta('notes'),
|
||||
];
|
||||
|
||||
@@ -64,6 +64,7 @@ class JournalFormRequest extends Request
|
||||
// new custom fields here:
|
||||
'due_date' => $this->get('due_date') ? new Carbon($this->get('due_date')) : null,
|
||||
'payment_date' => $this->get('payment_date') ? new Carbon($this->get('payment_date')) : null,
|
||||
'invoice_date' => $this->get('invoice_date') ? new Carbon($this->get('invoice_date')) : null,
|
||||
'internal_reference' => $this->get('internal_reference'),
|
||||
'notes' => $this->get('notes'),
|
||||
|
||||
|
||||
@@ -237,6 +237,16 @@ class TransactionJournal extends TransactionJournalSupport
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasMeta(string $name): bool
|
||||
{
|
||||
return !is_null($this->getMeta($name));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
|
||||
@@ -42,7 +42,7 @@ class JournalRepository implements JournalRepositoryInterface
|
||||
private $user;
|
||||
|
||||
/** @var array */
|
||||
private $validMetaFields = ['interest_date', 'book_date', 'process_date', 'due_date', 'payment_date', 'internal_reference', 'notes'];
|
||||
private $validMetaFields = ['interest_date', 'book_date', 'process_date', 'due_date', 'payment_date', 'invoice_date', 'internal_reference', 'notes'];
|
||||
|
||||
/**
|
||||
* JournalRepository constructor.
|
||||
|
||||
Reference in New Issue
Block a user