From f87a68999fc879d9f8eb027303a79a241bde49da Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Fri, 24 Jan 2014 15:27:55 -0800 Subject: [PATCH] mention the often-overlooked 2-space rule in the too many missing amounts error --- hledger-lib/Hledger/Data/Transaction.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hledger-lib/Hledger/Data/Transaction.hs b/hledger-lib/Hledger/Data/Transaction.hs index d31e57897..b506a621e 100644 --- a/hledger-lib/Hledger/Data/Transaction.hs +++ b/hledger-lib/Hledger/Data/Transaction.hs @@ -270,7 +270,7 @@ isTransactionBalanced styles t = balanceTransaction :: Maybe (Map.Map Commodity AmountStyle) -> Transaction -> Either String Transaction balanceTransaction styles t@Transaction{tpostings=ps} | length rwithoutamounts > 1 || length bvwithoutamounts > 1 - = Left $ printerr "could not balance this transaction (too many missing amounts)" + = Left $ printerr "could not balance this transaction (can't have more than one missing amount; remember to put 2 or more spaces before amounts)" | not $ isTransactionBalanced styles t''' = Left $ printerr $ nonzerobalanceerror t''' | otherwise = Right t'''' where