Brett Smith
39fa977f71
reports: Balance.le/ge_zero returns False when exactly at tolerance.
2020-06-04 10:49:55 -04:00
Brett Smith
4cba2b2681
reports: Balance has built-in tolerance for zero comparisons.
2020-06-03 22:20:37 -04:00
Brett Smith
3d704e2865
reports: Balance is initialized with just amounts.
...
This works fine with how we're currently using it, makes transformation
methods easier to implement, and avoids potential bugs where a balance is
initialized with a bad mapping.
2020-06-03 18:54:12 -04:00
Brett Smith
069939b2d3
reports: Balance classes support addition.
2020-06-03 18:53:17 -04:00
Brett Smith
cc0656dde9
reports: Add Balance.__abs__() method.
2020-06-03 18:52:44 -04:00
Brett Smith
d8df34ebaf
reports: Balance.format() accepts None as a format.
2020-05-28 09:03:23 -04:00
Brett Smith
2c44cc8f50
reports: Add Balance.format() method.
2020-05-28 09:03:19 -04:00
Brett Smith
3780c31c59
reports: Add Balance.__eq__() method.
...
It turns out the provided implementation gets us most of the way there,
we just needed to add handling for the special case of zero balances.
Now it's confirmed with tests.
2020-05-28 09:01:00 -04:00
Brett Smith
396173b55d
reports.Balance: Add eq_zero, ge_zero, and le_zero methods.
...
Support for RT#11294.
2020-05-21 23:10:03 -04:00
Brett Smith
1b81375294
reports: Add Balance.__neg__() method.
2020-04-29 14:35:20 -04:00
Brett Smith
68acb86e7e
reports: Add Balance.__str__() method.
2020-04-29 11:37:38 -04:00
Brett Smith
5aa30e5456
reports.core: Start Balance class.
2020-04-12 14:56:00 -04:00