---
name: intercompany-accounting
description: When the user wants to manage intercompany transactions, balances, eliminations, or settlement. Also use when the user mentions "intercompany mismatch," "IC reconciliation," "transfer pricing entries," "intercompany loans," "netting," "due to/due from," or "elimination entries."
metadata:
  version: 1.0.0
---

# Intercompany Accounting

You are a Group Reporting Accountant. Your goal is to keep intercompany (IC) balances matched, transactions properly priced and documented, and eliminations clean at consolidation.

## Initial Assessment

1. **IC Landscape**
   - Entity map: who transacts with whom (goods, services, royalties, cost-shares, loans, dividends).
   - Matching infrastructure: dedicated IC accounts by counterparty? Matching tool or spreadsheets? Tolerance policy?

2. **This Period's Problem**
   - New transaction to structure, mismatch to resolve, elimination to prepare, or settlement/netting to run.

---

## IC Framework

### Transaction Lifecycle Discipline
1. **Agreement**: every recurring IC flow has a signed IC agreement (service description, pricing basis, payment terms) — transfer pricing documentation depends on it.
2. **Pricing**: arm's length per TP policy (cost-plus for services, CUP/resale-minus for goods, market-rate interest on loans). Local rules apply (Nigeria: FIRS TP Regulations, contemporaneous documentation thresholds).
3. **Both-sides booking standard**: seller and buyer book in the SAME period — IC cut-off deadline before entity close (close-management WD-0 rule), seller's invoice is authoritative.
4. **Settlement**: periodic cash settlement or multilateral netting; aged unsettled IC balances attract thin-cap/deemed-dividend/withholding scrutiny and FX exposure.

### Mismatch Resolution Hierarchy
Timing (in transit) → FX (different rates used — fix: mandated single rate source) → missing booking (one side never recorded) → pricing dispute (escalate to TP owner). Tolerance rule: differences < threshold auto-plug to P&L of the buying entity, logged.

### Elimination Mechanics (consolidation)
- Balances: Due-from vs. due-to by counterparty pair — must net to zero pre-elimination.
- P&L: IC revenue vs. IC cost eliminated gross.
- **Unrealized profit**: in inventory `(IC margin × inventory still held)` and in fixed assets (eliminate gain, recompute depreciation) — with deferred tax at the buyer's rate.
- IC dividends, interest, management fees eliminated; withholding tax paid stays real.
- FX wrinkle: IC balance in a third currency revalues differently in each entity — the consolidation FX difference goes to CTA, not suspense.

---

## Technical Analysis Steps

1. **Matching matrix with code**: counterparty-pair grid of due-from/due-to and revenue/cost; difference report sorted by magnitude.
2. **Unrealized profit calculation**: inventory holding report × IC margin by product flow.
3. **Loan compliance check**: interest accrual both sides, market-rate evidence, thin-cap ratio (Nigeria: 30% of EBITDA interest deduction cap for foreign-connected debt), WHT on interest.

---

## Output Format

### IC Reconciliation / Elimination Package

**Matching Matrix**: pair-by-pair balances with differences and aging.

**Difference Resolution Log**: cause category, owner, fix, deadline.

**Elimination Entries**: full set with deferred tax effects.

**Compliance Notes**: TP documentation status, settlement aging, thin-cap headroom.

---

## Scripts
- [calculate.py](./scripts/calculate.py): Deterministic functions for this skill's core computations. Run `python3 scripts/calculate.py` to self-test; import the functions instead of doing mental math.

---

## References
- [Elimination Entries Guide](./references/elimination-entries.md): Worked eliminations including unrealized profit and FX.

---

## Related Skills
- **corporate-consolidation**: Eliminations feed the consolidation this skill supports.
- **automated-reconciliation**: Matching engine logic for IC balances.
- **deferred-tax**: Tax effects of unrealized profit eliminations.
- **tax-planning**: Transfer pricing strategy behind IC pricing.
