You've invoiced your client for October: ₹100,000 retainer, ₹25,000 project overage, and ₹15,000 time-and-materials at cost. One invoice, three revenue streams, three different tax treatments. In Malaysia, retainer under SST exemption stays at 0%. Project labour is taxable at 6%. T&M material cost is often exempt, but labour markup is taxable at a different rate. Your accounting software wants to apply one tax code to the entire invoice. Manual GL entry follows. Audit risk compounds. This is not a rare edge case. Every professional services firm with retainers, projects, and hourly work hits this split. Most invoicing tools do not handle it natively. The ones that do often miscalculate proration, omit regional tax logic, or require custom GL mapping that breaks during reconciliation. Here's how to structure line items, GL accounts, and tax codes so your invoicing software generates compliant invoices for Malaysia, Singapore, and Indonesia without manual adjustment. Why one tax code per invoice fails Standard invoicing logic applies a single tax code to an entire invoice. When you tick 'SST 6%', every line item gets 6%. But retainer revenue is often SST-exempt in Malaysia. Project labour is taxable. Material cost may be exempt, but labour markup is not. You end up either: Overpaying tax on retainer (applying 6% to exempt revenue) Underpaying tax on project work (applying 0% to taxable labour) Manually adjusting the GL after invoice generation Splitting the invoice into three separate invoices (messy, painful for cash flow tracking) Manual GL adjustment is not compliant. It creates an audit trail that shows an invoice at one amount, then GL entries that don't match. Tax authorities in Malaysia (SSM/LHDN), Singapore (ACRA), and Indonesia (DJP) flag this during audit. You're then asked to prove that the original invoice was correct, or that the GL adjustment was authorized and documented. The solution is to structure your invoice and GL so that tax is calculated correctly at the line-item level, and the GL reflects the invoice without adjustment. Structure line items by revenue type and tax treatment Start with your invoice template. Instead of lumping retainer, project, and T&M into one line, split them: Line 1: Retainer (October) — ₹100,000, SST exempt (or 0% GST in Singapore, 0% PPN in Indonesia if retainer qualifies) Line 2: Project Work (Milestone 3 overage labour) — ₹25,000, SST 6% (or applicable rate), because you're billing labour hours above the retainer cap Line 3: T&M Materials + Labour Markup — ₹15,000. Split further if needed: materials at ₹8,000 (exempt or low rate) and markup at ₹7,000 (taxable) Each line has a separate tax code. The invoice total is ₹140,000 + tax calculated per line, not per invoice. Why this matters: when your GL posts, it will show three revenue accounts (or sub-accounts), three tax accounts, and one accounts-receivable line. The reconciliation matches the invoice exactly. An auditor can trace any line from the invoice to the GL without finding a discrepancy. Map GL accounts by revenue and tax treatment Your chart of accounts needs to distinguish revenue type and tax status: 4100 — Retainer Revenue (Taxable Service Income) 4110 — Retainer Revenue (Tax-Exempt) — if your retainer qualifies for SST exemption in Malaysia 4200 — Project Revenue (Taxable Labour) 4300 — T&M Revenue (Material) 4310 — T&M Revenue (Labour Markup, Taxable) 2200 — SST Payable (or equivalent GST/PPN) 2210 — SST Input (if reclaim applies) When you invoice with mixed line items, your invoicing software (or finance team) will post: Debit AR (1000) — ₹140,000 + tax Credit 4110 — ₹100,000 (retainer, exempt) Credit 4200 — ₹25,000 (project labour, taxable) Credit 4300 — ₹8,000 (T&M material, exempt or low rate) Credit 4310 — ₹7,000 (T&M markup, taxable) Credit 2200 — tax owing (SST/GST/PPN calculated per line) Now the GL matches the invoice line-by-line. No reconciliation gap. Audit pass. Configure tax codes in your invoicing software Your invoicing tool needs to support per-line-item tax coding. Orin's invoicing module allows you to set a tax code per line. So does Xero (with tax codes), FreshBooks (with custom tax rates), and Wave (with tax settings). For each line, define the tax code as follows: Malaysia (SST): Retainer (exempt) → Tax Code: SST 0% (Exemption) Project Labour → Tax Code: SST 6% T&M Material → Tax Code: SST 0% (Goods, if resold) or SST 6% (if consumed) T&M Labour Markup → Tax Code: SST 6% Singapore (GST): Retainer → Tax Code: GST 0% (if services qualify as exempt, e.g., financial services) or GST 8% Project Labour → Tax Code: GST 8% T&M Material → Tax Code: GST 8% T&M Labour Markup → Tax Code: GST 8% Indonesia (PPN): Retainer → Tax Code: PPN 0% (if small-scale exemption applies) or PPN 11% Project Labour → Tax Code: PPN 11% T&M Material → Tax Code: PPN 11% T&M Labour Markup → Tax Code: PPN 11% Verify with your tax advisor or local tax authority whether your retainer qualifies for exemption. In