autoamt -> missingamt

This commit is contained in:
Simon Michael 2008-10-18 20:29:42 +00:00
parent f3ba1eda0c
commit 8e412b1be3
3 changed files with 5 additions and 5 deletions

View File

@ -141,6 +141,6 @@ nullamt :: MixedAmount
nullamt = Mixed []
-- | A temporary value for parsed transactions which had no amount specified.
autoamt :: MixedAmount
autoamt = Mixed [Amount (Commodity {symbol="AUTO",side=L,spaced=False,comma=False,precision=0}) 0]
missingamt :: MixedAmount
missingamt = Mixed [Amount (Commodity {symbol="AUTO",side=L,spaced=False,comma=False,precision=0}) 0]

View File

@ -305,9 +305,9 @@ transactionamount :: Parser MixedAmount
transactionamount =
try (do
many1 spacenonewline
a <- try leftsymbolamount <|> try rightsymbolamount <|> nosymbolamount <|> return autoamt
a <- try leftsymbolamount <|> try rightsymbolamount <|> nosymbolamount <|> return missingamt
return a
) <|> return autoamt
) <|> return missingamt
leftsymbolamount :: Parser MixedAmount
leftsymbolamount = do

View File

@ -30,4 +30,4 @@ isReal :: RawTransaction -> Bool
isReal t = rttype t == RegularTransaction
hasAmount :: RawTransaction -> Bool
hasAmount = (/= autoamt) . tamount
hasAmount = (/= missingamt) . tamount