Dunning not populating in sales invoice

Created Dunning for a sales invoice.
On create payment entry the dunning is not populating in the payment reference table


Payment is always adjusted against the invoice.
Interest / Dunning Fee is adjusted in the Deduction table.