print: always show zero amounts as 0, hiding any commodity/decimal places/price, like ledger
This commit is contained in:
		
							parent
							
								
									57c537de41
								
							
						
					
					
						commit
						e4cd127fc4
					
				| @ -82,7 +82,7 @@ showTransaction' elide effective t = | ||||
|             showpostingnoamt p = rstrip $ showacct p ++ "              " ++ showcomment (pcomment p) | ||||
|             showacct p = "    " ++ showstatus p ++ printf (printf "%%-%ds" w) (showAccountName Nothing (ptype p) (paccount p)) | ||||
|             w = maximum $ map (length . paccount) ps | ||||
|             showamount = printf "%12s" . showMixedAmount | ||||
|             showamount = printf "%12s" . showMixedAmountOrZero | ||||
|             showcomment s = if null s then "" else "  ; "++s | ||||
|             showstatus p = if pstatus p then "* " else "" | ||||
| 
 | ||||
|  | ||||
							
								
								
									
										12
									
								
								tests/zero-handling.test
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								tests/zero-handling.test
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,12 @@ | ||||
| # a zero amount is always displayed as just "0", regardless of any commodity/decimal places/price (like ledger) | ||||
| # | ||||
| -f- print --empty | ||||
| <<< | ||||
| 2010/3/1 x | ||||
|   a  $0.00 @ 3EUR | ||||
|   b | ||||
| >>> | ||||
| 2010/03/01 x | ||||
|     a             0 | ||||
|     b             0 | ||||
| 
 | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user