Payment due date not updating

Dear All,

Please note that payment due date is not getting updated when creating the Invoice.
Workaround is remove payment terms and set it again. However, most the terms have been fetching from customer/supplier information, hence, this is a big issue now.

Correct scenario is Invoice Date + Credit Days = Due Date

Kindly check and advise.
Thank you,