-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
I have a transaction that is fine in ledger:
2019/07/12 * box
55:assets:box -55 HUMMER @ 5372 EUR
55:expenses:delivery -1,700 EUR
55:expenses:delivery -13,818.44 EUR
55:assets:box 55 HUMMER @ 5,654.15345 EUR
but it fails with nledger
The root cause is that the balance of this transaction is visible as -0, and the IsZero property returns false.
[TestMethod]
public void Test()
{
var amount1 = new Amount(10.16);
var amount2 = new Amount(-10.15345);
Value balance = null;
balance = Value.AddOrSetValue(balance, Value.Get(amount1));
balance = Value.AddOrSetValue(balance, Value.Get(amount2));
Assert.IsTrue(balance.IsZero);
}I would be happy to assist to sort it out.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels