imp: journal: remove the "adjacent conversion postings" check again
I find that single conversion postings are sometimes needed, eg with paypal.
This commit is contained in:
parent
c7eb9aa944
commit
c51ebe7b8c
@ -337,7 +337,8 @@ journalFinalise iopts@InputOpts{..} f txt pj = do
|
||||
when strict_ $ do
|
||||
journalCheckAccounts j -- If in strict mode, check all postings are to declared accounts
|
||||
journalCheckCommodities j -- and using declared commodities
|
||||
journalCheckPairedConversionPostings j -- check conversion postings are in adjacent pairs
|
||||
-- journalCheckPairedConversionPostings j -- check conversion postings are in adjacent pairs
|
||||
-- disabled for now, single conversion postings are sometimes needed eg with paypal
|
||||
|
||||
return j
|
||||
|
||||
|
||||
@ -422,7 +422,6 @@ With the `-s`/`--strict` flag, additional checks are performed:
|
||||
- Are all commodities declared with a `commodity` directive ?
|
||||
([Commodity error checking](#commodity-error-checking))
|
||||
- Are all commodity conversions declared explicitly ?
|
||||
- Are all commodity conversion equity postings occurring in adjacent pairs ?
|
||||
|
||||
You can use the [check](#check) command to run individual checks -- the
|
||||
ones listed above and some more.
|
||||
|
||||
@ -506,24 +506,7 @@ $ hledger -f- print --infer-costs
|
||||
|
||||
>=0
|
||||
|
||||
# 39. In strict mode, conversion postings must be in adjacent pairs.
|
||||
<
|
||||
account assets
|
||||
account equity:conversion
|
||||
account expenses:foreign currency
|
||||
commodity €0.
|
||||
commodity $0.
|
||||
2011/01/01
|
||||
expenses:foreign currency €100
|
||||
equity:conversion €-100
|
||||
assets $-135
|
||||
equity:conversion $135
|
||||
|
||||
$ hledger -f- print -s
|
||||
>2 /Conversion postings must occur in adjacent pairs/
|
||||
>=1
|
||||
|
||||
# 40. If a conversion pair matches several postings it should throw an error
|
||||
# 39. If a conversion pair matches several postings it should throw an error
|
||||
<
|
||||
2011/01/01
|
||||
expenses:foreign currency €100 @@ $135
|
||||
@ -537,7 +520,7 @@ $ hledger -f- print --infer-costs
|
||||
>2 /There is not a unique posting which matches the conversion posting pair/
|
||||
>=1
|
||||
|
||||
# 41. If a conversion pair does not match it should throw an error
|
||||
# 42. If a conversion pair does not match it should throw an error
|
||||
<
|
||||
2011/01/01
|
||||
expenses:foreign currency €120
|
||||
@ -551,7 +534,7 @@ $ hledger -f- print --infer-costs
|
||||
>2 /There is not a unique posting which matches the conversion posting pair/
|
||||
>=1
|
||||
|
||||
# 42. Multiple conversion pairs which match a single posting should cause an
|
||||
# 43. Multiple conversion pairs which match a single posting should cause an
|
||||
# error, and should not match both ‘sides’ of the conversion
|
||||
<
|
||||
2011/01/01
|
||||
@ -567,7 +550,7 @@ $ hledger -f- print --infer-costs
|
||||
>2 /There is not a unique posting which matches the conversion posting pair/
|
||||
>=1
|
||||
|
||||
# 43. We can combine ‘other’ amounts into one posting, if they still match up.
|
||||
# 44. We can combine ‘other’ amounts into one posting, if they still match up.
|
||||
<
|
||||
2011-01-01
|
||||
expenses:foreign currency €100 @ $1.35
|
||||
|
||||
Loading…
Reference in New Issue
Block a user