Invoice Line Items

← Invoice Management

Invoice line items represent the individual billable positions of an invoice. Usually, they originate from items when billing subscriptions, or, with the generic invoice run, from arbitrary source records. In addition, users can create them manually.

Info

You can customize the invoice line item display on the invoice PDF using custom CSS rules.

Invoice Line Item Types

Invoice line items can be of different types.

Type Description
Product Default type, subject to the subtotal calculation. Is displayed in the invoice line item table, with the price broken down to net price, discounts, taxes.
Shipping Fees Specific type for applicable shipping fees. Is included after the subtotal calculation and, by default, displayed as a net value below the invoice line item table.
Handling Fees Specific type for applicable handling fees. Is included after the subtotal calculation and, by default, displayed as a net value below the invoice line item table.
Information Specific type for items that are put on the invoice for informational purposes only, exempt from the total calculation. Is displayed in the invoice line item table, including any defined price, but is ignored on calculation.
Deposit Specific type for deposit invoices, is produced when a deposit rate or a deposit value is defined. Is usually displayed in the invoice line item table, with the price broken down to net price and taxes.
Tax Delta Specific type, used to offset tax rounding differences. Is not displayed on the invoice PDF but included in the calculation.
None
or any other custom type
Specific type for "hidden" items. Is not displayed but included in the calculation.

Invoice Line Item Calculation

Except for net or gross, there are numerous other parameters that control an invoice line item's price. The calculation is fairly complex – so which data comes into play at what stage?

Think of a three-tier calculation process.

Unit price and quantity information

ILI_calc_1_qty

First, JustOn multiplies the unit price with the provided quantity information and, in case of recurring items, with the billing factor. This makes up the position price.

  • The unit price can be a fixed amount, an aggregated value, or an individual price determined by some custom condition – that depends on your invoice line item source data. For commission pricing, however, the given unit price is multiplied with the commission rate before proceeding.
  • The quantity is taken from the invoice line item source data as well. You either propagate a given value from the order, quote, subscription, etc., or have aggregated some usage data count. If your business usually handles very large quantities, you can use a custom factor to produce "manageable" quantity values.
  • The billing factor is a multiplier that is relevant with recurring items, where JustOn must consider the billing period (the time interval after which the item is subject to the invoice run), given in a billing unit. For example, the billing unit Month combined with the billing period 3 results in a billing factor of 3, that is, the recurring item is invoiced every three months with the price multiplied by three.

    The recurring item's billing period determines the resulting invoice line item's service period.

Discount information

ILI_calc_2_dct

Once the position price is determined, JustOn deducts the applicable discounts:

  • The item-based discount is individually applied to an invoice line item, based on a given percentage or fixed amount.
  • The order discount amount is the invoice line item's "share" of the order discount, which originally reduces the (net) subtotal of the complete invoice.

Deducting the discounts results in the position price discounted.

Tax information

ILI_calc_3_tax

Unless you use gross invoicing, JustOn finally adds the applicable taxes. You can either:

  • Feed a precalculated tax from an external system, or
  • Have JustOn internally determine the calculated tax based on the discounted position price and one or more tax rates – most probably determined by tax rules.

This calculation produces the position total gross price, which, in turn, becomes part of the invoice's grand total.

Invoice Line Item Rounding

Depending on the JustOn Billing & Invoice Management version, the invoice line item price calculation applies different rounding approaches:

  • With the invoicing engine v1, the rounding of invoice line item amounts has been done as late as possible: CalculatedTax, PosTotalNet, PosTotalTax, PosTotalGross.
  • With the invoicing engine v2 (as of JustOn 2.88), PosPriceDiscountedNoAE and hence, PosPriceDiscounted are rounded already, so that CalculatedTax, PosTotalNet, PosTotalTax and PosTotalGross are calculated from rounded values.

    This approach is in line with common third-party applications like XRechnung e-invoices, Basware or accounting systems, preventing possible integration or synchronization issues.

As of JustOn Billing & Invoice Management v2.88, the Invoice Line Item field Invoicing Engine controls the rounding approach.

Value Description
1 (or empty) Indicates that the old rounding mode is applied. The discounted position price is calculated using all passed decimal places, and the rounding is done only on CalculatedTax, PosTotalNet, PosTotalTax, PosTotalGross.
2 Indicates that the new rounding mode is applied. The discounted position price is rounded already, passing the rounded value to the tax calculation and order discount application.

For new invoices, Invoicing Engine is set to 2, indicating that PosPriceDiscountedNoAE and PosPriceDiscounted are rounded for all newly created invoices. For existing invoices after upgrading from a previous JustOn version, Invoicing Engine is empty, indicating that the previous rounding mode is applied.

Info

For details on the invoice line item calculation, see Invoice Line Item Fields and Formulas.

Rounding on Invoice Cancelation

When canceling an invoice, the cancellation invoice uses the same invoicing engine as the canceled (original) invoice. This ensures that there will be no amount differences between the canceled (original) invoice and the cancelation invoices.

If you create a new invoice from the same source data, however, you may get a different amount. Assume the following scenario:

(1) You have created an invoice with a JustOn version <2.88, that is, using the invoicing engine v1.

(2) You upgrade JustOn Billing & Invoice Management to v2.88 or newer.

(3) You notice that the previously produced invoice is not correct – you cancel it. The cancellation invoice uses the same invoicing engine v1.

(4) You create a new, correct invoice from the same source data. Now the new invoice uses the invoicing engine v2, applying the new rounding mechanism – which may produce slightly different amount values.

Rounding on Invoice Cloning

When cloning an invoice, the new invoice always uses the invoicing engine v2, regardless of the invoicing engine used for the original invoice. Since the invoicing engine may be different between the original and the new invoice, there may be some rounding-related differences in the invoice line item amounts.

Decimal Places

With multiple currencies enabled, you can specify the number of decimal places (number of digits to the right of decimal point) for each currency. Consequently, JustOn takes the number of decimal places used for a specific currency from the relevant currency configuration, copying it to the field Decimal Places of the invoice line item. This value is then used to round amounts in certain formulas when calculating the invoice line item price, taxes, etc.

JustOn falls back to two decimal places if multiple currencies are not enabled, no currency set up for an invoice, or if the field Decimal Places is not (yet) set for an invoice line item.

Note

To avoid inconsistencies, make sure to not change the value of the invoice line item field Decimal Places manually, because other parts of the business logic (not immediately related to the invoice line item price calculation) also use the decimal places configuration.

Be aware of the following limitations:

  • Currently, JustOn supports only 0, 1 or 2 decimal places.

    If you specify more than 2 decimal places, JustOn automatically limits their number to 2 to prevent errors.

  • The following features currently ignore the decimal places configuration:

    • Installments
    • Booking data creation and recognition rules
    • Discount calculation