A payment can be created from an existing invoice or credit notes, in which case the payment will have default information based on the invoice content. The created payment becomes a payment draft and is placed at the top of the payment list. Currently, only one invoice (or credit note) can be used to create a payment at once. This functionality can be found in the Accounts receivables - Invoices/Open invoices view and is activated by selecting the invoice from the invoice list that you want to pay and then selecting the Create Payment button from the action menu.
The following logic is used to prefill the fields of the payment draft when it is created from an invoice:
- The payment created from the invoice is placed as the first entry in the payment list (the user stays in the invoice list).
- The customer for the payment is set to the same as the invoice.
- The payment date is set to the current date.
- The payer field is left empty.
- The payment type is set to manual payment.
- The payment bank account is selected as the bank account defined on the invoice, if the invoice had only one bank account.
- If the invoice had multiple bank accounts, the first bank account from the list is selected.
- The debit account is retrieved from behind the selected bank account, and if it does not exist, the manual payment account is selected from the general settings.
- When creating a payment from a credit note, the debit account will be the same as the credit side account (=accounts receivable).
- The credit account is determined by the sales receivables account value coming from the customer register, and if it is not defined, this account is picked from the general settings.
- The open amount of the invoice is set as the payment amount.
- The invoice reference number is filled in as the payment reference number, if available, and if not, the field is left empty.
- The explanation buttons of the payment are activated, and the corresponding values (Customer name and invoice number) are filled in.
- The invoice from which the payment is created is selected from the Customer Invoices list.
- The Matched to Invoice section receives the selected invoice/credit note information.
- The Matched to Invoice section's Open amount field shows 0.00 (payment amount = invoice open amount).
If it is a foreign currency invoice, please note that the payment and invoice amounts are displayed on the payment form only in the default currency.