1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-19 05:09:38 +02:00
Maybe/app/models/account/reconcileable.rb
Zach Gollwitzer 52333e3fa6
Some checks are pending
Publish Docker image / ci (push) Waiting to run
Publish Docker image / Build docker image (push) Blocked by required conditions
Add reconciliation manager (#2459)
* Add reconciliation manager

* Fix notes editing
2025-07-16 11:31:47 -04:00

16 lines
591 B
Ruby

module Account::Reconcileable
extend ActiveSupport::Concern
def create_reconciliation(balance:, date:, dry_run: false)
reconciliation_manager.reconcile_balance(balance: balance, date: date, dry_run: dry_run)
end
def update_reconciliation(existing_valuation_entry, balance:, date:, dry_run: false)
reconciliation_manager.reconcile_balance(balance: balance, date: date, existing_valuation_entry: existing_valuation_entry, dry_run: dry_run)
end
private
def reconciliation_manager
@reconciliation_manager ||= Account::ReconciliationManager.new(self)
end
end