autoamt -> missingamt
This commit is contained in:
parent
f3ba1eda0c
commit
8e412b1be3
@ -141,6 +141,6 @@ nullamt :: MixedAmount
|
|||||||
nullamt = Mixed []
|
nullamt = Mixed []
|
||||||
|
|
||||||
-- | A temporary value for parsed transactions which had no amount specified.
|
-- | A temporary value for parsed transactions which had no amount specified.
|
||||||
autoamt :: MixedAmount
|
missingamt :: MixedAmount
|
||||||
autoamt = Mixed [Amount (Commodity {symbol="AUTO",side=L,spaced=False,comma=False,precision=0}) 0]
|
missingamt = Mixed [Amount (Commodity {symbol="AUTO",side=L,spaced=False,comma=False,precision=0}) 0]
|
||||||
|
|
||||||
|
|||||||
@ -305,9 +305,9 @@ transactionamount :: Parser MixedAmount
|
|||||||
transactionamount =
|
transactionamount =
|
||||||
try (do
|
try (do
|
||||||
many1 spacenonewline
|
many1 spacenonewline
|
||||||
a <- try leftsymbolamount <|> try rightsymbolamount <|> nosymbolamount <|> return autoamt
|
a <- try leftsymbolamount <|> try rightsymbolamount <|> nosymbolamount <|> return missingamt
|
||||||
return a
|
return a
|
||||||
) <|> return autoamt
|
) <|> return missingamt
|
||||||
|
|
||||||
leftsymbolamount :: Parser MixedAmount
|
leftsymbolamount :: Parser MixedAmount
|
||||||
leftsymbolamount = do
|
leftsymbolamount = do
|
||||||
|
|||||||
@ -30,4 +30,4 @@ isReal :: RawTransaction -> Bool
|
|||||||
isReal t = rttype t == RegularTransaction
|
isReal t = rttype t == RegularTransaction
|
||||||
|
|
||||||
hasAmount :: RawTransaction -> Bool
|
hasAmount :: RawTransaction -> Bool
|
||||||
hasAmount = (/= autoamt) . tamount
|
hasAmount = (/= missingamt) . tamount
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user