mirror of
https://github.com/simonmichael/hledger.git
synced 2025-01-08 11:49:44 +03:00
;journal: hints for possible future work related to #1461
This commit is contained in:
parent
ce6939b304
commit
e1e97f977e
@ -782,6 +782,7 @@ amountwithoutpricep = do
|
||||
c <- lift commoditysymbolp
|
||||
mdecmarkStyle <- getDecimalMarkStyle
|
||||
mcommodityStyle <- getAmountStyle c
|
||||
-- XXX amounts of this commodity in periodic transaction rules and auto posting rules ? #1461
|
||||
let suggestedStyle = mdecmarkStyle <|> mcommodityStyle
|
||||
commodityspaced <- lift skipNonNewlineSpaces'
|
||||
sign2 <- lift $ signp
|
||||
@ -807,6 +808,7 @@ amountwithoutpricep = do
|
||||
Just (commodityspaced, c) -> do
|
||||
mdecmarkStyle <- getDecimalMarkStyle
|
||||
mcommodityStyle <- getAmountStyle c
|
||||
-- XXX amounts of this commodity in periodic transaction rules and auto posting rules ? #1461
|
||||
let msuggestedStyle = mdecmarkStyle <|> mcommodityStyle
|
||||
(q,prec,mdec,mgrps) <- lift $ interpretNumber numRegion msuggestedStyle ambiguousRawNum mExponent
|
||||
let s = amountstyle{ascommodityside=R, ascommodityspaced=commodityspaced, asprecision=prec, asdecimalpoint=mdec, asdigitgroups=mgrps}
|
||||
@ -818,6 +820,7 @@ amountwithoutpricep = do
|
||||
mdecmarkStyle <- getDecimalMarkStyle -- a decimal-mark CSV rule
|
||||
mcommodityStyle <- getAmountStyle "" -- a commodity directive for the no-symbol commodity
|
||||
mdefaultStyle <- getDefaultAmountStyle -- a D default commodity directive
|
||||
-- XXX no-symbol amounts in periodic transaction rules and auto posting rules ? #1461
|
||||
let msuggestedStyle = mdecmarkStyle <|> mcommodityStyle <|> mdefaultStyle
|
||||
(q,prec,mdec,mgrps) <- lift $ interpretNumber numRegion msuggestedStyle ambiguousRawNum mExponent
|
||||
-- if a default commodity has been set, apply it and its style to this amount
|
||||
|
Loading…
Reference in New Issue
Block a user