Singal Payment Entry with multipal invoices having different payment terms(Discount)

Hello everyone,

How Discount is calculated in singal Payment Entry with multipal invoices having different payment terms(Discount)?