Alya Books

    Help centre

    Guides for Alya Books and UAE e-invoicing

    Landed costs

    Add freight, customs duty, insurance and handling to the cost of the goods they brought in: flag the charge on its bill, allocate it over the goods received by value, quantity, weight or shares, read how much goes to stock and how much to cost of sales, and reverse an allocation.

    A landed cost is what it takes to bring goods to your warehouse on top of their purchase price: freight, customs duty, insurance, port handling. Booked as an expense, these charges make stock look cheaper than it was and the margin on each sale look better than it is. Alya Books lets you record the charge on its own bill and spread it over the goods it belongs to, so each item on hand, and each item already sold, carries its share.

    It works in two steps:

    1. A bill line switched to Landed cost does not go to an expense account. It waits in a clearing account, an account that holds an amount until it is moved to where it belongs (1550 Landed costs awaiting allocation in the standard chart).
    2. An allocation moves the charge out of the clearing account onto the bill lines that received the goods. The part that belongs to stock still on hand raises the cost of that stock; the part that belongs to stock already sold goes to cost of sales.

    Before you start

    • Landed costs are part of the Professional and Enterprise plans. On another plan the Landed cost switch is not offered on a bill, and the Landed costs page says the feature is not part of your plan, which it names, beside the badge of the plan that carries it, for example In Professional. An owner changes the plan under Settings → Subscription.
    • Settings → Accounting → Modules: Inventory must be Enabled, so that stock posts to the ledger. See Stock valuation and purchase returns.
    • The chart needs the clearing account, 1550 Landed costs awaiting allocation. An organisation set up before this account arrived applies the chart update under Settings → Accounting first (see Country packs). Until then the switch is not offered.
    • The goods are tracked items (Items → Add Item → Track inventory) received on an accepted bill. A landed cost lands only on a bill line that received stock.
    • Every member reads the allocations. Allocating and reversing need a role that prepares documents (owner, admin or accountant); a viewer only reads.

    A worked example: a shipment of valves and elbows

    Golden Trading buys 100 gate valves at AED 30.00 and 50 elbow fittings at AED 20.00. A week later the freight forwarder sends its own bill: AED 600.00 of sea freight and AED 200.00 of customs duty. By then 30 valves are already sold.

    The goods bill

    1. Bills → New bill: the supplier, Bill number GS-2001, Issue date 1 March 2026.
    2. Add two lines and pick the item on each with the item button beside the description: Gate valve, Qty 100, Price 30; Elbow fitting, Qty 50, Price 20.
    3. Save and accept. The bill receives both items into stock: AED 4,000.00 on the inventory account, the valves at AED 30.00 each and the elbows at AED 20.00 each.

    On 5 March an invoice sells 30 valves. They leave stock at AED 30.00 each, so AED 900.00 goes to cost of sales and 70 valves stay on hand.

    The forwarder's bill

    1. Bills → New bill: the forwarder as supplier, Bill number FW-881, Issue date 8 March 2026.
    2. Add two lines with no item: Sea freight, Price 600, VAT at 5 per cent; Customs duty, Price 200, Out of scope.
    3. Switch Landed cost on under each of the two lines. The Account of such a line is not used: the line books to the clearing account.
    4. Save and accept.

    The bill posts the two charges to the clearing account, not to an expense:

    AccountDebitCredit
    1550 Landed costs awaiting allocationAED 600.00
    1550 Landed costs awaiting allocationAED 200.00
    1400 VAT input tax (recoverable)AED 30.00
    2000 Trade payablesAED 830.00

    The bill's page now has a Landed costs card. Under Charges on this bill both lines read Not allocated, and the card says "Waiting to be allocated: AED 800.00".

    The switch sits under the line's description. It is offered on a line with no stock item: a line that buys a tracked item is goods, not a charge. On a bill that arrived as a file or an e-invoice, the same switch sits under each line while the bill is a draft or in review.

    Allocate by value

    1. On the forwarder's bill, choose Allocate… on the Landed costs card.

    2. Under Charges both lines are already ticked: "Ticked: AED 800.00". Untick a charge to keep it for another shipment.

    3. Under Goods received, tick the box beside GS-2001. It ticks both of the bill's lines; you can also tick single lines.

    4. Leave Spread on By value and set Allocation date to 8 March 2026. The date cannot come before the bills the allocation reads.

    5. Read the Preview:

      Received lineShareAmountOn handAlready soldTo inventoryTo cost of salesUnit cost
      Gate valve75%AED 600.007030AED 420.00AED 180.00AED 30.00 → AED 36.00
      Elbow fitting25%AED 200.00500AED 200.00AED 0.00AED 20.00 → AED 24.00
      TotalAED 800.00AED 620.00AED 180.00
    6. Preview and confirm shows the entry before anything is written, and Confirm posts it. The allocation gets a number (LC-0001) and reads Posted.

    By value, the valves cost AED 3,000.00 of the AED 4,000.00 on the goods bill, so they take 75 per cent of the charge. The allocation posts one entry:

    AccountDebitCredit
    1500 Inventories: goods for resale (gate valves)AED 420.00
    5000 Cost of goods sold (gate valves)AED 180.00
    1500 Inventories: goods for resale (elbow fittings)AED 200.00
    1550 Landed costs awaiting allocationAED 800.00

    The dialog proposes the goods a charge may belong to in this order: the goods on the same bill, bills of the same purchase order, bills with the same customs declaration number, the same supplier's recent bills, then other recent receipts (recent means the 120 days before the date of the charge's bill). Each bill carries a label that says why it is offered, for example Same purchase order or Recent receipt. Search receipts finds any other accepted bill by its number, supplier, order, customs reference or item.

    Read the new cost

    • Stock: the gate valve reads 70 on hand, Unit cost AED 36.00 and Value AED 2,520.00; the elbow fitting 50 on hand, AED 24.00 and AED 1,200.00.
    • Stock → Movements on the valve: a row of the kind Cost adjustment, with no quantity, a total of AED 420.00 and the source Landed cost, which opens the allocation.
    • The goods bill GS-2001: its Landed costs card lists, under Landed on this bill's goods, each line with its Bill cost, what Landed on it and the Landed unit cost: AED 36.00 for the valves and AED 24.00 for the elbows. Below, "Landed on this bill: AED 800.00".
    • The forwarder's bill FW-881: each charge shows LC-0001, Posted, and where the allocation went.
    • Purchases → Landed Costs lists every allocation with its number, date, basis, charge bills, status and charge. An allocation's page has the cards Allocation, Charges, Targets, Entry and History.

    The clearing account now holds nothing for this shipment.

    Reverse an allocation

    An allocation is never edited. If it went to the wrong shipment, or a bill under it has to change, reverse it and allocate again.

    1. Purchases → Landed Costs → open LC-0001 → Reverse.
    2. Set the Reversal date (not before the allocation's date) and type a Reason, for example "Allocated to the wrong shipment". Choose Reverse, then confirm.
    3. A reversing entry takes the cost back out of stock and cost of sales. The allocation reads Reversed and stays in the list; its charges read Free to be allocated again.

    In the example, reversing LC-0001 on 12 March puts the valves back at AED 30.00 and the elbows at AED 20.00, and AED 800.00 waits in the clearing account again. To spread the charge again, choose Allocate… on the forwarder's bill: the new allocation gets a new number.

    By quantity or weight

    Spread offers four ways to share a charge between the ticked lines:

    SpreadEach line takes the charge in proportion to
    By valueits cost on the bill
    By quantitythe quantity received
    By weightits weight
    By sharesthe share you type for it. Shares are compared with each other, so 3 and 1 give 75% and 25%

    By quantity, the 100 valves and the 50 elbows of the example would share the AED 800.00 two to one.

    To spread by weight, the lines need a weight:

    • On the item: Items → the item → Weight per unit, with its Weight unit: kg, g or lb. The two fields show once Track inventory is on.
    • On the bill line: Weight, under the line of the goods bill, is the weight of the whole line as the packing list states it, in the item's unit (kg when the item has none). It replaces the quantity times the item's weight. Leave it empty to use the item's weight.
    • Items weighed in different units share one charge: every line is converted to kilograms first.
    • A ticked line with no weight at all is refused, and the message names the item. Give the item a weight, or the bill line its own, and the preview appears.

    For example, suppose LC-0001 was not reversed and a port handling bill of AED 300.00 arrives on 10 March. A valve weighs 2 kg and an elbow 1000 g, so the dialog shows 200 kg and 50,000 g in its Weight column. By weight the valves take 80% and the elbows 20%:

    Received lineShareAmountTo inventoryTo cost of salesUnit cost
    Gate valve80%AED 240.00AED 168.00AED 72.00AED 36.00 → AED 38.40
    Elbow fitting20%AED 60.00AED 60.00AED 0.00AED 24.00 → AED 25.20

    What about stock already sold

    A charge often arrives after some of the goods have left. The allocation reads each received line and splits its amount:

    • The share of the quantity still on hand goes to the inventory account and raises the cost of that stock.
    • The share of the quantity already sold goes to cost of sales, where the cost of those goods already is.

    In the example 30 of the 100 valves were sold before the forwarder's bill came. So 30 per cent of the valves' AED 600.00, AED 180.00, goes to cost of sales, and AED 420.00 raises the 70 valves on hand by AED 6.00 each.

    Both valuation methods work, and the split is the same. What moves is where each method keeps cost:

    • Weighted average (one running cost per item): the item's average cost rises by the amount to inventory divided by the quantity on hand. Goods are taken to leave oldest first, so what is on hand belongs to the latest receipts.
    • FIFO (first in, first out: each receipt is a cost layer, used oldest first): the cost of what is left of that receipt's own layer rises, and what was already used from it goes to cost of sales.

    If more of the goods are sold after the allocation, they leave stock at the raised cost and take part of the landed cost with them into cost of sales. A reversal then takes back from stock only what the stock on hand still carries, and takes the rest back from cost of sales in a second entry, shown on the allocation's page as the True-up entry. Say 35 more valves are sold at AED 36.00 before LC-0001 is reversed: the reversal takes AED 210.00 out of the 35 valves left (AED 6.00 each) and AED 390.00 out of cost of sales (the AED 180.00 of the allocation and the AED 210.00 those 35 valves carried). The valves on hand are back at AED 30.00, never below it.

    Import VAT is not a landed cost

    A landed cost is the charge without the tax you get back.

    • Recoverable VAT is never part of it. The freight line of the example is AED 600.00 plus AED 30.00 of VAT: AED 600.00 goes to the clearing account and is allocated, and AED 30.00 is input tax as on any bill.
    • Import VAT paid at customs is input tax, not cost. Record it under Imported goods and customs on the bill, where it reaches box 6 of the VAT return. Do not add it as a landed cost line. See Import VAT and customs references.
    • Customs duty and freight are landed costs. Duty is not recovered, so it belongs in the cost of the goods.
    • Tax that cannot be recovered is part of the cost. On a bill with Input VAT is recoverable switched off, the VAT is folded into the line. A freight line of AED 100.00 with AED 5.00 of VAT then books AED 105.00 to the clearing account, and AED 105.00 is what the allocation spreads.

    Where the charge sits until it is allocated

    • The clearing account. 1550 Landed costs awaiting allocation is a current asset in the inventory group. A charge that waits is on the balance sheet beside stock, not in the profit and loss.
    • The bill. The Landed costs card of the charge's bill says "Waiting to be allocated" with the amount.
    • The report. Reports → Library → Landed costs not yet allocated lists, as of a date, every charge line no allocation holds, oldest first: the bill date, the bill, the supplier, the charge, its age in days, its age band (0-30, 31-60, 61-90, 90+) and the amount. The totals show the amount, the clearing account's balance in the ledger and the difference between the two.

    Look at the report before you close a month: a charge that waits there is in neither stock nor cost of sales yet.

    A charge you never mean to allocate does not need the switch. Leave Landed cost off and book the line to an expense account such as 5030 Freight, customs and clearance.

    What is refused, and why

    What you triedWhat happens
    Voiding, rejecting, archiving, deleting, re-dating or returning to draft a bill under a posted allocation, or changing or removing its allocated linesRefused (landed_cost_allocated), for the charge's bill and for the goods' bill alike. The message names the allocation: "bill GS-2001 carries the landed cost allocation LC-0001; reverse it first, then change the bill". Reverse the allocation, change the bill, allocate again
    Landed cost on a line that buys a tracked item, or on a vendor creditNot offered. A line that buys a stock item is goods, not a charge
    Allocating a charge line that an allocation already holdsRefused (landed_cost_already_allocated). One charge line is allocated whole, by one allocation at a time
    By weight with a weight missingRefused (landed_cost_weight_missing). The message names the items; the dialog stays open
    By shares with a share missingThe preview waits: "Type a share for every ticked line."
    An allocation dated before the bills it reads, or a reversal dated before its allocationRefused: move the date
    A date in a locked periodNothing posts. The dialog offers to send the change to an approver as a proposal (see Period locks and partial unlock). Under Approvals it reads Allocate landed costs, and a proposed reversal Reverse a landed cost allocation
    Reversing an allocation that is already reversedRefused (landed_cost_not_posted). Its charges are free already

    Good to know

    • Returning goods that carry a landed cost to the supplier works as any purchase return: the goods leave at their current cost and the allocation is not reopened.
    • A vendor credit for a freight charge that was already allocated is an ordinary credit to the account on its line. It does not change the allocation. If the charge itself was wrong, reverse the allocation first.
    • A charge and the goods can be on the same bill: flag the supplier's own freight line, and the dialog offers that bill's goods first, labelled This bill.
    • Comments and files can be attached to an allocation on its page.

    Through the API and an AI assistant

    • REST: GET /landed-costs, GET /landed-costs/{id}, GET /bills/{id}/landed-cost-candidates, GET /bills/{id}/landed-costs, POST /landed-costs/preview, POST /landed-costs (send X-Preview: true to see the entry first) and POST /landed-costs/{id}/reverse. The reads need the scope incoming:read, the two writes incoming:write. Bill lines take landedCost and weight; products take weight and weightUnit.
    • Assistant tools: list_landed_costs, get_landed_cost, preview_landed_cost, apply_landed_cost and reverse_landed_cost. The last two ask for your confirmation first, with the entry previewed.
    • The report runs as landed_costs_unallocated through report_run and the assistant's run_report.

    See docs.alyabooks.ai.

    Still stuck? Contact support