Apply customer payments to invoices automatically or manually