;check: fixes
This commit is contained in:
parent
de56d09024
commit
b47d582583
@ -455,7 +455,7 @@ data Journal = Journal {
|
|||||||
,jparsetimeclockentries :: [TimeclockEntry] -- ^ timeclock sessions which have not been clocked out
|
,jparsetimeclockentries :: [TimeclockEntry] -- ^ timeclock sessions which have not been clocked out
|
||||||
,jincludefilestack :: [FilePath]
|
,jincludefilestack :: [FilePath]
|
||||||
-- principal data
|
-- principal data
|
||||||
,jdeclaredpayees :: [(Payee,PayeeDeclarationInfo)] -- ^ Accounts declared by account directives, in parse order (after journal finalisation)
|
,jdeclaredpayees :: [(Payee,PayeeDeclarationInfo)] -- ^ Payees declared by payee directives, in parse order (after journal finalisation)
|
||||||
,jdeclaredaccounts :: [(AccountName,AccountDeclarationInfo)] -- ^ Accounts declared by account directives, in parse order (after journal finalisation)
|
,jdeclaredaccounts :: [(AccountName,AccountDeclarationInfo)] -- ^ Accounts declared by account directives, in parse order (after journal finalisation)
|
||||||
,jdeclaredaccounttypes :: M.Map AccountType [AccountName] -- ^ Accounts whose type has been declared in account directives (usually 5 top-level accounts)
|
,jdeclaredaccounttypes :: M.Map AccountType [AccountName] -- ^ Accounts whose type has been declared in account directives (usually 5 top-level accounts)
|
||||||
,jglobalcommoditystyles :: M.Map CommoditySymbol AmountStyle -- ^ per-commodity display styles declared globally, eg by command line option or import command
|
,jglobalcommoditystyles :: M.Map CommoditySymbol AmountStyle -- ^ per-commodity display styles declared globally, eg by command line option or import command
|
||||||
|
|||||||
@ -18,7 +18,7 @@ import Data.Either (partitionEithers)
|
|||||||
import Data.Char (toUpper)
|
import Data.Char (toUpper)
|
||||||
import Safe (readMay)
|
import Safe (readMay)
|
||||||
import Control.Monad (forM_)
|
import Control.Monad (forM_)
|
||||||
import System.IO (stderr, hPutStr)
|
import System.IO (stderr, hPutStrLn)
|
||||||
import System.Exit (exitFailure)
|
import System.Exit (exitFailure)
|
||||||
|
|
||||||
checkmode :: Mode RawOpts
|
checkmode :: Mode RawOpts
|
||||||
@ -79,7 +79,7 @@ runCheck copts@CliOpts{rawopts_} j (check,args) =
|
|||||||
Payees ->
|
Payees ->
|
||||||
case journalCheckPayeesDeclared j of
|
case journalCheckPayeesDeclared j of
|
||||||
Right () -> return ()
|
Right () -> return ()
|
||||||
Left err -> hPutStr stderr err >> exitFailure
|
Left err -> hPutStrLn stderr err >> exitFailure
|
||||||
where
|
where
|
||||||
-- Hack: append the provided args to the raw opts,
|
-- Hack: append the provided args to the raw opts,
|
||||||
-- in case the check can use them (like checkdates --unique).
|
-- in case the check can use them (like checkdates --unique).
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user