Show negative values as parentheses on Accounts
This commit is contained in:
@@ -40,6 +40,15 @@ const accountsReport = {
|
||||
{ commodity: "EUR", quantity: "1000.0", display: "1000.00 EUR" },
|
||||
],
|
||||
},
|
||||
{
|
||||
account: "equity",
|
||||
label: "Equity",
|
||||
depth: 0,
|
||||
root: true,
|
||||
amounts: [
|
||||
{ commodity: "EUR", quantity: "-1000.0", display: "(1000.00 EUR)" },
|
||||
],
|
||||
},
|
||||
],
|
||||
total: [{ commodity: "EUR", quantity: "1000.0", display: "1000.00 EUR" }],
|
||||
},
|
||||
@@ -279,6 +288,9 @@ acceptance("Hledger plugin", function (needs) {
|
||||
assert.dom(".hledger-dashboard__table").includesText("Bank");
|
||||
assert.dom(".hledger-dashboard__table").includesText("Checking");
|
||||
assert.dom(".hledger-dashboard__table").includesText("1000.00 EUR");
|
||||
assert
|
||||
.dom(".hledger-dashboard__table")
|
||||
.includesText("(1000.00 EUR)", "shows credit balances in parentheses");
|
||||
assert.dom(".hledger-dashboard__account.--depth-1").hasText("Bank");
|
||||
assert.dom(".hledger-dashboard__account.--depth-2").hasText("Checking");
|
||||
assert
|
||||
|
||||
Reference in New Issue
Block a user