egh / ledger-autosync

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

Format non-reinvested dividends correctly #9

Closed jblachly closed 8 years ago

jblachly commented 8 years ago

This should fix issue https://github.com/egh/ledger-autosync/issues/7

example with fix:

2016/10/07 DIVIDEND RECEIVED
    ; dividend_from: 1234567
    ; ofxid: 1234.5678901234567890
    assets:fido                               $37.15
    Income:Dividends                         -$37.15

NB: My OFX provider is giving the CUSIP (in this example: 1234567) rather than the ticker symbol. I will see if I can work on this next, but it may require a patch to OFXparse.

egh commented 8 years ago

Looks great! Thank you. I've added a test based on your previous example.