If a payment is made, the system will automatically apply the payment to the scheduled payment with a payment status of PENDING that has the earliest due date, and the system will update the payment status to PAID. If the payment amount applied it greater than the scheduled payment, the left over money is applied to the next scheduled payment. If all scheduled payments have been paid and there is money still left over, the order line will show an unapplied credit.