Payment Reference in payment entry not working right,

the payment reference childtable have payment term field should be filtered by name of invoice
but it’s not filtered
the invoice contain 2 payment term
but it’s working fine if i create payment entry from sales invoice if did manual that problem happened

that’s what happen if i created payment entry from sales invoice