This document describes all price-related fields and formulas on the Invoice Line Item object and how they are related.
For an overview of all Invoice Line Item fields, see the Invoice Line Item object reference.
Terms
Term
Description
Unit Price
The base price of one unit of the invoice line item. Can be a net or a gross value.
Pos Price
The total price of the invoice line item after applying all quantity-related and pos price-related values.
Base Fields
There are four groups of base fields:
Base values
Unit Price, Quantity
Quantity-related values
Factor, Billing Factor
Unit Price-related values
Commission
Pos Price-related values
Discount, Discount Amount, Order Discount Amount, Decimal Places
API Name
Data Type
Is Rounded
Affects
Description
Quantity__c
Number (13,5)
no
The quantity of the item. The default value is 1.0.
UnitPrice__c
Currency (13,5)
no
The net or gross price of one unit.
GrossInvoice__c
Checkbox
Determines how to interpret the unit price. false = net true = gross The default value is false.
Factor__c
Number (13,5)
no
Quantity
The factor is provided by the quantity unit (custom setting). The actual quantity is divided by the factor.
BillingFactor__c
Number (13,5)
no
Quantity
Factor resulting from the billing period and the billing unit, used to adapt the quantity to the service period. For example, the billing unit Month combined with the billing period 3 results in a billing factor of 3, that is, the item is invoiced every three months with the price multiplied by three.
Commission__c
Percent (3,2)
no
Unit Price
A percentage rate for calculating the line item total based on the unit price and the defined percentage
Discount__c
Percent (3,2)
no
Pos Price
A percentage rate used to reduce the pos price by the specified percentage.
DiscountAmount__c
Currency (16,2)
yes
Pos Price
A fixed amount, reduces the pos price by the specified amount. The discount amount is applied if the discount field is empty.
AEDiscountAmount__c
Currency (16,2)
yes
Pos Price
A fixed amount, reduces the pos price by the specified amount.
DecimalPlaces__c
Number (2,0)
no
Pos Price
The currency-specific number of decimal places used for the invoice line item calculation, as taken from the multi-currency configuration. The value is set automatically, not to be modified manually.
PrecalculatedTax__c
Currency (16,2)
yes
The absolute tax amount calculated internally or by a third party system.
Base Formulas
Base formulas normalize values and support unit formulas and pos formulas.
CalculatedFactor
API Name
Data Type
Blank as
Description
CalculatedFactor__c
Number (13,5)
blank
Corrects the quantity unit factor to 1.0 to avoid division by zero.
BLANKVALUE(
Factor__c,
1.0
)
CalculatedQuantity
API Name
Data Type
Blank as
Description
CalculatedQuantity__c
Number (13,5)
zero
Corrects the quantity by the factor of the quantity unit.
Quantity__c / CalculatedFactor__c
CalculatedTotalQuantity
API Name
Data Type
Blank as
Is Rounded
Description
CalculatedTotalQuantity__c
Number (18,5)
zero
no
The calculated quantity multiplied with the calculated billing factor.
Corrects the commission to 1.0 to avoid multiplication with zero.
BLANKVALUE(
Commission__c,
1.0
)
CalculatedBillingFactor
API Name
Data Type
Blank as
Description
CalculatedBillingFactor__c
Number (13,5)
blank
Corrects the billing factor to 1.0 to avoid multiplication with zero.
BLANKVALUE(
BillingFactor__c,
1.0
)
IsDiscountEmpty
API Name
Data Type
Blank as
Description
IsDiscountEmpty__c
Checkbox
blank
Determines whether the discount percentage field is filled.
ISBLANK(Discount__c)
HasPrecalculatedTax
API Name
Data Type
Blank as
Description
HasPrecalculatedTax__c
Checkbox
blank
Determines whether the pre-calculated tax field is filled.
NOT(ISBLANK(PrecalculatedTax__c))
IsTaxDelta
API Name
Data Type
Blank as
Description
IsTaxDelta__c
Checkbox
blank
Determines whether this line item is a tax delta item used to clear tax rounding differences when calculating invoice line item totals.
ISPICKVAL(
Type__c,
'Tax Delta'
)
Unit Formulas
UnitPriceCalc
API Name
Data Type
Blank as
Is Rounded
Description
UnitPriceCalc__c
Currency (13,5)
zero
no
The net or gross unit price multiplied with the commission.
UnitPrice__c * CalculatedCommission__c
Pos Formulas
DecimalPlacesFallback
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 invoice line item field Decimal Places (see Base Fields). This value is then used to round amounts in formulas for calculating the invoice line item price, taxes, etc.
If Decimal Places is not set, JustOn uses two decimal places – as defined in DecimalPlacesFallback:
API Name
Data Type
Blank as
Is Rounded
Description
DecimalPlacesFallback__c
Number (0 decimal places)
blank
no
Sets the number of decimal places used for the invoice line item calculation to 2 if DecimalPlaces is empty.
BLANKVALUE(ONB2__DecimalPlaces__c,2)
PosPriceCalc
API Name
Data Type
Blank as
Is Rounded
Description
PosPriceCalc__c
Currency (13,5)
zero
no
The net or gross invoice line item price multiplied with the calculated total quantity.
As of JustOn Billing & Invoice Management v2.88, the Invoice Line Item field Invoicing Engine controls the rounding approach. 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.
The invoicing engine v1 does not round the invoice line item price before the tax calculation and order discount application. It calculates the discounted position price using all passed decimal places.
PosPriceDiscountedNoAE1
API Name
Data Type
Blank as
Is Rounded
Description
PosPriceDiscountedNoAE1__c
Currency (13,5)
zero
no
The net or gross invoice line item price corrected by all discount values, except for the order discount (not rounded, invoicing engine v1).