mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-16 17:33:45 +00:00
Move fields to configuration.
This commit is contained in:
@@ -75,26 +75,7 @@ class TransactionJournalFactory
|
|||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->errorOnHash = false;
|
$this->errorOnHash = false;
|
||||||
// TODO move valid meta fields to config.
|
$this->fields = config('firefly.journal_meta_fields');
|
||||||
$this->fields = [
|
|
||||||
// sepa
|
|
||||||
'sepa_cc', 'sepa_ct_op', 'sepa_ct_id',
|
|
||||||
'sepa_db', 'sepa_country', 'sepa_ep',
|
|
||||||
'sepa_ci', 'sepa_batch_id', 'external_uri',
|
|
||||||
|
|
||||||
// dates
|
|
||||||
'interest_date', 'book_date', 'process_date',
|
|
||||||
'due_date', 'payment_date', 'invoice_date',
|
|
||||||
|
|
||||||
// others
|
|
||||||
'recurrence_id', 'internal_reference', 'bunq_payment_id',
|
|
||||||
'import_hash', 'import_hash_v2', 'external_id', 'original_source',
|
|
||||||
|
|
||||||
// recurring transactions
|
|
||||||
'recurrence_total', 'recurrence_count',
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
$this->currencyRepository = app(CurrencyRepositoryInterface::class);
|
$this->currencyRepository = app(CurrencyRepositoryInterface::class);
|
||||||
$this->typeRepository = app(TransactionTypeRepositoryInterface::class);
|
$this->typeRepository = app(TransactionTypeRepositoryInterface::class);
|
||||||
$this->billRepository = app(BillRepositoryInterface::class);
|
$this->billRepository = app(BillRepositoryInterface::class);
|
||||||
@@ -263,7 +244,8 @@ class TransactionJournalFactory
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO typeOverrule: the account validator may have another opinion on the transaction type.
|
// typeOverrule: the account validator may have another opinion on the transaction type.
|
||||||
|
// not sure what to do with this.
|
||||||
|
|
||||||
/** create or get source and destination accounts */
|
/** create or get source and destination accounts */
|
||||||
$sourceInfo = [
|
$sourceInfo = [
|
||||||
@@ -352,7 +334,6 @@ class TransactionJournalFactory
|
|||||||
|
|
||||||
|
|
||||||
// verify that journal has two transactions. Otherwise, delete and cancel.
|
// verify that journal has two transactions. Otherwise, delete and cancel.
|
||||||
// TODO this can't be faked so it can't be tested.
|
|
||||||
$journal->completed = true;
|
$journal->completed = true;
|
||||||
$journal->save();
|
$journal->save();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user