Hi Ludwig,
This is the account structure setup and Cash Discount form
AP Invoice Journal posted
payment posting.:
payment journal --> Functions --> Settlements and selected the invoice and did the posting
After posting when you go to Inquiries --> Voucher --> Related Vouchers (button) --> Voucher (button)
Since cash discount account is set, dept is provided and vendor exist, the cash discount must be posted to 520200-10-0000003 but not 520200--.
if the DAX code is assigning leger account with a value 520200 --, then the system should throw an error. Instead it posting everything.
Do I need to check or set any other parameters ?
Let me know if you need any more info.
Thanks,
Lakshmi