mirror of
https://github.com/simonmichael/hledger.git
synced 2024-09-19 10:17:35 +03:00
imp: lib: Hledger.Data.Amount: showMixedAmountOneLine now shows costs
This commit is contained in:
parent
de5a97600c
commit
3a4f23df95
@ -781,11 +781,11 @@ mixedAmountUnstyled = mapMixedAmountUnsafe amountUnstyled
|
||||
showMixedAmount :: MixedAmount -> String
|
||||
showMixedAmount = wbUnpack . showMixedAmountB noColour
|
||||
|
||||
-- | Get the one-line string representation of a mixed amount.
|
||||
-- | Get the one-line string representation of a mixed amount (also showing any costs).
|
||||
--
|
||||
-- > showMixedAmountOneLine = wbUnpack . showMixedAmountB oneLine
|
||||
showMixedAmountOneLine :: MixedAmount -> String
|
||||
showMixedAmountOneLine = wbUnpack . showMixedAmountB oneLine
|
||||
showMixedAmountOneLine = wbUnpack . showMixedAmountB oneLine{displayPrice=True}
|
||||
|
||||
-- | Like showMixedAmount, but zero amounts are shown with their
|
||||
-- commodity if they have one.
|
||||
|
@ -118,11 +118,11 @@ transactionCheckBalanced BalancingOpts{commodity_styles_} t = errs
|
||||
rmsg
|
||||
| rsumok = ""
|
||||
| not rsignsok = "The real postings all have the same sign. Consider negating some of them."
|
||||
| otherwise = "The real postings' sum should be 0 but is: " ++ showMixedAmountOneLine rsumcost
|
||||
| otherwise = "The real postings' sum should be 0 but is: " ++ showMixedAmountOneLineWithoutPrice False rsumcost
|
||||
bvmsg
|
||||
| bvsumok = ""
|
||||
| not bvsignsok = "The balanced virtual postings all have the same sign. Consider negating some of them."
|
||||
| otherwise = "The balanced virtual postings' sum should be 0 but is: " ++ showMixedAmountOneLine bvsumcost
|
||||
| otherwise = "The balanced virtual postings' sum should be 0 but is: " ++ showMixedAmountOneLineWithoutPrice False bvsumcost
|
||||
|
||||
-- | Legacy form of transactionCheckBalanced.
|
||||
isTransactionBalanced :: BalancingOpts -> Transaction -> Bool
|
||||
|
Loading…
Reference in New Issue
Block a user