jaz-cli 2.3.0 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/assets/skills/api/SKILL.md +35 -34
  2. package/assets/skills/api/references/errors.md +15 -7
  3. package/assets/skills/api/references/feature-glossary.md +2 -0
  4. package/assets/skills/api/references/field-map.md +3 -3
  5. package/assets/skills/conversion/SKILL.md +1 -1
  6. package/assets/skills/transaction-recipes/SKILL.md +158 -14
  7. package/assets/skills/transaction-recipes/references/asset-disposal.md +174 -0
  8. package/assets/skills/transaction-recipes/references/bad-debt-provision.md +145 -0
  9. package/assets/skills/transaction-recipes/references/building-blocks.md +25 -2
  10. package/assets/skills/transaction-recipes/references/capital-wip.md +167 -0
  11. package/assets/skills/transaction-recipes/references/dividend.md +111 -0
  12. package/assets/skills/transaction-recipes/references/employee-accruals.md +154 -0
  13. package/assets/skills/transaction-recipes/references/fixed-deposit.md +164 -0
  14. package/assets/skills/transaction-recipes/references/fx-revaluation.md +135 -0
  15. package/assets/skills/transaction-recipes/references/hire-purchase.md +190 -0
  16. package/assets/skills/transaction-recipes/references/intercompany.md +150 -0
  17. package/assets/skills/transaction-recipes/references/provisions.md +142 -0
  18. package/dist/calc/amortization.js +122 -0
  19. package/dist/calc/asset-disposal.js +151 -0
  20. package/dist/calc/blueprint.js +46 -0
  21. package/dist/calc/depreciation.js +200 -0
  22. package/dist/calc/ecl.js +101 -0
  23. package/dist/calc/fixed-deposit.js +169 -0
  24. package/dist/calc/format.js +494 -0
  25. package/dist/calc/fx-reval.js +93 -0
  26. package/dist/calc/lease.js +146 -0
  27. package/dist/calc/loan.js +107 -0
  28. package/dist/calc/provision.js +128 -0
  29. package/dist/calc/types.js +21 -0
  30. package/dist/calc/validate.js +48 -0
  31. package/dist/commands/calc.js +252 -0
  32. package/dist/index.js +2 -0
  33. package/package.json +3 -2
@@ -0,0 +1,164 @@
1
+ # Recipe: Fixed Deposit
2
+
3
+ ## Scenario
4
+
5
+ Your company places $100,000 in a 12-month fixed deposit at 3.5% annual interest. Under IFRS 9, this is classified as a financial asset at amortized cost (hold-to-collect business model, passes the SPPI test — solely payments of principal and interest). Interest is accrued monthly using the effective interest rate method and recognized in profit or loss. At maturity, the bank returns the principal plus accumulated interest.
6
+
7
+ **Pattern:** Manual journals + capsule (monthly accrual, single maturity settlement)
8
+
9
+ ---
10
+
11
+ ## Accounts Involved
12
+
13
+ | Account | Type | Subtype | Role |
14
+ |---|---|---|---|
15
+ | Fixed Deposit | Asset | Current Asset | Carries the principal for the deposit term |
16
+ | Accrued Interest Receivable | Asset | Current Asset | Accumulates monthly interest accruals |
17
+ | Interest Income | Revenue | Other Income | P&L recognition of interest earned |
18
+ | Cash / Bank Account | Asset | Bank | Outflow on placement, inflow at maturity |
19
+
20
+ ---
21
+
22
+ ## Journal Entries
23
+
24
+ ### Step 1: Placement (Day 1) — cash-out
25
+
26
+ Record the transfer from operating account to the fixed deposit. This is a **cash-out** entry in Jaz (cash leaves the bank account):
27
+
28
+ | Line | Account | Debit | Credit |
29
+ |---|---|---|---|
30
+ | 1 | Fixed Deposit | $100,000 | |
31
+ | 2 | Cash / Bank Account | | $100,000 |
32
+
33
+ > In Jaz, record this via the bank module (match the outgoing bank feed entry) or as a manual journal.
34
+
35
+ ### Step 2: Monthly Interest Accrual (each month)
36
+
37
+ **Simple interest (default):** Equal monthly accrual amount.
38
+
39
+ | Line | Account | Debit | Credit |
40
+ |---|---|---|---|
41
+ | 1 | Accrued Interest Receivable | $291.67 | |
42
+ | 2 | Interest Income | | $291.67 |
43
+
44
+ **Calculation:**
45
+ - Annual interest = $100,000 × 3.5% = $3,500
46
+ - Monthly accrual = $3,500 / 12 = $291.67
47
+
48
+ **Compound interest:** Interest is calculated on the carrying amount (principal + previously accrued interest) using the effective interest rate. Each month's accrual is slightly higher than the last. Use `jaz calc fixed-deposit --principal 100000 --rate 3.5 --term 12 --compound monthly` to generate the exact schedule.
49
+
50
+ ### Step 3: Maturity (final day) — cash-in
51
+
52
+ Principal plus accrued interest returns to the bank account. This is a **cash-in** entry in Jaz (cash arrives in the bank account):
53
+
54
+ | Line | Account | Debit | Credit |
55
+ |---|---|---|---|
56
+ | 1 | Cash / Bank Account | $103,500 | |
57
+ | 2 | Fixed Deposit | | $100,000 |
58
+ | 3 | Accrued Interest Receivable | | $3,500 |
59
+
60
+ > After this entry, Fixed Deposit and Accrued Interest Receivable both zero out. The net P&L impact is $3,500 of Interest Income recognized over the 12 months. In Jaz, record via the bank module (match the incoming bank feed entry) or as a manual journal.
61
+
62
+ ---
63
+
64
+ ## Capsule Structure
65
+
66
+ **Capsule:** "Fixed Deposit — DBS — 2025"
67
+ **Capsule Type:** "Fixed Deposit"
68
+
69
+ Contents:
70
+ - 1 placement journal
71
+ - 12 monthly interest accrual journals
72
+ - 1 maturity journal
73
+ - **Total entries:** 14
74
+
75
+ The CLI generates a `capsuleDescription` field with full workings — including the interest calculation method, per-period accrual amounts, and maturity value — so the capsule is self-documenting.
76
+
77
+ ---
78
+
79
+ ## Worked Example
80
+
81
+ **Deposit terms:**
82
+ - Principal: $100,000
83
+ - Annual rate: 3.5%
84
+ - Term: 12 months (simple interest)
85
+ - Monthly accrual: $100,000 × 3.5% / 12 = $291.67
86
+ - Total interest: $3,500.00
87
+ - Maturity value: $103,500.00
88
+
89
+ **CLI command:**
90
+ ```
91
+ jaz calc fixed-deposit --principal 100000 --rate 3.5 --term 12 --currency SGD
92
+ ```
93
+
94
+ ### Accrual Schedule (first 3 months + last month)
95
+
96
+ | Month | Accrual Amount | Cumulative Interest | Accrued Interest Receivable |
97
+ |---|---|---|---|
98
+ | 1 | $291.67 | $291.67 | $291.67 |
99
+ | 2 | $291.67 | $583.34 | $583.34 |
100
+ | 3 | $291.67 | $875.01 | $875.01 |
101
+ | ... | ... | ... | ... |
102
+ | 12 | $291.63* | $3,500.00 | $3,500.00 |
103
+
104
+ > *Final month adjusted by $0.04 to close the balance exactly to $3,500.00 (rounding correction).
105
+
106
+ **Month 1 journal entry:**
107
+ - Dr Accrued Interest Receivable $291.67
108
+ - Cr Interest Income $291.67
109
+ - Description: "FD interest accrual — Month 1 of 12 (DBS)"
110
+ - Assign to capsule
111
+
112
+ **Month 3 journal entry:**
113
+ - Dr Accrued Interest Receivable $291.67
114
+ - Cr Interest Income $291.67
115
+ - Description: "FD interest accrual — Month 3 of 12 (DBS)"
116
+ - Assign to capsule
117
+
118
+ **Maturity journal entry:**
119
+ - Dr Cash $103,500.00
120
+ - Cr Fixed Deposit $100,000.00
121
+ - Cr Accrued Interest Receivable $3,500.00
122
+ - Description: "FD maturity — principal + interest received (DBS)"
123
+ - Assign to capsule
124
+
125
+ **Totals over 12 months:**
126
+ - Total interest income: $3,500.00
127
+ - Net cash impact: −$100,000 at placement, +$103,500 at maturity = +$3,500
128
+
129
+ ---
130
+
131
+ ## Enrichment Suggestions
132
+
133
+ | Enrichment | Value | Why |
134
+ |---|---|---|
135
+ | Tracking Tag | "Fixed Deposit" | Filter all FD-related transactions in reports |
136
+ | Nano Classifier | Instrument → "Term Deposit" | Distinguish from savings accounts or money market funds |
137
+ | Custom Field | "Deposit Reference" → "TD-2025-001" | Record the bank's deposit certificate number |
138
+ | Custom Field | "Bank Name" → "DBS" | Identify the issuing bank for multi-bank portfolios |
139
+
140
+ Set the tag and nano classifier on each accrual journal. Custom fields go on the placement journal (the capsule groups everything together).
141
+
142
+ ---
143
+
144
+ ## Verification
145
+
146
+ 1. **Accrued Interest Receivable should accumulate monthly** → Trial Balance at month 6 should show $1,750.02 (6 × $291.67). The balance grows each month until maturity.
147
+ 2. **Interest Income P&L line = total accrual to date** → P&L at any date should equal the sum of accrual entries posted up to that date.
148
+ 3. **At maturity, Fixed Deposit account zeros out** → After the maturity journal, Fixed Deposit balance = $0 and Accrued Interest Receivable balance = $0.
149
+ 4. **Cash flow: Cash decreased by principal on placement, increased by maturity value at end** → Net cash movement over the 12 months = +$3,500 (the interest earned).
150
+ 5. **Group General Ledger by Capsule** → "Fixed Deposit — DBS — 2025" should show all 14 entries. Fixed Deposit nets to $0 and Interest Income totals $3,500.
151
+
152
+ ---
153
+
154
+ ## Variations
155
+
156
+ **Compound interest:** Use `jaz calc fixed-deposit --principal 100000 --rate 3.5 --term 12 --compound monthly` to generate a schedule where each month's interest is calculated on the carrying amount (principal + accrued interest to date). Total interest will be slightly higher than simple interest ($3,556.46 vs $3,500.00 for monthly compounding). The effective interest rate method applies the same logic — each period's income = carrying amount × periodic rate.
157
+
158
+ **FX-denominated deposit:** If the deposit is in USD but your base currency is SGD, record the placement journal with `currency: { sourceCurrency: "USD" }`. Monthly accruals should use the spot rate at each month-end. At maturity, any difference between the cumulative translated amounts and the actual SGD received is an FX gain/loss. Cross-reference the fx-revaluation recipe for month-end revaluation of the outstanding balance.
159
+
160
+ **Premature withdrawal:** The bank may impose a penalty (reduced interest rate or flat fee). Record the maturity journal with the reduced interest amount. If interest already accrued exceeds the actual payout, reverse the excess: Dr Interest Income / Cr Accrued Interest Receivable. Note the penalty in the journal description.
161
+
162
+ **Auto-rollover:** When the bank automatically rolls over the deposit at maturity, close the original capsule with a maturity journal (Dr Fixed Deposit New / Cr Fixed Deposit Old + Cr Accrued Interest Receivable), then create a new capsule for the rolled deposit. The new principal may include the prior interest if the bank compounds on rollover.
163
+
164
+ **PH withholding tax (20% final WHT on interest income):** In jurisdictions that withhold tax on interest at source, the maturity cash received is net of WHT. Record: Dr Cash (net) + Dr WHT Receivable or Tax Expense / Cr Fixed Deposit + Cr Accrued Interest Receivable. This variation is deferred to a future recipe update.
@@ -0,0 +1,135 @@
1
+ # Recipe: FX Revaluation — Non-AR/AP Items (IAS 21)
2
+
3
+ ## Scenario
4
+
5
+ Your Singapore company (base currency SGD) has a USD 50,000 intercompany loan receivable from a subsidiary, originally booked at a rate of 1.35 (SGD 67,500). At the December 31 reporting date, the USD/SGD closing rate is 1.38. IAS 21.23 requires all monetary items translated at the closing rate, so you post a revaluation journal to recognize the unrealized FX gain, then reverse it on Day 1 of the next period.
6
+
7
+ **Pattern:** Manual journals + capsule (revaluation journal + Day 1 reversal, repeated each period-end)
8
+
9
+ **When this recipe applies:**
10
+ - Intercompany loan receivables/payables booked as manual journals (not invoices/bills)
11
+ - Foreign currency term deposits or escrow outside bank accounts
12
+ - FX-denominated provisions (e.g., USD warranty obligation)
13
+ - Any manual journal balance in a non-AR/AP, non-cash foreign currency account
14
+
15
+ **When this recipe does NOT apply — the platform handles it automatically:**
16
+ - Invoices, bills, customer/supplier credit notes (auto-revalued)
17
+ - Cash and bank account balances (auto-revalued)
18
+
19
+ ---
20
+
21
+ ## Accounts Involved
22
+
23
+ | Account | Type | Subtype | Role |
24
+ |---|---|---|---|
25
+ | [Source Account] | Asset or Liability | Varies | The FX monetary item being revalued |
26
+ | FX Unrealized Gain | Revenue | Other Income | Holds gains when closing rate > book rate |
27
+ | FX Unrealized Loss | Expense | Other Expense | Holds losses when closing rate < book rate |
28
+
29
+ > **Note:** Jaz auto-creates FX gain/loss/rounding accounts when FX features are enabled. Use the platform-created accounts — do not create duplicates.
30
+
31
+ ---
32
+
33
+ ## Journal Entries
34
+
35
+ ### Step 1: Revaluation Journal (period-end)
36
+
37
+ Calculate the unrealized gain or loss:
38
+
39
+ ```
40
+ Gain/Loss = Foreign Amount × (Closing Rate − Book Rate)
41
+ ```
42
+
43
+ **If gain (closing rate > book rate):**
44
+
45
+ | Line | Account | Debit | Credit |
46
+ |---|---|---|---|
47
+ | 1 | [Source Account] | *gain amount* | |
48
+ | 2 | FX Unrealized Gain | | *gain amount* |
49
+
50
+ **If loss (closing rate < book rate):**
51
+
52
+ | Line | Account | Debit | Credit |
53
+ |---|---|---|---|
54
+ | 1 | FX Unrealized Loss | *loss amount* | |
55
+ | 2 | [Source Account] | | *loss amount* |
56
+
57
+ ### Step 2: Reversal Journal (Day 1 of next period)
58
+
59
+ Post the exact opposite of Step 1. This ensures the next period starts clean — the FX impact is recognized in the correct period only.
60
+
61
+ ---
62
+
63
+ ## Capsule Structure
64
+
65
+ **Capsule:** "FX Revaluation — Non-AR/AP — Dec 2025"
66
+ **Capsule Type:** "FX Revaluation"
67
+
68
+ Contents:
69
+ - 1 revaluation journal (period-end)
70
+ - 1 reversal journal (Day 1 of next period)
71
+ - **Total entries:** 2 per period
72
+
73
+ For ongoing monthly revaluations, create one capsule per quarter or fiscal year (e.g., "FX Reval — FY2025") containing all months' reval/reversal pairs.
74
+
75
+ ---
76
+
77
+ ## Worked Example
78
+
79
+ **Setup:**
80
+ - Intercompany loan receivable: USD 50,000
81
+ - Book rate (at original booking): 1.35 SGD/USD
82
+ - Book value: SGD 67,500
83
+ - Closing rate (Dec 31): 1.38 SGD/USD
84
+ - Closing value: SGD 69,000
85
+
86
+ **Calculation:**
87
+ ```
88
+ Gain = USD 50,000 × (1.38 − 1.35) = USD 50,000 × 0.03 = SGD 1,500
89
+ ```
90
+
91
+ **Dec 31, 2025 — Revaluation journal:**
92
+ - Dr Intercompany Loan Receivable SGD 1,500
93
+ - Dr/Cr FX Unrealized Gain SGD 1,500
94
+ - Description: "FX revaluation — USD 50,000 @ 1.38 (was 1.35)"
95
+ - Assign to capsule
96
+
97
+ **Jan 1, 2026 — Reversal journal:**
98
+ - Dr FX Unrealized Gain SGD 1,500
99
+ - Cr Intercompany Loan Receivable SGD 1,500
100
+ - Description: "Reversal of FX revaluation — USD 50,000"
101
+ - Assign to same capsule
102
+
103
+ **Use the calculator:** `jaz calc fx-reval --amount 50000 --book-rate 1.35 --closing-rate 1.38 --currency USD --base-currency SGD`
104
+
105
+ ---
106
+
107
+ ## Enrichment Suggestions
108
+
109
+ | Enrichment | Value | Why |
110
+ |---|---|---|
111
+ | Tracking Tag | "FX Revaluation" | Filter all reval entries in GL |
112
+ | Tracking Tag | "USD" | Filter by currency for multi-currency reval |
113
+ | Custom Field | "Source Account" → "Intercompany Loan — SubCo" | Identify the item being revalued |
114
+ | Custom Field | "Period End Date" → "2025-12-31" | Link to reporting period |
115
+
116
+ ---
117
+
118
+ ## Verification
119
+
120
+ 1. **Group General Ledger by Capsule** → Reval + reversal should net to zero across both entries.
121
+ 2. **Trial Balance at Dec 31** → Intercompany Loan Receivable shows SGD 69,000 (original 67,500 + 1,500 reval). FX Unrealized Gain shows SGD 1,500 credit.
122
+ 3. **Trial Balance at Jan 1 (after reversal)** → Intercompany Loan Receivable back to SGD 67,500. FX Unrealized Gain cleared.
123
+ 4. **P&L for December** → FX Unrealized Gain of SGD 1,500 recognized in the correct period.
124
+
125
+ ---
126
+
127
+ ## Variations
128
+
129
+ **Multiple FX items:** If you have several non-AR/AP FX balances (e.g., USD loan + EUR deposit + JPY provision), you can combine them into a single multi-line revaluation journal. Each pair of lines handles one item. All in the same capsule.
130
+
131
+ **Loss scenario:** If the closing rate is lower than the book rate, the journal debits FX Unrealized Loss instead of crediting FX Unrealized Gain. The reversal mirrors accordingly.
132
+
133
+ **No reversal method:** Some firms keep the reval in place and adjust the book rate for the next period. This avoids the reversal journal but requires updating the "book rate" each period. The reversal method shown here is more conservative and widely used.
134
+
135
+ **Quarterly vs. monthly:** Reval can be done monthly or quarterly depending on materiality. For material FX exposures, monthly is recommended (IAS 21 does not prescribe frequency — it's a reporting date requirement).
@@ -0,0 +1,190 @@
1
+ # Recipe: Hire Purchase
2
+
3
+ ## Scenario
4
+
5
+ Your company acquires a motor vehicle under a hire purchase (HP) agreement: $5,000/month for 36 months at 5% incremental borrowing rate. Ownership transfers to you at the end of the term. Under IFRS 16, this is accounted for the same way as any other lease — right-of-use asset, lease liability, effective interest unwinding — with **one critical difference**: the ROU asset is depreciated over its **useful life** (60 months), not the lease term (36 months), because ownership transfers at the end.
6
+
7
+ **Pattern:** Hybrid — native fixed asset (straight-line ROU depreciation over useful life) + manual journals (liability unwinding) + capsule
8
+
9
+ **Cross-reference:** This recipe is a variant of the [IFRS 16 Lease recipe](./ifrs16-lease.md). Everything is identical except the depreciation period. Read the IFRS 16 recipe first for the full foundational treatment, then return here for the hire purchase-specific difference.
10
+
11
+ **Why the difference:** IFRS 16.32 requires that when ownership transfers (or a purchase option is reasonably certain to be exercised), the ROU asset is depreciated over the asset's useful life rather than the lease term. Hire purchase agreements always transfer ownership, so this rule always applies.
12
+
13
+ ---
14
+
15
+ ## Accounts Involved
16
+
17
+ | Account | Type | Subtype | Role |
18
+ |---|---|---|---|
19
+ | Right-of-Use Asset | Asset | Non-Current Asset | The HP'd asset (e.g., motor vehicle) |
20
+ | Accumulated Depreciation — ROU | Asset | Non-Current Asset | Contra-asset reducing ROU net book value |
21
+ | Lease Liability | Liability | Non-Current Liability | PV of future HP payments |
22
+ | Interest Expense — Leases | Expense | Finance Cost | Effective interest on lease liability |
23
+ | Depreciation Expense — ROU | Expense | Depreciation | Straight-line over useful life (NOT lease term) |
24
+ | Cash / Bank Account | Asset | Bank | Makes monthly HP payments |
25
+
26
+ > **Same accounts as IFRS 16 lease.** The only change is the depreciation calculation — the accounts, journal structure, and liability unwinding are all identical.
27
+
28
+ ---
29
+
30
+ ## Journal Entries
31
+
32
+ ### Step 1: Initial Recognition (same as IFRS 16)
33
+
34
+ | Line | Account | Debit | Credit |
35
+ |---|---|---|---|
36
+ | 1 | Right-of-Use Asset | $166,828.51 | |
37
+ | 2 | Lease Liability | | $166,828.51 |
38
+
39
+ PV of 36 payments of $5,000 at 5% annual (0.4167% monthly).
40
+
41
+ ### Step 2: Monthly HP Payment (same as IFRS 16)
42
+
43
+ Each $5,000 payment splits between interest (expense) and principal (liability reduction):
44
+
45
+ | Line | Account | Debit | Credit |
46
+ |---|---|---|---|
47
+ | 1 | Lease Liability | *principal portion* | |
48
+ | 2 | Interest Expense — Leases | *interest portion* | |
49
+ | 3 | Cash / Bank Account | | $5,000 |
50
+
51
+ **Calculation per month:**
52
+ - Interest = Outstanding liability x 0.4167%
53
+ - Principal = $5,000 - Interest
54
+ - New liability = Outstanding liability - Principal
55
+
56
+ ### Step 3: Monthly Depreciation — THE KEY DIFFERENCE
57
+
58
+ | Line | Account | Debit | Credit |
59
+ |---|---|---|---|
60
+ | 1 | Depreciation Expense — ROU | $2,780.48 | |
61
+ | 2 | Accumulated Depreciation — ROU | | $2,780.48 |
62
+
63
+ **Standard IFRS 16 lease:** $166,828.51 / 36 months = **$4,634.13/month**
64
+ **Hire purchase:** $166,828.51 / 60 months = **$2,780.48/month**
65
+
66
+ > The hire purchase depreciation rate is **$1,853.65/month LESS** than a standard lease. This is because the asset's economic life (60 months) extends well beyond the payment term (36 months). Ownership transfers, so the asset continues generating value after the last payment.
67
+
68
+ ---
69
+
70
+ ## Capsule Structure
71
+
72
+ **Capsule:** "Hire Purchase — Motor Vehicle — 2025"
73
+ **Capsule Type:** "Hire Purchase"
74
+
75
+ Contents:
76
+ - 1 initial recognition journal (ROU asset + lease liability)
77
+ - 36 monthly payment journals (manual — interest changes each month)
78
+ - 60 monthly depreciation entries (auto-generated by fixed asset register — these appear in the ledger but aren't manually created)
79
+ - **Manually created entries:** 37
80
+
81
+ > The fixed asset depreciation entries are not assigned to the capsule automatically. Group the General Ledger by the ROU asset account alongside the capsule view for a complete picture. Depreciation continues for 24 months after the last HP payment.
82
+
83
+ ---
84
+
85
+ ## Worked Example
86
+
87
+ **HP terms:**
88
+ - Monthly payment: $5,000
89
+ - Lease term: 36 months
90
+ - Incremental borrowing rate: 5% annual (0.4167% monthly)
91
+ - Asset useful life: 60 months
92
+ - PV of lease payments: $166,828.51
93
+
94
+ **CLI command:**
95
+ ```
96
+ jaz calc lease --payment 5000 --term 36 --rate 5 --useful-life 60 --start-date 2025-01-01
97
+ ```
98
+
99
+ The `--useful-life 60` flag tells the calculator this is a hire purchase — depreciation will use 60 months instead of the 36-month lease term. The CLI generates a `capsuleDescription` with full workings so the capsule is self-documenting.
100
+
101
+ ### Liability Unwinding Table (first 3 months + month 36)
102
+
103
+ | Month | Opening Liability | Interest (0.4167%) | Principal | Closing Liability |
104
+ |---|---|---|---|---|
105
+ | 1 | $166,828.51 | $695.12 | $4,304.88 | $162,523.63 |
106
+ | 2 | $162,523.63 | $677.18 | $4,322.82 | $158,200.81 |
107
+ | 3 | $158,200.81 | $659.17 | $4,340.83 | $153,859.98 |
108
+ | ... | ... | ... | ... | ... |
109
+ | 36 | $4,979.24 | $20.75 | $4,979.24 | $0.00* |
110
+
111
+ > *Final payment adjusted to close the liability exactly to zero (payment = $4,999.99).
112
+
113
+ **Month 1 journal entry (manual — same as IFRS 16):**
114
+ - Dr Lease Liability $4,304.88
115
+ - Dr Interest Expense — Leases $695.12
116
+ - Cr Cash $5,000.00
117
+ - Description: "HP payment — Month 1 of 36 (Motor Vehicle)"
118
+ - Assign to capsule
119
+
120
+ **Month 1 depreciation (automatic — posted by Jaz FA register):**
121
+ - Dr Depreciation Expense — ROU $2,780.48
122
+ - Cr Accumulated Depreciation — ROU $2,780.48
123
+
124
+ ### Depreciation Comparison: Hire Purchase vs Standard Lease
125
+
126
+ | Item | Standard IFRS 16 Lease | Hire Purchase |
127
+ |---|---|---|
128
+ | Depreciation period | 36 months (lease term) | 60 months (useful life) |
129
+ | Monthly depreciation | $4,634.13 | $2,780.48 |
130
+ | **Difference** | — | **$1,853.65/month LESS** |
131
+
132
+ ### What Happens After Month 36 (Lease Payments End)
133
+
134
+ | Item | Value |
135
+ |---|---|
136
+ | Lease Liability | $0 (fully unwound) |
137
+ | ROU Asset (gross) | $166,828.51 |
138
+ | Accumulated Depreciation (36 months) | $100,097.28 |
139
+ | **ROU Net Book Value** | **$66,731.23** |
140
+ | Remaining depreciation period | 24 more months |
141
+
142
+ After the last HP payment, the lease liability is zero and no more cash leaves the account. But the ROU asset still has a book value of $66,731.23 because it was depreciated over 60 months, not 36. Depreciation of $2,780.48/month continues for another 24 months until the asset is fully depreciated.
143
+
144
+ ### Summary Over Full Useful Life (60 Months)
145
+
146
+ | Item | Total |
147
+ |---|---|
148
+ | Total cash payments | $180,000 (36 x $5,000) |
149
+ | Total interest expense | $13,171.48 |
150
+ | Total depreciation expense | $166,828.51 |
151
+ | **Total P&L impact** | **$180,000** |
152
+ | Lease liability at month 36 | $0 |
153
+ | ROU asset net book value at month 36 | $66,731.23 |
154
+ | ROU asset net book value at month 60 | $0 |
155
+
156
+ > **P&L timing differs from a standard lease.** With hire purchase, the P&L charge is spread over 60 months instead of 36. In months 1-36, both interest and depreciation hit the P&L. In months 37-60, only depreciation remains — at a lower rate than the original cash payment.
157
+
158
+ ---
159
+
160
+ ## Enrichment Suggestions
161
+
162
+ | Enrichment | Value | Why |
163
+ |---|---|---|
164
+ | Tracking Tag | "Hire Purchase" | Filter all HP-related transactions |
165
+ | Nano Classifier | Asset Type → "Motor Vehicle" | Break down by asset class if multiple HPs |
166
+ | Custom Field | "HP Agreement #" → "HP-2025-0089" | Record the hire purchase agreement reference |
167
+
168
+ ---
169
+
170
+ ## Verification
171
+
172
+ 1. **Lease Liability should reduce to $0 at end of lease term (month 36)** → Group General Ledger by Capsule. Liability starts at $166,828.51 and closes at $0 after 36 payments.
173
+ 2. **Interest Expense total = total cash payments - PV** → $180,000 − $166,828.51 = $13,171.48 (rounding may cause ±$0.01 variance).
174
+ 3. **ROU Asset continues depreciating after lease payments end** → At month 36, ROU net book value = $66,731.23. Depreciation continues at $2,780.48/month for 24 more months.
175
+ 4. **At end of useful life (month 60), ROU asset is fully depreciated** → ROU Asset $166,828.51 − Accumulated Depreciation $166,828.51 = $0 net book value.
176
+ 5. **Balance Sheet check** → Between months 37-60, no lease liability exists but the ROU asset (net of accumulated depreciation) continues appearing on the balance sheet. This is the distinguishing feature of hire purchase vs operating lease.
177
+
178
+ ---
179
+
180
+ ## Variations
181
+
182
+ **Standard operating lease (no ownership transfer):** Use `jaz calc lease --payment 5000 --term 36 --rate 5` without the `--useful-life` flag. The ROU asset is depreciated over the lease term (36 months), not useful life. See the [IFRS 16 Lease recipe](./ifrs16-lease.md).
183
+
184
+ **Guaranteed residual value:** If the HP agreement includes a guaranteed residual value (e.g., $10,000 balloon payment at end of term), add the PV of the residual to the initial ROU asset and lease liability. The liability schedule must include the balloon as the final period payment.
185
+
186
+ **Variable payments:** Only the fixed portion of HP payments is included in the PV calculation. Any variable component (e.g., mileage-based charges) is recognized as expense when incurred, not capitalized in the ROU asset.
187
+
188
+ **SG motor vehicle specifics:** The COE (Certificate of Entitlement) is typically treated as a separate intangible asset with its own amortization schedule (10 years for Category A/B), not bundled into the HP's ROU asset. Create a separate capsule for the COE if applicable.
189
+
190
+ **SG tax depreciation (IRAS):** Capital allowances for motor vehicles under Section 19/19A may differ from IFRS depreciation. The S-car cap ($35,000 for private cars) and the 3-year write-off period for commercial vehicles don't align with IFRS useful life estimates. Businesses may need to track both IFRS depreciation (for financial reporting) and tax depreciation (for S68 deductions) separately. This recipe covers IFRS only — tax depreciation adjustments are out of scope.
@@ -0,0 +1,150 @@
1
+ # Recipe: Intercompany Transactions
2
+
3
+ ## Scenario
4
+
5
+ Your Singapore holding company (Entity A) provides management services to its Malaysian subsidiary (Entity B) at $15,000 per month. Both entities are on Jaz. At month-end, Entity A invoices Entity B, and each entity records mirrored journal entries. A capsule in each entity tracks the full intercompany lifecycle — charges, settlements, and reconciliation.
6
+
7
+ **Pattern:** Manual journals mirrored in two entities + capsule in each entity
8
+
9
+ ---
10
+
11
+ ## Accounts Involved
12
+
13
+ ### Entity A (Service Provider)
14
+
15
+ | Account | Type | Subtype | Role |
16
+ |---|---|---|---|
17
+ | Intercompany Receivable — Entity B | Asset | Current Asset | Amount owed by Entity B |
18
+ | Management Fee Income | Revenue | Revenue | Service charge recognized |
19
+ | Cash / Bank Account | Asset | Bank | Receives settlement payment |
20
+
21
+ ### Entity B (Service Recipient)
22
+
23
+ | Account | Type | Subtype | Role |
24
+ |---|---|---|---|
25
+ | Intercompany Payable — Entity A | Liability | Current Liability | Amount owed to Entity A |
26
+ | Management Fee Expense | Expense | Expense | Service charge incurred |
27
+ | Cash / Bank Account | Asset | Bank | Sends settlement payment |
28
+
29
+ ---
30
+
31
+ ## Journal Entries
32
+
33
+ ### Step 1: Service Charge (Entity A — Provider)
34
+
35
+ **Option A — Invoice:** Create an invoice from Entity A to Entity B (preferred if you want AR aging and payment tracking):
36
+ - Invoice: $15,000 to "Entity B" contact
37
+ - Coded to Management Fee Income
38
+ - Assign to capsule
39
+
40
+ **Option B — Manual journal:** If you want to bypass AR/AP:
41
+
42
+ | Line | Account | Debit | Credit |
43
+ |---|---|---|---|
44
+ | 1 | Intercompany Receivable — Entity B | $15,000 | |
45
+ | 2 | Management Fee Income | | $15,000 |
46
+
47
+ ### Step 2: Corresponding Entry (Entity B — Recipient)
48
+
49
+ **Option A — Bill:** Create a bill from Entity A in Entity B's books:
50
+ - Bill: $15,000 from "Entity A" contact
51
+ - Coded to Management Fee Expense
52
+ - Assign to capsule
53
+
54
+ **Option B — Manual journal:**
55
+
56
+ | Line | Account | Debit | Credit |
57
+ |---|---|---|---|
58
+ | 1 | Management Fee Expense | $15,000 | |
59
+ | 2 | Intercompany Payable — Entity A | | $15,000 |
60
+
61
+ ### Step 3: Settlement (cash transfer)
62
+
63
+ **Entity A (receives cash):**
64
+ - Record receipt against the invoice, or:
65
+ - Dr Cash / Cr Intercompany Receivable — Entity B
66
+
67
+ **Entity B (sends cash):**
68
+ - Record payment against the bill, or:
69
+ - Dr Intercompany Payable — Entity A / Cr Cash
70
+
71
+ ---
72
+
73
+ ## Capsule Structure
74
+
75
+ **Entity A Capsule:** "Intercompany — Q1 2025 — Entity A → Entity B"
76
+ **Entity B Capsule:** "Intercompany — Q1 2025 — Entity A → Entity B"
77
+ **Capsule Type:** "Intercompany"
78
+
79
+ Contents per entity:
80
+ - 3 monthly charge entries (invoices/bills or journals)
81
+ - Settlement entries
82
+ - **Total entries per entity:** 4-6 per quarter
83
+
84
+ ---
85
+
86
+ ## Worked Example
87
+
88
+ **Setup:**
89
+ - Management fee: $15,000/month
90
+ - Entities: Entity A (Singapore) and Entity B (Malaysia)
91
+ - Quarter: Q1 2025 (Jan, Feb, Mar)
92
+
93
+ **Jan 31 — Entity A:**
94
+ - Create invoice: $15,000 to Entity B
95
+ - Code to Management Fee Income
96
+ - Capsule: "Intercompany — Q1 2025 — Entity A → Entity B"
97
+ - Custom field: "Intercompany Ref" → "IC-2025-001"
98
+
99
+ **Jan 31 — Entity B:**
100
+ - Create bill: $15,000 from Entity A
101
+ - Code to Management Fee Expense
102
+ - Capsule: "Intercompany — Q1 2025 — Entity A → Entity B"
103
+ - Custom field: "Intercompany Ref" → "IC-2025-001"
104
+
105
+ *Repeat for Feb and Mar with matching Intercompany Ref.*
106
+
107
+ **Mar 31 — Quarterly settlement:**
108
+ - Entity B transfers $45,000 to Entity A
109
+ - Entity A: record receipt against 3 invoices
110
+ - Entity B: record payment against 3 bills
111
+ - Both capsules now show matching charge + settlement entries
112
+
113
+ **Consolidation verification:**
114
+ - Entity A: Intercompany Receivable $0, Management Fee Income $45,000
115
+ - Entity B: Intercompany Payable $0, Management Fee Expense $45,000
116
+ - On consolidation: both entries eliminate (income vs. expense, receivable vs. payable)
117
+
118
+ ---
119
+
120
+ ## Enrichment Suggestions
121
+
122
+ | Enrichment | Value | Why |
123
+ |---|---|---|
124
+ | Tracking Tag | "Intercompany" | Filter all IC entries across entities |
125
+ | Custom Field | "Intercompany Ref" → "IC-2025-001" | **Critical** — matching reference in both entities for reconciliation |
126
+ | Custom Field | "Counterparty Entity" → "Entity B" | Identify the other party |
127
+ | Nano Classifier | Service Type → "Management Fee" | Categorize the type of IC charge |
128
+
129
+ ---
130
+
131
+ ## Verification
132
+
133
+ 1. **Intercompany Reconciliation** → At any point, Entity A's Intercompany Receivable balance should equal Entity B's Intercompany Payable balance. Any mismatch indicates a missing or incorrect entry.
134
+ 2. **Trial Balance** → After settlement, both Intercompany Receivable and Intercompany Payable should be $0.
135
+ 3. **P&L match** → Entity A's Management Fee Income = Entity B's Management Fee Expense (same amounts, opposite directions).
136
+ 4. **Custom Field search** → Search both entities for matching "Intercompany Ref" values to verify every charge has a counterpart.
137
+
138
+ ---
139
+
140
+ ## Variations
141
+
142
+ **Cross-currency intercompany:** If Entity A is SGD and Entity B is MYR, use the FX invoice/bill format: `currency: { sourceCurrency: "SGD" }` on Entity B's bill. FX differences are auto-handled. For manual journals, apply the spot rate and record any FX difference.
143
+
144
+ **Cost allocation (not a service fee):** If Entity A allocates shared costs (rent, IT, insurance) to Entity B, the pattern is the same but the income account may be "Intercompany Cost Recovery" (contra-expense) instead of revenue.
145
+
146
+ **Netting:** If both entities charge each other (e.g., A provides management, B provides warehousing), net the amounts and settle only the difference. Each entity still records the full gross charges — netting applies only to the cash settlement.
147
+
148
+ **Transfer pricing:** Ensure intercompany prices are at arm's length for tax compliance. Document the pricing methodology in the capsule custom field (e.g., "TP Method" → "Cost Plus 10%").
149
+
150
+ **Loan vs. trade:** If the intercompany transaction is a loan (not a service), use Intercompany Loan Receivable/Payable instead of trade accounts. Interest may apply — use the loan recipe for interest calculations.