Creating prepayment invoices

This module creates an unposted sales invoice from an order and allocates the prepayment amount by VAT groups.

❓ Introduction

Use the module to prepare a sales prepayment invoice without manually calculating the amount for each VAT group. It helps you keep the prepayment within the remaining order value.

🔍 How prepayment creation works

On a Sales Order, select Create Prepayment Invoice. The creation page shows the order number, bill-to customer, currency, order value, and maximum available amount.

Field Description
Prepayment Amount Prepayment amount in the basis selected by Prices Including VAT.
Prepayment Amount % Percentage of the order value from 0 to 100. Changing the percentage recalculates the amount.
Prepayment Line Description Description copied to prepayment invoice lines. By default, it contains the order number or external document number, depending on the setup.
Copy Sales Order Lines as Comments Copies descriptions, quantities, and units of measure from the order lines as comments.

The amount cannot be 0 or exceed the value remaining after previous prepayments. Only one unposted prepayment invoice can exist for an order.

⚙️ Default prepayment invoice description

In Prepayment Invoice Description Source on the Sales & Receivables Setup page, select the data used for the default invoice-line description.

  • Sales Order No. - the description contains the order number.
  • External Document No. - the description contains the value in the order's External Document No. field.

When you select External Document No., complete that field before creating the prepayment invoice. The product stops document creation when the value is empty.

For a full description of this setting, see Configuration.

🚀 How to enable the module

  1. Open the Sales & Receivables Setup page.
  2. In the Prepayment Invoices section, complete Prepayment G/L Account No..
  3. Select a value for Prepayment Invoice Description Source.
  4. On the Sales Order, complete the bill-to customer, salesperson code, and, when the external number is selected, External Document No..

📊 VAT allocation

The creation page shows VAT groups calculated from the order item lines. The product allocates the prepayment proportionally to the base of each group and does not exceed the amount available for that group.

For a 25% prepayment, each VAT group receives 25% of its net and gross base. The invoice contains a separate positive general ledger account line for each group.

📦 Data copied from the order

The product transfers the header, comments, record links, External Document No., currency, payment terms and method, location, responsibility center, and dimensions to the invoice.

When lines have dimensions, the product analyses dimension sets from the line with the highest value and selects a set containing the MARKA dimension, when one exists.

🧾 Posting

After posting the invoice, the product marks it as a prepayment invoice, records the order number, creates a ledger entry for each general ledger account line, and archives the linked order. It then creates an initial detailed entry with net and gross amounts and the currency rate.

⚠️ Validations

The product stops the process when the prepayment account, bill-to customer, or salesperson is missing; the amount is invalid; or an unposted prepayment invoice already exists for the order.