From 2084b845e09d2249a5d0e120805798730eeb4b6d Mon Sep 17 00:00:00 2001 From: aragaer Date: Thu, 31 Dec 2020 09:54:23 -0800 Subject: [PATCH] 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 --- hledger-lib/Hledger/Read/Common.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hledger-lib/Hledger/Read/Common.hs b/hledger-lib/Hledger/Read/Common.hs index 4bd138267..d938e8c73 100644 --- a/hledger-lib/Hledger/Read/Common.hs +++ b/hledger-lib/Hledger/Read/Common.hs @@ -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