Discount accounting

Hi

I am struggling with discount accounting. I did play around with it begining of last year and it did make
entries into the correct accounts in GL. Now I cannot get the system to make the correct entries.
And this is happening on V13 and V14.

On V13 there is a global setting under accounts settings which I have enabled.
But the “margin discount” section is not vissible in each item row. And when I make it visible in the actual table, then it does not make the correct entries into the GL accounts.

On V14 it seems there is now a setting under “Selling settings” which I enabled. I cannot find
a setting under buying settings. When doing discount on a sales invoice the same thing happens. The
margin discount section is not visible fro each item row and when I change the display settings to
make it visible, the GL entries are not correct.

Is anyone using discount accounting ? Perhaps soem advise please ?