mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[balsheet-pnl] fix: hide Equity sections when not needed
* If currencies are not converted, Unrealized Gains are meaningless. Hide them. * If there are no income/expense accounts, retained earnings will be nil. Remove row.
This commit is contained in:
@@ -1125,11 +1125,14 @@ also show overall period profit & loss."))
|
|||||||
(add-to-table
|
(add-to-table
|
||||||
multicol-table-right (_ "Equity")
|
multicol-table-right (_ "Equity")
|
||||||
(append equity-accounts
|
(append equity-accounts
|
||||||
(list
|
(if common-currency
|
||||||
(vector (_ "Unrealized Gains")
|
(list (vector (_ "Unrealized Gains")
|
||||||
unrealized-gain-fn)
|
unrealized-gain-fn))
|
||||||
(vector (_ "Retained Earnings")
|
'())
|
||||||
retained-earnings-fn)))
|
(if (null? income-expense)
|
||||||
|
'()
|
||||||
|
(list (vector (_ "Retained Earnings")
|
||||||
|
retained-earnings-fn))))
|
||||||
#:negate-amounts? #t)
|
#:negate-amounts? #t)
|
||||||
|
|
||||||
(if (and common-currency show-rates?)
|
(if (and common-currency show-rates?)
|
||||||
|
|||||||
@@ -497,7 +497,7 @@
|
|||||||
"Root.Asset.House" "Total For Asset" "Liability" "Root.Liability"
|
"Root.Asset.House" "Total For Asset" "Liability" "Root.Liability"
|
||||||
"Root.Liability.Bank2" "Root.Liability.Bank2.CreditCard"
|
"Root.Liability.Bank2" "Root.Liability.Bank2.CreditCard"
|
||||||
"Root.Liability.Bank2.Loan" "Total For Liability" "Equity" "Root.Equity"
|
"Root.Liability.Bank2.Loan" "Total For Liability" "Equity" "Root.Equity"
|
||||||
"Unrealized Gains" "Retained Earnings" "Total For Equity")
|
"Retained Earnings" "Total For Equity")
|
||||||
(sxml->table-row-col sxml 1 #f 1))
|
(sxml->table-row-col sxml 1 #f 1))
|
||||||
(test-equal "default balances"
|
(test-equal "default balances"
|
||||||
'("#200.00" "$106,709.00" "30 FUNDS" "#200.00" "$106,709.00" "30 FUNDS"
|
'("#200.00" "$106,709.00" "30 FUNDS" "#200.00" "$106,709.00" "30 FUNDS"
|
||||||
|
|||||||
Reference in New Issue
Block a user