This commit is contained in:
Bel LaPointe
2023-10-23 10:38:28 -06:00
parent 078c425d9e
commit e5bc3b3840
3 changed files with 22 additions and 9 deletions

View File

@@ -36,3 +36,12 @@ func newDelta(d time.Time, a ledger.Account) Delta {
Currency: USD, // TODO
}
}
func (delta Delta) Plus(other Delta) Delta {
return Delta{
Date: other.Date,
Account: delta.Account,
Value: delta.Value + other.Value,
Currency: other.Currency,
}
}