From c56241296456d006f5d3aeeadc39fc39830323dc Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Thu, 2 Jun 2011 21:23:53 +0000 Subject: [PATCH] convert: fix amount-field/in-field/out-field validation --- hledger/Hledger/Cli/Convert.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hledger/Hledger/Cli/Convert.hs b/hledger/Hledger/Cli/Convert.hs index aebae1d72..4eabc1999 100644 --- a/hledger/Hledger/Cli/Convert.hs +++ b/hledger/Hledger/Cli/Convert.hs @@ -165,10 +165,10 @@ initialRulesFileContent = validateRules :: CsvRules -> Maybe String validateRules rules = let - hasAccount = isJust $ accountField rules + hasAmount = isJust $ amountField rules hasIn = isJust $ inField rules hasOut = isJust $ outField rules - in case (hasAccount, hasIn, hasOut) of + in case (hasAmount, hasIn, hasOut) of (True, True, _) -> Just "Don't specify in-field when specifying amount-field" (True, _, True) -> Just "Don't specify out-field when specifying amount-field" (_, False, True) -> Just "Please specify in-field when specifying out-field"