mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 23:45:10 +00:00
Add running balance
This commit is contained in:
@@ -108,6 +108,7 @@ class Transaction extends Model
|
||||
'encrypted' => 'boolean', // model does not have these fields though
|
||||
'bill_name_encrypted' => 'boolean',
|
||||
'reconciled' => 'boolean',
|
||||
'balance_dirty' => 'boolean',
|
||||
'date' => 'datetime',
|
||||
];
|
||||
|
||||
@@ -233,6 +234,13 @@ class Transaction extends Model
|
||||
);
|
||||
}
|
||||
|
||||
protected function balanceDirty(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
get: static fn ($value) => (int)$value === 1,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the amount
|
||||
*/
|
||||
|
Reference in New Issue
Block a user