dickwolff / Export-To-Ghostfolio

Convert transaction history export from your favorite broker to a format that can be imported in Ghostfolio.
https://hub.docker.com/r/dickwolff/export-to-ghostfolio
Apache License 2.0
45 stars 8 forks source link

[Degiro exporter v2] Taxes on dividend are added as dividends instead of substracting it from the dividend #46

Closed Sonlis closed 4 months ago

Sonlis commented 5 months ago

Taxes on dividends are counted as dividends instead of being substracted from said dividend.

Bug

Given this CSV, and Impots sur dividende meaning tax on dividend:

18-03-2024,08:38,15-03-2024,REALTY INCOME CORP,US7561091049,Dividende,,USD,0.51,USD,0.36,
18-03-2024,08:38,15-03-2024,REALTY INCOME CORP,US7561091049,Impôts sur dividende,,USD,-0.15,USD,-0.15,

Outputs the following:

    {
      "accountId": "ed7a85f8-1c5f-4d84-b700-c0081c6c6ff2",
      "comment": "",
      "fee": 0,
      "quantity": 1,
      "type": "DIVIDEND",
      "unitPrice": 0.51,
      "currency": "USD",
      "dataSource": "YAHOO",
      "date": "2024-03-18T08:38:00+02:00",
      "symbol": "RY6.F"
    },
    {
      "accountId": "ed7a85f8-1c5f-4d84-b700-c0081c6c6ff2",
      "comment": "",
      "fee": 0,
      "quantity": 1,
      "type": "DIVIDEND",
      "unitPrice": 0.15,
      "currency": "USD",
      "dataSource": "YAHOO",
      "date": "2024-03-18T08:38:00+02:00",
      "symbol": "RY6.F"
    },

There should be only one dividend of 0.36.

dickwolff commented 5 months ago

Thanks for reporting this! I'm sending this message to acknowledge the bug, but as I'm currently occupied with work I'm not able to work on the tool. I expect to have more time in about 2 weeks time and will look into it then!

dickwolff commented 5 months ago

I believe this issue is now resolved after merging #50. Can you confirm @Sonlis ?

Sonlis commented 4 months ago

Yes, it is working as expected now, thanks!