jamsix / ib-edavki

Skripta, ki prevede XML poročilo trgovalnih poslov v platformi InteractiveBrokers v XML format primeren za uvoz v obrazce Doh-KDVP, D-IFI, Doh-Div in Doh-Obr v eDavkih Finančne uprave.
MIT License
173 stars 57 forks source link

Cannot find a matching dividend #100

Closed mcsugaman closed 11 months ago

mcsugaman commented 1 year ago

Hey guys, I installed ib-edavki from master and also from dividend-tax-conid branch, but I still get errors like: Cannot find a matching dividend for WELL(US95040Q1040) CASH DIVIDEND USD 0.61 PER SHARE - US TAX (20210819;202000) of -0.09. Traceback (most recent call last): File "/home/jure/.local/bin/ib_edavki", line 8, in sys.exit(main()) File "/home/jure/.local/lib/python3.10/site-packages/ib_edavki.py", line 1198, in main closestDividend["taxEUR"] += closestDividendTax / getCurrencyRate( UnboundLocalError: local variable 'closestDividend' referenced before assignment

I run the script with ib_edavki -y 2021 IZPIS_DAVKOMAT_si_ali_PYTHON_skripto.xml What am I doing wrong? I also tried to delete problematic rows from IBKR file, but errors go on and on to other rows. Thanks!

ZigaSajovic commented 11 months ago

Should be fixed by https://github.com/jamsix/ib-edavki/pull/101

jamsix commented 11 months ago

@mcsugaman try again with the latest version, @ZigaSajovic should have fixed this! Let us know.