journal: Ignore AUTO commodity when strict checking

AUTO commodity is a placeholder for postings with missing amounts. It
should be ignored when doing a strict commodity check.

Fixes #1419
This commit is contained in:
aragaer 2020-12-31 09:54:23 -08:00 committed by Simon Michael
parent 8306420b61
commit 2084b845e0

View File

@ -425,7 +425,7 @@ journalCheckCommoditiesDeclared j =
mfirstundeclaredcomm =
headMay $ filter (not . (`elem` cs)) $ catMaybes $
(acommodity . baamount <$> pbalanceassertion) :
(map (Just . acommodity) $ amounts pamount)
(map (Just . acommodity) . filter (/= missingamt) $ amounts pamount)
cs = journalCommoditiesDeclared j