Added maxApplicableAmount to payment display info for unpaid invoices; added more checking to apply#InvoicePayment including payment unappliedTotal and payment/invoice from/to parties, plus an invoice status check