A sales invoice line is one item, or one charge, billed on a sales invoice. It records what is billed, how much, and at what price, discount and tax. It also records how much of that quantity has been delivered, cancelled or returned. Price, discount and tax are worked out line by line, and the invoice's totals, journal and GST records are built from the lines. Most lines are created for you when an order or a delivery order is invoiced. You add lines by hand only on an invoice that has no order behind it.
Overview
A line has three parts:
- What is billed. The Item (with its SKU, Item Lot Type and Item Lot), or a Description alone for a charge that is not an item, such as freight.
- Its price. Unit Price, the price list it came from, the discounts, the scheme benefit and the taxes. These roll up into Base Amount, Amount and Gross Amount, and from there into the invoice's totals.
- Its progress. How much of the line has been delivered, how much is cancelled or returned, and how much is still pending delivery or eligible for return.
You open lines from the invoice's Lines tab. They have no list of their own in any app.
When to use it
Open a line to see how its amount, discount and tax were arrived at, or to see what has been delivered and returned against it. Add or change lines while the invoice is a Draft on an invoice you created by hand. When an invoice was released from an order, the order is the source of truth: change the order and let the invoice follow, rather than editing the invoice lines.
How xMatix handles it
How lines are created
| Invoice created by | Lines come from | What the line keeps |
|---|---|---|
| Invoice (OTC) or Selective Invoice OTC on an order | The order lines' pending invoice quantity, drawn over the counter | Item, SKU, lot type, description, unit prices, tax group, discounts, scheme discount and billing details are copied from the order line. Discount amounts are pro-rated to the invoiced share. A lot-tracked or stock-tracked item is split into one line per lot or stock record it is drawn from |
| Invoice or the selective variant on an order | The order's allocation lines | The same, plus the allocated lot, SKU, storage location and unit cost |
| Create Invoice on a delivery order | The delivered allocation lines | The same, plus the delivery order line and the delivered quantity |
| Quick Add on the invoice's Lines tab | What you enter | Priced and taxed as described below |
An order line with nothing left to invoice is skipped. When the order lines have different Invoice Group values, each group goes onto its own invoice.
What happens when you save a new line
When a new line is saved, xMatix:
- checks that the invoice's partner account and branch are valid, and that the item is active, can be sold on its own and has a valid SKU where it needs one;
- replaces the item with its successor if the item has an active Superseded alternate, and keeps the original in Original Item;
- copies the item's Billing Type, Billing Frequency, Charge Type and HSN/SAC Code to the line where the line leaves them blank;
- picks the tax group from the tax rules, prices the line from the price list in force, and applies the matching discount-group rule;
- copies the invoice's Discount percentage onto the line when the invoice has one, and works out the taxes and any TCS;
- evaluates the trade schemes that apply automatically, unless Skip Scheme is ticked;
- adds the components of a package item as lines of their own, when the line was not created from an order;
- updates the source order line's invoiced counts.
After every line save, the invoice's additional discount is spread across its lines again, and document-level tax rounding is applied.
When an existing line changes, only the affected steps run again:
| You change | xMatix |
|---|---|
| Price List, Price List Rule or Price As On Date | Re-prices the line |
| Item, SKU, Tax Group, Quantity or the amount | Works out the taxes again |
| Item, SKU, Tax Group, Unit Price, Quantity, the amount or Skip Scheme | Evaluates the schemes again |
| Quantity or a unit of measure | Works out the unit quantities again, and rescales a package's component lines |
| Quantity or Unit Price of a line already in the inventory ledger | Re-posts the line's stock movement |
| Any amount, tax, GL Account or Item on a posted invoice | Re-posts the invoice's journal and receivable |
How the amounts are worked out
- Base Amount = Quantity × the unit price. When Unit Price (Alt) is above zero, it is used instead of Unit Price. Unlike on an order line, cancelled quantity is not taken off.
- Net Discount adds up three discount pairs: the regular discount (Discount % or Discount Amount), the cash discount (Cash Discount % or Cash Discount Amount) and the contract discount from the discount group (Contract Discount % or Contract Discount Amount). In each pair, an amount above zero wins over the percentage.
- Net Scheme Discount is the scheme benefit: Scheme Discount Amount, or else Scheme Discount % of the base.
- Amount = Base Amount − Net Discount − Net Scheme Discount − Additional Discount Share (the line's share of any discount lines on the invoice).
- Gross Amount = Amount + Tax Amount.
- GL Amount = Amount. This is the value that goes to the sales account when the invoice is posted.
With Apply Post Tax Discount ticked, the discounts are worked out on the base plus tax and come off after tax: Amount is then the base less the additional discount share, and Gross Amount is that plus tax, less the discounts.
A line whose item has the item type Discounted Item is a discount line. It has no discounts of its own and is spread across the other lines as their Additional Discount Share.
The progress counters
| Counter | Filled from |
|---|---|
| Delivered Quantity, Allocated Quantity, Picked Quantity | The allocation line the invoice line was raised from: what was already delivered, allocated or picked when the line was invoiced. Zero on a line with no allocation |
| Delivery Quantity | Delivery order lines raised from this invoice line |
| Returned Quantity | Sale-return credit note lines raised against this invoice line |
| Cancelled Quantity | Cancel on the invoice, which sets it to the full quantity |
| Pending Delivery Quantity | Quantity − Cancelled Quantity − Delivered Quantity |
| Eligible Return Quantity | Quantity − Cancelled Quantity − Returned Quantity |
| Pending Shipment Quantity | Quantity − Shipment Quantity |
What reaches the ledgers
- Stock. Saving a line posts no stock. Post Inventory on the invoice posts every line that has not yet reached the inventory ledger. Which stock figures move depends on where the line came from: a line drawn over the counter adds to Sold and Pending Deliveries, a line from allocated stock also releases the allocation (or the picked quantity), and a delivered line moves stock from Outward to Sold. See The inventory ledger.
- General ledger. Post General Ledger posts the invoice's lines as sales against the receivable. The journal is grouped by account, so one journal line usually covers several invoice lines. Each line's account is the line's GL Account when set. Otherwise it is the best-matching posting definition for invoice lines, and then the chart-of-accounts default sales account. Each tax on the line goes to its own tax account.
Prerequisites
- The invoice header is saved, with a valid partner account and branch.
- Your security profile gives you access to Invoice Line — see Permissions.
- The items are active. Price-list rules exist for them, or you will type the unit prices.
Procedure
Step 1 — Read the lines on an invoice
Open the invoice from Sales → Invoices (or Finance → Invoices) and go to the Lines tab. Each row shows Item, Quantity, Unit Price, Amount, Tax Amount, Gross Amount and GL Account. The invoice's Amount Summary panel totals the lines.
Step 2 — Add a line to a hand-made invoice
On the Lines tab choose Quick Add. The shipped quick-add form asks for Item, SKU, Item Lot Type, Quantity, Unit Price, Tax Group, Description and GL Account, and shows an Item 360 panel with stock, schemes and alternates for the chosen item. A finance version of the form replaces SKU and Item Lot Type with TDS/TCS Section. SKU lists only the item's SKUs, and Item Lot Type only the item's lot types.
Enter a Quantity above zero. Leave Unit Price empty to take the price list's price, or type the agreed price. For a charge with no item, leave Item empty and write the charge in Description. Leave GL Account empty unless this line must go to a specific sales account.
After you save, the line shows its price, discounts and taxes, and the invoice's totals update.
Step 3 — Open a line and read its detail
Select a line's document number to open its record page, titled Sale Invoice Line, with Edit and Delete in the header. The Amounts panel shows Base Amount, Net Discount, Net Scheme Discount and the tax, with the total.
The rest of the page groups the line's fields into panels: Item Details, Quantity Details, UOM Details, Pricing Details, Amount Details, Tax Details, Scheme Details, Discount Details, Inventory Details, Related Documents, Journal Details and System Details. Quantity Details shows what has been delivered, returned and cancelled, and what is still pending delivery or eligible for return. Related Documents shows the order line, allocation line, delivery order line or service order line the invoice line came from.
Step 4 — Change a line
Choose Edit on the line's row in the Lines tab, or on its record page. You can also change fields in place in the record page's panels.
Keep these limits in mind:
- Item and SKU cannot be changed once the line is saved. To bill a different item, delete the line and add a new one.
- On a line created from an order, Tax Group cannot be changed either.
- Quantity must stay above zero, and cannot go below what has already been returned.
- On a package component, the quantity must stay within the package's minimum and maximum, and some components do not allow their quantity to be changed at all.
- Leave the counters in Quantity Details alone. The documents raised against the line keep them up to date.
Changing a line on a Posted invoice is not refused. xMatix re-posts the invoice's journal and receivable from the new figures, and re-posts the stock movement when quantity or price changed. The customer may already hold the printed invoice, so for a billed invoice a credit note is usually the cleaner correction.
Step 5 — Delete a line
Choose Delete on the line's row or record page and confirm. Deleting a package line also removes its component lines. Deletion is refused when:
- part of the line has been returned on a credit note;
- the line is a mandatory component of a package that stays on the invoice.
Deleting a line from a released invoice also reduces the source order line's invoiced quantity, so that quantity becomes pending invoice again.
Step 6 — Cancel or return billed quantity
There is no action that cancels a single line. Cancel on a posted invoice, within the cancellation window, sets every line's Cancelled Quantity to its full quantity and reverses the invoice — see Invoices. To take back part of a line, raise a sale-return credit note against it. The return counts in Returned Quantity, and Eligible Return Quantity shows how much can still be returned.
Fields
On the quick-add form
| Field | What it means | Notes |
|---|---|---|
| Item | What is billed | Required unless a Description is given. Must be active and sellable on its own when the line is created. Cannot be changed afterwards |
| SKU | The variant of the item | Required for items that need a SKU. Lists the item's SKUs only. Cannot be changed afterwards |
| Item Lot Type | The lot category billed | Lists the item's lot types only |
| Quantity | Quantity billed | Required and above zero. Defaults to 0, so you must type it |
| Unit Price | Price per unit | Filled from the price list when empty. Cannot be negative. Must be zero on a bundled package component |
| TDS/TCS Section | The tax-collected-at-source section for the line | Finance form only |
| Tax Group | The taxes that apply | Filled from the tax rules. Changing it re-taxes the line. Locked on lines from an order |
| Description | Free text, or the charge itself on a line with no item | |
| GL Account | The sales account for this line | Optional. When empty, posting definitions and the chart of accounts decide |
On the line's record page
| Field | What it means | Notes |
|---|---|---|
| Item Lot | The specific lot billed | Lists lots of the line's item and SKU. Required before stock posting for an asset-tracked item |
| HSN/SAC Code | The goods or services code used on GST returns and e-invoices | Copied from the item when blank, and again when the item changes. Must be 4, 6 or 8 digits |
| Allocated Quantity, Delivered Quantity | What was allocated and delivered from the allocation line before invoicing | Maintained from the allocation line |
| Returned Quantity | Quantity returned on sale-return credit notes | Maintained from credit note lines. Cannot exceed Quantity |
| Cancelled Quantity | Quantity cancelled with the invoice | Set by Cancel on the invoice |
| Pending Delivery Quantity, Eligible Return Quantity | What can still be delivered or returned | Calculated |
| Requested Quantity, Soft Committed Quantity | The quantity requested from stock, and the quantity already soft-committed by the source order or service order line | Soft Committed Quantity is calculated |
| UOM, UOM Quantity, UOM1, UOM Quantity 1, Conversion Ratio, Conversion Ratio 1 | Quantity entered in up to two of the item's units | Quantity is worked out from them |
| Price List, Price List Rule, Price As On Date | Where the price came from and the pricing date | Changing any of them re-prices the line |
| Price Bundled | The line is priced inside its package | A bundled line must have a zero unit price |
| Base Amount, Amount, Gross Amount, GL Amount | Value before discounts, after discounts, with tax, and as posted | Calculated |
| Discount Amount, Cash Discount Amount, Contract Discount Amount, Scheme Discount Amount | Discount values | An amount above zero wins over the matching percentage |
| Net Discount | The three regular discounts together | Calculated |
| Tax Amount | Total tax on the line | Calculated from the tax group |
| Scheme Slab, Scheme Benefit, Scheme Discount | The scheme applied and its percentage | Written by the scheme engine |
| Scheme Generated | The line was created by a scheme, such as a free item | |
| Skip Scheme | Leaves this line out of scheme evaluation | |
| Claimed | The line has been included in a trade claim | |
| Discount Group Rule | The discount-group rule that supplied the contract discount | Set by the platform |
| Discount | Regular discount percentage | Taken from the invoice's Discount when that is set. 0 to 100 |
| Invoice Discount | The invoice's discount percentage | Read from the invoice |
| Apply Post Tax Discount | Takes discounts off after tax | Changes the line's amounts |
| Storage Location, Inventory Ledger, IL Posting Approved | Where the stock came from and the line's stock posting | Set by inventory posting |
| Delivery Order Line, Order Line, Inventory Fulfillment Allocation Line, Service Order Line | The source line this line was created from | Set by the creating action |
| Asset, Service Contract, Field Sales | The asset, service contract or van-sales trip the line belongs to | |
| GL Posting Type, GL Posting Approved, GL Posted | The line's journal posting details | Read-only |
Every field, including the tax-slot and integration fields, is listed in the Invoice Line entity reference.
Business rules
- Item or description. A line needs an item or a description: Select an Item or enter a Description.
- Item checks on create. The item must be active (Item is Inactive.), may not be one that is sold only inside a package (Item can only be sold as part of a package.), needs a SKU when it requires one (SKU is required for this item.), and the SKU must belong to it (Invalid SKU selected for this item.).
- Locked fields. Item and SKU cannot change after the first save (Key fields are not editable once the related objects are added. Field Name : ItemId.). On a line created from an order, Item, SKU and Tax Group cannot change (Source populated field TaxGroupId is not editable once the record is created with source record.).
- Quantity. Must be above zero (Quantity should be in Positive.) and cannot go below the returned quantity (Quantity cannot be less than the already transacted quantity.).
- Returned quantity. Cannot be more than the quantity (Returned Quantity can not be greater than Quantity).
- Unit price. Cannot be negative (Unit price can not be Negative), and must be zero on a bundled component (Unit Price should be zero for bundled items.).
- Percentages. On a new line, Discount, Cash Discount, Contract Discount and Scheme Discount must be between 0 and 100.
- Invoice checks. A new line, or a line moved to another invoice, is checked against that invoice's partner account and branch.
- Numbering. Each line gets its own number from the Invoice Line Document Name Setting, with the series
SIL. - Order counts. A line created from an order counts against the order line's Invoice Quantity, split into Allocated Invoiced Quantity (from allocated stock) and OTC Invoiced Quantity (over the counter). Adding, changing or deleting the line updates the counts.
- Asset-tracked items. Stock posting is refused for an asset-tracked item with no lot (Inventory Lot is required for asset tracked items.).
- Re-posting. A financial change to a line of a posted invoice re-posts the invoice's journal. Lines of a cancelled invoice are not re-posted.
- Delete. Refused once any quantity is returned: There are downstream transactions. The record cannot be deleted.
Example
A building-supplies dealer bills a walk-in contractor without an order. The billing clerk creates the invoice, opens Lines and uses Quick Add twice: 20 bags of tile adhesive, priced at 310.00 from the price list, and a line with no item, the description "Delivery to site" and a typed unit price of 450.00.
A volume scheme gives the adhesive a 5% scheme discount. The adhesive line shows a Base Amount of 6,200.00, a Net Scheme Discount of 310.00 and an Amount of 5,890.00, plus GST from its tax group. The delivery line has an Amount of 450.00. The invoice's Amount Summary totals both.
Before posting, the contractor asks for 18 bags. The clerk edits the adhesive line, changes Quantity to 18 and saves. The line is re-taxed and its scheme is evaluated again. The clerk then posts the invoice. A week later the contractor returns two bags on a sale-return credit note. The adhesive line now shows Returned Quantity 2 and Eligible Return Quantity 16. It can no longer be deleted.
Training
Practice exercise
In a sandbox, as a user with the Sales Executive or System Admin profile:
- Create an invoice by hand for a test customer, then Quick Add a line for a stock item, quantity 4, with Unit Price empty. Expected: the price is filled from the price list and the Amount Summary updates.
- Add a line with no item and the description "Packing". Expected: it saves. Try a line with neither item nor description. Expected: Select an Item or enter a Description.
- Open the first line and try to change its Item. Expected: the save is refused with the key-fields message.
- Edit its Quantity to 0. Expected: Quantity should be in Positive.
- Read Quantity Details. Expected: Pending Delivery Quantity and Eligible Return Quantity both equal 4.
- Delete the "Packing" line. Expected: the delete is allowed and the totals drop.
Quick reference
- Most invoice lines come from orders and delivery orders; add lines by hand only on a hand-made invoice.
- Leave Unit Price empty to use the price list; a typed price is kept.
- Item and SKU are fixed once the line is saved.
- Base Amount ignores cancelled quantity; an amount discount beats the percentage in the same pair.
- GL Account on the line overrides posting definitions for that line.
- Saving a line posts no stock — use Post Inventory on the invoice.
- Editing a posted invoice's line re-posts its journal; prefer a credit note.
- A returned line cannot be deleted.
Permissions
Access is set on security profiles in Setup → Access Control → Profiles.
- Entity access. The shipped System Admin, Standard User, Sales Manager, Sales Executive, Sales and Service profiles have full access to Invoice Line. You need create access to add lines, edit access to change them and delete access to remove them. Without edit access you do not see Edit.
- Invoice actions. The actions that create, post, deliver and cancel lines — invoicing an order, Post General Ledger, Post Inventory, Delivery, Cancel — are granted on the Invoice and Order entities. See Invoices.
Configuration
- Line forms. The quick-add forms (QuickAdd and QuickAddFinance), the record page and the preview card are layouts of the Invoice Line entity in Design Studio. The shipped quick-add forms have no discount, lot or storage-location fields. Add them if your users should set them while adding a line. See Design a form layout.
- Lines tab. The Quick Add button, the row Edit and Delete, and the columns are set on the invoice's record page layout. The shipped tab has no Product Catalogue, Import or Barcode Scanner button.
- Numbering. Setup → Feature Hub → Platform → Document Settings, Invoice Line Document Name Setting: series
SIL, separator-, a date part and a six-digit counter. See Email templates and document numbering. - Validations. The shipped line validations — quantity above zero, returned quantity not above quantity, unit price not negative — are on the Invoice Line entity's validations.
- Lookup filters. The shipped filters limit SKU and Item Lot Type to the line's item, and Item Lot to that item and SKU. Item has no filter, so an inactive item can be picked but is refused on save.
- Stock posting. Five inventory-ledger rules for invoice lines decide which stock figures move, depending on whether the line came from allocated, picked or delivered stock or over the counter. None posts when a line is first saved.
- GL accounts. Posting definitions for invoice lines and the chart-of-accounts default sales account decide each line's account — see Chart of accounts.
- Item master. The item's Billing Type, Billing Frequency, Charge Type, HSN/SAC Code and item type default onto new lines. Superseded alternates and package components are set up on the item. See Items.
- Pricing, discounts and tax. Price lists, discount groups and tax rules decide each line's price, contract discount and tax group — see Pricing, discounts and taxes. Trade schemes decide scheme discounts and free-item lines — see Trade schemes.
Common problems
"Select an Item or enter a Description."
The line has neither. Pick an item, or for a charge with no item, write it in Description.
"Item is Inactive." or "Item can only be sold as part of a package."
The item was deactivated, or it is set up as a package component only. The Item picker still lists it. Choose another item, or add the package that contains it.
"SKU is required for this item." or "Invalid SKU selected for this item."
The item is sold by SKU. Pick one of that item's SKUs.
"Key fields are not editable once the related objects are added. Field Name : ItemId."
Item and SKU are fixed once the line is saved. Delete the line and add a new one with the right item.
"Source populated field … is not editable once the record is created with source record."
The line came from an order, so its item, SKU and tax group follow the order line. Correct the order instead.
"Quantity should be in Positive."
The quantity is zero or negative. Enter a quantity above zero, or delete the line.
"Quantity cannot be less than the already transacted quantity."
Part of the line has been returned on a credit note. Enter at least the returned quantity.
"Unit price can not be Negative" or "Unit Price should be zero for bundled items."
Enter a price of zero or more. On a component priced inside its package, clear the price.
"There are downstream transactions. The record cannot be deleted."
Part of the line has been returned. Leave the line in place.
"Mandatory package component cannot be removed."
The component is required by its package. Delete the package line to remove all its components.
"Inventory Lot is required for asset tracked items."
The item is tracked as an asset. Pick the Item Lot on the line, then post inventory again.
"No GL account resolved for line '…'."
Posting found no account for the line. Set the line's GL Account, or ask an administrator to add a posting definition or a chart-of-accounts default sales account, then post again.
Common questions
Why is the line's Amount lower than quantity × unit price?
Amount is the value after discounts. Base Amount is quantity × unit price (or Unit Price (Alt), when set). Amount takes off the regular, cash and contract discounts, the scheme discount and the line's share of any discount lines on the invoice. The Amounts panel on the line shows each part. If Apply Post Tax Discount is ticked, the discounts come off after tax instead, so they reduce Gross Amount rather than Amount.
Why doesn't Pending Delivery Quantity drop after I create a delivery order from the invoice?
Pending Delivery Quantity is quantity less cancelled and Delivered Quantity, and Delivered Quantity records what was delivered from allocated stock before the invoice was raised. Delivery orders created from the invoice are counted separately, in Delivery Quantity. Check that figure, or the delivery orders on the invoice's Related tab, to see what has been sent.
Can I correct a line after the invoice is posted?
The save is allowed, and xMatix re-posts the invoice's journal and receivable from the new figures, so the ledger follows the corrected line. The customer may already hold the printed invoice, and an e-invoice already registered is not changed, so a credit note is usually the cleaner correction. Item and SKU cannot be changed at all, and a cancelled invoice is not re-posted.
Why does each invoice line have its own number?
Every line is numbered from the Invoice Line Document Name Setting (series SIL), so it can be found and referenced on its own — for example by a credit note that returns it, or a delivery order line raised from it.
Does the journal have one line per invoice line?
No. Posting groups the invoice's lines by account and dimensions, so a ten-line invoice usually produces fewer journal lines. Each tax is posted to its own tax account.
