Lesson 4 of 5 · 9 min read
Lab: Retail sale to Panda
A hands-on walkthrough in the Oasis Fresh (Saudi) demo BG. You'll create a sales order for Panda Retail Co., run the credit check, ship the goods, issue the ZATCA-compliant AR invoice with 15% VAT, receive payment, and watch every GL entry post automatically. Pearl F&B (Qatar — no VAT) and Nile Foods (Egypt — ETA serial) run the analogous flow.
Before you start
Open the demo in a new tab:
- URL: https://aion-erp.vercel.app
- Username:
admin - Password:
Admin123
Your mission: Sell 2,000 bottles of Oasis Mango Juice 500ml to Panda Retail, ship them, invoice with 15% VAT, and collect payment. Watch every journal entry.
Estimated time: 9 minutes.
Step 1 — Create the sales order
Navigate to: Sales → Orders → New
Fill in:
- Customer: Panda Retail (CUS-001)
- Order date: today
- Promised delivery date: one week out
- Item: Oasis Mango Juice 500ml (FG-001)
- Quantity: 2,000 pcs
- Unit price: pre-filled from the customer’s price list (e.g., 8.00 SAR)
- Payment terms: Net 30
Save the SO. Note the number — something like SO-2026-00789.
What AION just did automatically:
- Looked up Panda’s credit limit (500,000 SAR in the demo data)
- Calculated current AR + open SOs and confirmed remaining credit was sufficient
- Reserved 2,000 units of FG-001 in inventory (they can still physically move, but the system knows they’re committed)
No GL impact. Sales orders are commitments, not transactions.
Step 2 — Try breaching the credit limit (optional)
Go back and edit the SO, changing the quantity to something outrageous (e.g., 100,000 units × 8 SAR = 800,000 SAR — well over Panda’s 500,000 credit limit).
On save, AION blocks the order with a message like:
Credit limit exceeded: Panda Retail has 500,000 SAR available; this order is 800,000 SAR.
Change it back to 2,000. Save cleanly.
Step 3 — Pick the goods
Navigate to: Sales → Shipments → Create from SO
Select SO-2026-00789. A pick screen appears with 2,000 units of FG-001.
Fill in:
- Warehouse: Finished Goods Warehouse
- Lot picked: the system should suggest an available lot (FIFO) — confirm the expiry date (should be at least 6 months out for retail sale)
- Picker: you
Save as “picked.” The shipment is ready but not yet shipped.
Step 4 — Ship the goods
On the shipment record, click Ship.
GL impact — automatic:
| Account | DR | CR |
|---|---|---|
| 5100 Cost of Goods Sold | 4,000 SAR | |
| 1220 Finished Goods Inventory | 4,000 SAR |
Exact amount depends on the seeded period average cost for FG-001 — roughly 2 SAR/unit × 2,000 units = 4,000 SAR.
Check it: Navigate to General Ledger → Trial Balance. Accounts 5100 and 1220 now reflect the shipment. Inventory dropped by 4,000 SAR; COGS increased by the same. No manual journal entry.
The Order Management SLA resolver fired on the shipment event.
Step 5 — Generate the AR invoice
Navigate to: AR → Invoices → Generate from Shipment
Select the shipment you just created. AION pre-fills:
- Customer: Panda Retail
- Items, quantities, lots — from the shipment
- Prices — from the SO
- VAT: 15% on the line total
- Due date: today + 30 days (from Panda’s payment terms)
Subtotal: 2,000 × 8.00 = 16,000 SAR VAT (15%): 2,400 SAR Total: 18,400 SAR
Save the invoice (as draft), then click Approve.
GL impact — automatic:
| Account | DR | CR |
|---|---|---|
| 1100 Accounts Receivable — Panda | 18,400 SAR | |
| 4100 Sales Revenue | 16,000 SAR | |
| 2120 VAT Output | 2,400 SAR |
Check it: Trial Balance shows:
- 1100 AR — Panda: +18,400
- 4100 Sales Revenue: +16,000 (recognized at the moment of ship+invoice approval)
- 2120 VAT Output: +2,400 (you now owe the tax authority)
- 5100 COGS: +4,000 (from Step 4)
Gross margin on this sale = 16,000 − 4,000 = 12,000 SAR (75%).
Step 6 — Look at the invoice output
Open the invoice record. Click Download PDF. You’ll see:
- The Arabic + English bilingual invoice layout
- A QR code (ZATCA-mandated content)
- Supplier (you) and buyer (Panda) VAT numbers
- Line breakdown with tax shown separately
- Seller’s signature block
This is the document that ships to Panda.
Step 7 — Receive payment (30 days later, simulated)
Navigate to: AR → Receipts → New
Fill in:
- Customer: Panda Retail
- Amount: 18,400 SAR
- Bank account: SABB Current (1010)
- Receipt date: today
- Reference: “Wire ref 2026-0612”
On save, AION automatically applies the receipt against the oldest open invoice for Panda — which is the 18,400 SAR invoice you just created. The invoice status changes to “Paid.”
GL impact — automatic:
| Account | DR | CR |
|---|---|---|
| 1010 Bank — SABB | 18,400 SAR | |
| 1100 Accounts Receivable — Panda | 18,400 SAR |
The Receivables SLA resolver fired on the payment event.
Verify the full picture
Navigate to: General Ledger → Trial Balance → as-of today
Net impact across all steps:
| Account | Net change |
|---|---|
| 1010 Bank | +18,400 |
| 1220 Finished Goods Inventory | −4,000 |
| 2120 VAT Output (payable) | +2,400 |
| 4100 Sales Revenue | +16,000 |
| 5100 COGS | +4,000 |
| 1100 AR — Panda | 0 (appeared and cleared) |
Gross profit on this cycle = 16,000 − 4,000 = 12,000 SAR. Net cash in = 18,400 SAR (includes VAT you’ll remit).
Every step balanced. Every entry posted automatically. You did not touch the GL.
What would have been different with Excel
- COGS posted at a “standard cost” from last year — probably wrong by 10-20%
- Revenue recognized on whatever date the accountant got around to it
- VAT calculated on a separate spreadsheet, often with rounding errors
- AR aging updated monthly, so you’d see this invoice as overdue before anyone started collecting
- Cash applied by memory, no document trail at audit
Also runs in Pearl F&B (Qatar) and Nile Foods (Egypt)
The same order-to-cash flow runs across all three demo Business Groups — but the invoice format and tax line differ by country.
| 🇸🇦 Oasis Fresh (Saudi) | 🇶🇦 Pearl F&B (Qatar) | 🇪🇬 Nile Foods (Egypt) | |
|---|---|---|---|
| Currency | SAR | QAR | EGP |
| Invoice format | ZATCA Phase 2 XML + QR + clearance | Plain QAR invoice, no e-invoicing | ETA-formatted with serial number |
| VAT on sale | 15% (ZATCA-compliant) | 0% (no mandate) | 14% (ETA) |
| CFO login | cfo.saudi | cfo.qatar | cfo.egypt |
| Featured customer | Panda Retail Co. | LuLu Hypermarket Qatar | Carrefour Egypt — Cairo Festival |
The Saudi BG is the only one that generates a ZATCA-cleared XML payload with QR. The Egypt BG generates an ETA-formatted document with serial number. The Qatar BG produces a clean QAR invoice with no VAT line — but if Qatar mandates VAT, the same engine activates it by toggling the country profile.
Try the same lab in another region:
Next lesson
In Lesson 5 — GL impact & KPIs, we’ll look at the complete accounting picture, the reports AION ships for running O2C, and the collection KPIs that separate profitable factories from ones that aren’t.