egh / ledger-autosync

Synchronize your ledger-cli files with your bank.
GNU General Public License v3.0
273 stars 42 forks source link

Credit card with deferred payment are not using effective date. #69

Open chemtov opened 5 years ago

chemtov commented 5 years ago

Hi,

When using a credit card with deferred payment, the effective date mechanism is not used.

That means that a payment that I did, for instance, on the 31th of march is appears as done on the 4th of april when the bank actual withdraw the money from the account.

This is related jseutter/ofxparse#150 as ofxparse doesn't make that value available.

Example of such ofx transaction:

<STMTTRN>
<TRNTYPE>DEBIT
<DTPOSTED>20190304
<DTUSER>20190131
<TRNAMT>-109.17
<FITID>4fthuee
<NAME>FOO
</STMTTRN>

this is rendered as

2019/02/04 FOO
    actif:account                       $-86.76
    ; ofxid: **************
    expanse:Unknown        $86.76

while it should be

2019/01/24=2019/02/04 FOO
...