mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-09 23:45:21 +02:00
Add auto-update strategies for current balance on manual accounts (#2460)
* Add auto-update strategies for current balance on manual accounts * Remove deprecated BalanceUpdater, replace with new methods
This commit is contained in:
parent
52333e3fa6
commit
3eea5a9891
13 changed files with 311 additions and 136 deletions
|
@ -10,7 +10,9 @@ module Account::Anchorable
|
|||
end
|
||||
|
||||
def set_opening_anchor_balance(**opts)
|
||||
opening_balance_manager.set_opening_balance(**opts)
|
||||
result = opening_balance_manager.set_opening_balance(**opts)
|
||||
sync_later if result.success?
|
||||
result
|
||||
end
|
||||
|
||||
def opening_anchor_date
|
||||
|
@ -25,8 +27,10 @@ module Account::Anchorable
|
|||
opening_balance_manager.has_opening_anchor?
|
||||
end
|
||||
|
||||
def set_current_anchor_balance(balance)
|
||||
current_balance_manager.set_current_balance(balance)
|
||||
def set_current_balance(balance)
|
||||
result = current_balance_manager.set_current_balance(balance)
|
||||
sync_later if result.success?
|
||||
result
|
||||
end
|
||||
|
||||
def current_anchor_balance
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue