mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-04 03:43:07 +00:00
Clean up some code.
This commit is contained in:
@@ -99,28 +99,28 @@ class Transaction extends Model
|
||||
|
||||
protected $casts
|
||||
= [
|
||||
'created_at' => 'datetime',
|
||||
'updated_at' => 'datetime',
|
||||
'deleted_at' => 'datetime',
|
||||
'identifier' => 'int',
|
||||
'encrypted' => 'boolean', // model does not have these fields though
|
||||
'bill_name_encrypted' => 'boolean',
|
||||
'reconciled' => 'boolean',
|
||||
'date' => 'datetime',
|
||||
];
|
||||
'created_at' => 'datetime',
|
||||
'updated_at' => 'datetime',
|
||||
'deleted_at' => 'datetime',
|
||||
'identifier' => 'int',
|
||||
'encrypted' => 'boolean', // model does not have these fields though
|
||||
'bill_name_encrypted' => 'boolean',
|
||||
'reconciled' => 'boolean',
|
||||
'date' => 'datetime',
|
||||
];
|
||||
|
||||
protected $fillable
|
||||
= [
|
||||
'account_id',
|
||||
'transaction_journal_id',
|
||||
'description',
|
||||
'amount',
|
||||
'identifier',
|
||||
'transaction_currency_id',
|
||||
'foreign_currency_id',
|
||||
'foreign_amount',
|
||||
'reconciled',
|
||||
];
|
||||
'account_id',
|
||||
'transaction_journal_id',
|
||||
'description',
|
||||
'amount',
|
||||
'identifier',
|
||||
'transaction_currency_id',
|
||||
'foreign_currency_id',
|
||||
'foreign_amount',
|
||||
'reconciled',
|
||||
];
|
||||
|
||||
protected $hidden = ['encrypted'];
|
||||
|
||||
|
@@ -299,6 +299,7 @@ class SearchRuleEngine implements RuleEngineInterface
|
||||
app('log')->debug(sprintf('Now at rule trigger #%d: %s:"%s" (%s).', $ruleTrigger->id, $ruleTrigger->trigger_type, $ruleTrigger->trigger_value, var_export($ruleTrigger->stop_processing, true)));
|
||||
if (false === $ruleTrigger->active) {
|
||||
app('log')->debug('Trigger is not active, continue.');
|
||||
|
||||
continue;
|
||||
}
|
||||
if ('user_action' === $ruleTrigger->trigger_type) {
|
||||
|
@@ -342,21 +342,7 @@ class FireflyValidator extends Validator
|
||||
// these triggers need just the word "true":
|
||||
// TODO create a helper to automatically return these.
|
||||
$needTrue = [
|
||||
'reconciled',
|
||||
'has_attachments',
|
||||
'has_any_category',
|
||||
'has_any_budget',
|
||||
'has_any_bill',
|
||||
'has_any_tag',
|
||||
'any_notes',
|
||||
'any_external_url',
|
||||
'has_no_attachments',
|
||||
'has_no_category',
|
||||
'has_no_budget',
|
||||
'has_no_bill',
|
||||
'has_no_tag',
|
||||
'no_notes',
|
||||
'no_external_url',
|
||||
'reconciled', 'has_attachments', 'has_any_category', 'has_any_budget', 'has_any_bill', 'has_any_tag', 'any_notes', 'any_external_url', 'has_no_attachments', 'has_no_category', 'has_no_budget', 'has_no_bill', 'has_no_tag', 'no_notes', 'no_external_url',
|
||||
'source_is_cash',
|
||||
'destination_is_cash',
|
||||
'account_is_cash',
|
||||
|
Reference in New Issue
Block a user