@classytic/ca-tax 0.0.14 → 0.0.17

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.
package/dist/index3.d.mts CHANGED
@@ -742,6 +742,53 @@ interface Class141AdditionalAllowanceResult {
742
742
  issues: string[];
743
743
  }
744
744
  declare function computeClass141AdditionalAllowance(input: Class141AdditionalAllowanceInput): Class141AdditionalAllowanceResult;
745
+ /**
746
+ * s.13(39): on a disposition of class 14.1 property that was eligible capital
747
+ * property (ECP) before 1 January 2017, the taxpayer is deemed to have
748
+ * acquired additional class 14.1 property with a capital cost equal to the
749
+ * LEAST of three amounts: 1/4 of the proceeds of disposition, 1/4 of the
750
+ * capital cost of the property disposed of, and (per the explanatory notes to
751
+ * the enacting bill) a third amount tied to the property's own pre-2017
752
+ * CEC-sourced history. Old CEC only pulled 75% of an expenditure into the
753
+ * pool (and correspondingly only 75% of a disposition receipt reduced it,
754
+ * with the other 25% capital-gain-like) — without this addback, the switch to
755
+ * class 14.1's 100% inclusion would create MORE recapture on legacy goodwill
756
+ * than the old regime ever intended.
757
+ *
758
+ * The FIRST TWO limbs are corroborated by two independent primary/near-primary
759
+ * sources (Finance Canada's own explanatory notes to the enacting bill, cross-
760
+ * checked against a summary of the statute). The THIRD limb's exact wording
761
+ * could not be confirmed against the Act's own text (the retrieval tooling
762
+ * available here truncates before s.13(39) — see this repo's
763
+ * `research/findings/federal/CCA-straight-line-classes.md`), so — same
764
+ * fail-closed convention as `computeClass141AdditionalAllowance` just above —
765
+ * this function bounds the addback by a caller-supplied REMAINING transitional
766
+ * balance instead of guessing at the statute's own third limb. A missing
767
+ * balance behaves as zero, never as unlimited.
768
+ *
769
+ * The RESULT is a deemed capital-cost addition — the caller adds it to the
770
+ * class 14.1 row's `netAdjustments` (or applies it directly against a
771
+ * recapture already computed by `computeCcaClass`) for the SAME year as the
772
+ * disposition; it is not itself a CCA claim.
773
+ */
774
+ declare const CLASS_14_1_RECAPTURE_REDUCTION_RATE = 0.25;
775
+ interface Class141RecaptureReductionInput {
776
+ /** Proceeds of disposition of the class 14.1 property that was ECP before 2017. */
777
+ proceeds: number;
778
+ /** Capital cost of that property. */
779
+ capitalCost: number;
780
+ /**
781
+ * The pre-2017 CEC-sourced transitional balance still available to offset
782
+ * recapture (fail-closed: omitted or 0 → no reduction at all). Track it down
783
+ * alongside `transitionalBalanceAt2017` used by the additional-allowance
784
+ * rule above — both draw on the same pre-2017 history, but this reduction
785
+ * does not itself consume that balance (it isn't a claim), so a caller
786
+ * tracking one shared pool across both rules must reduce it by whichever
787
+ * rule's own remaining-balance output is smaller for that year.
788
+ */
789
+ transitionalBalanceRemaining?: number;
790
+ }
791
+ declare function computeClass141RecaptureReduction(input: Class141RecaptureReductionInput): number;
745
792
  //#endregion
746
793
  //#region src/t2/schedules/schedule8.d.ts
747
794
  interface CcaClassInput {
@@ -1640,6 +1687,86 @@ interface LimitedPartnershipLossesResult {
1640
1687
  }
1641
1688
  declare function computeLimitedPartnershipLosses(rows: readonly LimitedPartnershipLossRow[]): LimitedPartnershipLossesResult;
1642
1689
  //#endregion
1690
+ //#region src/t2/at1/schedules/schedule21-rife.d.ts
1691
+ /**
1692
+ * AT1 Schedule 21, page 5 — Continuity of Restricted Interest and Financing
1693
+ * Expenses (RIFE), lines 200-250 and 310-350.
1694
+ *
1695
+ * `schedule21-year-of-origin.ts`'s own doc comment documents that this
1696
+ * section is not part of the NetFile transmission schema (no `021200`
1697
+ * through `021350` field exists anywhere in the spec) — that is still true,
1698
+ * and this module does not emit anything into `schedule21Values`. What
1699
+ * changed: line 240 ("RIFE deducted for the tax year") is printed with its
1700
+ * own instruction — "Enter amount on line 130 of the Schedule 12" — and AT1
1701
+ * Schedule 12 line 130 ("Restricted interest and financing expenses") IS a
1702
+ * real filed line (`schedule12.ts`'s own note: "If Schedule 21 exists,
1703
+ * Alberta = 021240; otherwise Alberta = federal"). So this schedule's own
1704
+ * detail stays paper/UI-only, while this module's `deducted` output is a
1705
+ * genuine input to Schedule 12's reconciliation.
1706
+ *
1707
+ * Two blocks, read top to bottom exactly as printed:
1708
+ *
1709
+ * Block 1 — the RIFE balance itself:
1710
+ * 250 (closing) = 200 (opening) + 210 (wind-up transfer)
1711
+ * − 220 (acquisition-of-control adjustment)
1712
+ * + 230 (current-year RIFE) − 240 (deducted)
1713
+ *
1714
+ * Block 2 — the cap line 240 must not exceed:
1715
+ * 310 = 200 + 210 − 220
1716
+ * 340 = 320 (excess capacity) + 330 (received capacity)
1717
+ * 350 = the LESSER of 310 and 340 — this is line 240's ceiling
1718
+ *
1719
+ * Lines 230/320/330 are themselves sourced from other forms this engine does
1720
+ * not yet compute — 230 from T2 Schedule 4 line 710 (Schedule 4's own RIFE
1721
+ * pool is input-only in this engine — see `schedule4.ts`'s Part 8 doc
1722
+ * comment), 320/330 from T2 Schedule 130 lines 129/130 (the federal EIFEL
1723
+ * limitation module, `eifel-limitation.ts`, explicitly does not compute
1724
+ * Parts 2G/2H/2I — see that module's own doc comment). All three stay plain
1725
+ * preparer entries here until that federal work lands; once it does, they
1726
+ * become carried-in rather than typed.
1727
+ *
1728
+ * Whole dollars, pure.
1729
+ */
1730
+ interface RifeContinuityInput {
1731
+ /** 200 — RIFE at the end of the previous tax year. */
1732
+ openingBalance?: number;
1733
+ /** 210 — transferred on an amalgamation or wind-up of a subsidiary. */
1734
+ transferredOnWindUp?: number;
1735
+ /** 220 — deducted: adjustment for an acquisition of control. */
1736
+ acquisitionOfControlAdjustment?: number;
1737
+ /** 230 — current-year RIFE under ITA subsection 111(8) (T2 Schedule 4 line 710). */
1738
+ currentYearRife?: number;
1739
+ /** 320 — corporation's excess capacity for the year (T2 Schedule 130 line 129). */
1740
+ excessCapacity?: number;
1741
+ /** 330 — total received capacity for the year (T2 Schedule 130 line 130). */
1742
+ receivedCapacity?: number;
1743
+ /**
1744
+ * 240 — RIFE deducted for the tax year, discretionary. Must not exceed 350;
1745
+ * omit to claim the maximum available (350) automatically.
1746
+ */
1747
+ deductedClaim?: number;
1748
+ }
1749
+ interface RifeContinuityResult {
1750
+ openingBalance: number;
1751
+ transferredOnWindUp: number;
1752
+ acquisitionOfControlAdjustment: number;
1753
+ currentYearRife: number;
1754
+ /** 310 — RIFE from previous tax years: 200 + 210 − 220. */
1755
+ rifeFromPreviousYears: number;
1756
+ excessCapacity: number;
1757
+ receivedCapacity: number;
1758
+ /** 340 — 320 + 330. */
1759
+ totalCapacity: number;
1760
+ /** 350 — the lesser of 310 and 340; line 240's ceiling. */
1761
+ maxDeductible: number;
1762
+ /** 240 — the lesser of the requested claim and 350. */
1763
+ deducted: number;
1764
+ /** 250 — 200 + 210 − 220 + 230 − 240. */
1765
+ closingBalance: number;
1766
+ issues: string[];
1767
+ }
1768
+ declare function computeRifeContinuity(input?: RifeContinuityInput): RifeContinuityResult;
1769
+ //#endregion
1643
1770
  //#region src/t2/at1/schedules/schedule21-year-of-origin.d.ts
1644
1771
  /**
1645
1772
  * AT1 Schedule 21 — Analysis of Losses by Year of Origin.
@@ -1670,11 +1797,12 @@ declare function computeLimitedPartnershipLosses(rows: readonly LimitedPartnersh
1670
1797
  *
1671
1798
  * `Continuity of Restricted Interest and Financing Expenses` (RIFE, page 5
1672
1799
  * of the same PDF, lines 200-250/310-350) is the live form's NINTH section
1673
- * and is deliberately NOT modelled here: an exhaustive search of the entire
1674
- * NetFile transmission spec (§3.2.3.1 through the schedule index) turns up
1675
- * no `021200`-`021350` field anywhere it is not part of the electronic
1676
- * filing schema this engine targets, only the paper form. Flagged, not
1677
- * silently dropped.
1800
+ * and is deliberately NOT modelled HERE it lives in its own
1801
+ * `schedule21-rife.ts` instead, same as limited partnership losses got its
1802
+ * own file. That module's doc comment covers why RIFE's own lines still
1803
+ * never appear on the wire (an exhaustive search of the entire NetFile
1804
+ * transmission spec turns up no `021200`-`021350` field anywhere) even
1805
+ * though its final figure now feeds a real filed line elsewhere.
1678
1806
  *
1679
1807
  * Whole dollars, pure.
1680
1808
  */
@@ -2289,11 +2417,6 @@ interface At1ScheduleData {
2289
2417
  scheduleId: string;
2290
2418
  values: At1ScheduleValue[];
2291
2419
  }
2292
- /**
2293
- * Schedules the engine computes but cannot yet file, because their line numbers
2294
- * have not been transcribed from the specification. Named so the difference
2295
- * between "no data" and "not implemented" is visible rather than silent.
2296
- */
2297
2420
  /**
2298
2421
  * Schedules this module can put into a filing payload. Exported so callers and
2299
2422
  * tests share one source of truth — a hard-coded copy in a test drifts the moment
@@ -2301,16 +2424,18 @@ interface At1ScheduleData {
2301
2424
  */
2302
2425
  declare const AT1_SCHEDULES_WITH_BUILDERS: readonly string[];
2303
2426
  /**
2304
- * Schedules the engine computes but cannot yet file.
2427
+ * Schedules the engine computes but cannot yet file — currently empty.
2305
2428
  *
2306
- * **014** (cumulative eligible capital) is here for a different reason from the
2307
- * rest: eligible capital property was repealed on 1 January 2017 and a certified
2308
- * preparer does not offer the schedule for a current year at all, so its field
2309
- * numbers cannot be verified the way every other schedule's were. It applies only
2310
- * to the 2016/2017 straddling year.
2429
+ * Its one member, Schedule 14 (cumulative eligible capital), was removed
2430
+ * entirely rather than left here: it had no server wiring and no UI to begin
2431
+ * with, and applies only to a corporation whose tax year straddles
2432
+ * 2016-12-31 (eligible capital property's repeal date) see
2433
+ * `research/findings/alberta/AT1-schedule14-cec.md`.
2311
2434
  *
2312
- * Every other schedule has been verified line by line against the live certified
2313
- * form.
2435
+ * Every implemented schedule has been verified line by line against the live
2436
+ * certified form. Kept as a named, tested concept (not deleted outright)
2437
+ * since a future schedule may legitimately land here again before its
2438
+ * builder does.
2314
2439
  */
2315
2440
  declare const AT1_SCHEDULES_WITHOUT_BUILDERS: readonly string[];
2316
2441
  /** `SSSFFFOOO` — schedule id, field id, occurrence. Occurrence is 1-based. */
@@ -2443,10 +2568,36 @@ interface Schedule12FilingInput {
2443
2568
  alberta: number;
2444
2569
  federal: number;
2445
2570
  };
2571
+ /** 012022 / 012023 — depletion (AT1 Sch 15 EDA + CMEDB claims). */
2572
+ depletion?: {
2573
+ alberta: number;
2574
+ federal: number;
2575
+ };
2576
+ /** 012026 / 012027 — Canadian exploration expenses. */
2577
+ cee?: {
2578
+ alberta: number;
2579
+ federal: number;
2580
+ };
2581
+ /** 012028 / 012029 — Canadian development expenses. */
2582
+ cde?: {
2583
+ alberta: number;
2584
+ federal: number;
2585
+ };
2586
+ /** 012030 / 012031 — foreign exploration and development expenses. */
2587
+ foreignExploration?: {
2588
+ alberta: number;
2589
+ federal: number;
2590
+ };
2591
+ /** 012032 / 012033 — Canadian oil and gas property expenses. */
2592
+ cogpe?: {
2593
+ alberta: number;
2594
+ federal: number;
2595
+ };
2446
2596
  /**
2447
2597
  * Area B — losses of preceding taxation years, deducted in arriving at Alberta
2448
- * taxable income. Same federal/Alberta pairing and the same
2449
- * omit-when-they-agree rule.
2598
+ * taxable income. Same federal/Alberta pairing as Area A, but NOT the same
2599
+ * omission rule — see this file's `schedule12Values` for why Area B always
2600
+ * transmits both sides.
2450
2601
  *
2451
2602
  * Build these with `schedule12LossDeductions` rather than by hand: the capital
2452
2603
  * one is NOT the raw amount applied.
@@ -2468,6 +2619,51 @@ interface Schedule12FilingInput {
2468
2619
  alberta: number;
2469
2620
  federal: number;
2470
2621
  };
2622
+ /**
2623
+ * 012072 / 012073 — limited partnership losses of preceding years.
2624
+ * Alberta = Schedule 21's own `totalApplied` (Σ line 139) when that
2625
+ * schedule's limited-partnership table has rows; otherwise federal's own
2626
+ * figure, per the spec: "if form 021 exists, must equal [the sum of]
2627
+ * 021139; otherwise must equal fed 200335."
2628
+ */
2629
+ limitedPartnership?: {
2630
+ alberta: number;
2631
+ federal: number;
2632
+ };
2633
+ };
2634
+ /**
2635
+ * Area B, the donations deduction — same "always transmit both sides"
2636
+ * mandatory-disclosure shape as `lossDeductions` above (spec marks 056-059
2637
+ * `M`, not `X` like Area A's conditional pairs), verified against the
2638
+ * rendered `AT1SCH12-income-loss-reconciliation-TRA11732.pdf` page 2, not
2639
+ * the raw text extraction (which garbles this exact area — see the
2640
+ * capital-gains/central-credit-union block a few lines below it, which
2641
+ * this type deliberately does NOT model: reading the rendered page showed
2642
+ * both its Alberta (074) and federal (075) columns source from the SAME
2643
+ * federal T2 line 340, so it can never diverge and was never a real
2644
+ * candidate for a reconciling pair in the first place).
2645
+ */
2646
+ donations?: {
2647
+ /** 012056 / 012057 — charitable donations claimed this year. */charitable?: {
2648
+ alberta: number;
2649
+ federal: number;
2650
+ }; /** 012058 / 012059 — gifts to Canada/a province, cultural and ecological gifts claimed this year. */
2651
+ gifts?: {
2652
+ alberta: number;
2653
+ federal: number;
2654
+ };
2655
+ };
2656
+ /**
2657
+ * 012130 / 012131 — restricted interest and financing expenses (the EIFEL
2658
+ * denial, ITA s.18.2). Same always-both-sides mandatory disclosure as
2659
+ * `lossDeductions`/`donations` above, per the spec: "if Schedule 21
2660
+ * exists, Alberta = 021240; otherwise Alberta = federal." Federal stays 0
2661
+ * until the federal EIFEL limitation engine computes the s.111(1)(a.1)
2662
+ * deduction (T2 line 336) — not yet wired into `computeFederalT2`.
2663
+ */
2664
+ restrictedInterestAndFinancing?: {
2665
+ alberta: number;
2666
+ federal: number;
2471
2667
  };
2472
2668
  }
2473
2669
  /**
@@ -2546,16 +2742,24 @@ interface Schedule21FilingInput {
2546
2742
  * schedule object — the payload has one `021` block, not two.
2547
2743
  */
2548
2744
  limitedPartnershipLosses?: LimitedPartnershipLossesResult;
2745
+ /**
2746
+ * The NINTH section (page 5) — Continuity of Restricted Interest and
2747
+ * Financing Expenses. NOT part of the NetFile schema (see
2748
+ * `schedule21-rife.ts`'s own doc comment) — `schedule21Values` below does
2749
+ * not emit anything for it. Kept here only so `scheduleTwelve`'s Alberta
2750
+ * line 130 reconciliation (`AT1SCH12` line 130, "Restricted interest and
2751
+ * financing expenses") can read `.deducted`.
2752
+ */
2753
+ rife?: RifeContinuityResult;
2549
2754
  /** The SEVENTH section — analysis of non-capital losses by year of origin (151-169), 21 occurrences. */
2550
2755
  nonCapitalByYearOfOrigin?: NonCapitalLossByYearOfOriginResult;
2551
2756
  /** The EIGHTH section — farm/restricted-farm/LPP by year of origin (181-187), 21 occurrences. */
2552
2757
  otherLossesByYearOfOrigin?: OtherLossByYearOfOriginResult;
2553
2758
  }
2554
- declare function schedule21Values(input: Schedule21FilingInput): At1ScheduleData;
2759
+ declare function schedule21Values$1(input: Schedule21FilingInput): At1ScheduleData;
2555
2760
  /**
2556
2761
  * Field ids read off the live form:
2557
2762
  *
2558
- * 001 associated with one or more CCPCs? Y/N
2559
2763
  * 003 income from active businesses (T2 line 400 / Sch 12 line 106)
2560
2764
  * 005 deduct: royalty tax deduction (Sch 5 line 021)
2561
2765
  * 007 balance = 003 − 005, floored at nil
@@ -2566,6 +2770,14 @@ declare function schedule21Values(input: Schedule21FilingInput): At1ScheduleData
2566
2770
  * The royalty deduction lines are oil-and-gas and left to the caller; they are
2567
2771
  * omitted rather than zeroed, since an absent conditional line is not the same as
2568
2772
  * a nil one.
2773
+ *
2774
+ * There is NO field 001 here — "associated with one or more CCPCs?" is filed on
2775
+ * the AT1 JACKET (`000001001`, `jacket.ts`'s `LINE_001`), not on this schedule.
2776
+ * 4 real, accepted TRA Fall-2026 NetFile certification samples
2777
+ * (`research/validation/tra-test-cases-fall-2026/`) confirm this schedule's own
2778
+ * `<Schedule Number="001">` block starts at field 003 in every case; see
2779
+ * `research/findings/alberta/AT1-jacket-line-001-extractor-boundary.md` for the
2780
+ * full investigation.
2569
2781
  */
2570
2782
  /** One member of Area A's Agreement Among Associated Corporations (041/043/045). */
2571
2783
  interface Schedule1AgreementMember {
@@ -2578,8 +2790,6 @@ interface Schedule1AgreementMember {
2578
2790
  }
2579
2791
  interface Schedule1FilingInput {
2580
2792
  result: AlbertaSbdResult;
2581
- /** 001001 — associated with one or more CCPCs. */
2582
- isAssociated?: boolean;
2583
2793
  /** 001003 — active business income. */
2584
2794
  activeBusinessIncome?: number;
2585
2795
  /** 001009 — Alberta taxable income, adjusted. */
@@ -2589,7 +2799,7 @@ interface Schedule1FilingInput {
2589
2799
  /** Area A — 041/043/045, one occurrence per associated corp, claimant first. */
2590
2800
  agreementMembers?: Schedule1AgreementMember[];
2591
2801
  }
2592
- declare function schedule1Values(input: Schedule1FilingInput): At1ScheduleData;
2802
+ declare function schedule1Values$1(input: Schedule1FilingInput): At1ScheduleData;
2593
2803
  /**
2594
2804
  * Area A, the general allocation formula (ITA Reg 402). Four inputs, all taken
2595
2805
  * from the federal Schedule 5:
@@ -2608,7 +2818,7 @@ interface Schedule2FilingInput {
2608
2818
  albertaRevenue?: number;
2609
2819
  totalRevenue?: number;
2610
2820
  }
2611
- declare function schedule2Values(input: Schedule2FilingInput): At1ScheduleData;
2821
+ declare function schedule2Values$1(input: Schedule2FilingInput): At1ScheduleData;
2612
2822
  /**
2613
2823
  * Four loss types are modelled, each with its own column on the form:
2614
2824
  *
@@ -2943,13 +3153,13 @@ declare function computeSchedule3(input: Schedule3Input): Schedule3Result;
2943
3153
  * file rather than the shared filing module per the task instructions — other
2944
3154
  * agents are editing `at1-schedule-line-items.ts` concurrently.
2945
3155
  */
2946
- interface At1ScheduleValueLike$6 {
3156
+ interface At1ScheduleValueLike$5 {
2947
3157
  lineItemId: string;
2948
3158
  value: string | number;
2949
3159
  }
2950
- interface At1ScheduleDataLike$6 {
3160
+ interface At1ScheduleDataLike$5 {
2951
3161
  scheduleId: string;
2952
- values: At1ScheduleValueLike$6[];
3162
+ values: At1ScheduleValueLike$5[];
2953
3163
  }
2954
3164
  /**
2955
3165
  * Field ids per the spec transcription above: 100-108 (ITC), 200-208 (CITC),
@@ -2959,7 +3169,7 @@ interface At1ScheduleDataLike$6 {
2959
3169
  * per-vintage figures this DOES compute (304/306/308/310) are filed on the
2960
3170
  * 300-series rollup, not re-emitted as an AAPITC occurrence table.
2961
3171
  */
2962
- declare function schedule3Values(result: Schedule3Result): At1ScheduleDataLike$6;
3172
+ declare function schedule3Values(result: Schedule3Result): At1ScheduleDataLike$5;
2963
3173
  //#endregion
2964
3174
  //#region src/t2/at1/schedules/schedule4-foreign-investment-tax-credit.d.ts
2965
3175
  /**
@@ -3357,15 +3567,15 @@ declare function computeAlbertaSchedule5(input: AlbertaSchedule5Input): AlbertaS
3357
3567
  * result; and 005200, which gates whether the successored sections are
3358
3568
  * processed at all but is not itself a filed dollar/detail line.
3359
3569
  */
3360
- interface At1ScheduleValueLike$5 {
3570
+ interface At1ScheduleValueLike$4 {
3361
3571
  lineItemId: string;
3362
3572
  value: string | number;
3363
3573
  }
3364
- interface At1ScheduleDataLike$5 {
3574
+ interface At1ScheduleDataLike$4 {
3365
3575
  scheduleId: string;
3366
- values: At1ScheduleValueLike$5[];
3576
+ values: At1ScheduleValueLike$4[];
3367
3577
  }
3368
- declare function schedule5Values(result: AlbertaSchedule5Result): At1ScheduleDataLike$5;
3578
+ declare function schedule5Values(result: AlbertaSchedule5Result): At1ScheduleDataLike$4;
3369
3579
  //#endregion
3370
3580
  //#region src/t2/at1/schedules/schedule6-royalty-tax-credit.d.ts
3371
3581
  /**
@@ -3558,13 +3768,13 @@ interface AlbertaSchedule6Result {
3558
3768
  * shared filing module — other agents edit `at1-schedule-line-items.ts`
3559
3769
  * concurrently.
3560
3770
  */
3561
- interface At1ScheduleValueLike$4 {
3771
+ interface At1ScheduleValueLike$3 {
3562
3772
  lineItemId: string;
3563
3773
  value: string | number;
3564
3774
  }
3565
- interface At1ScheduleDataLike$4 {
3775
+ interface At1ScheduleDataLike$3 {
3566
3776
  scheduleId: string;
3567
- values: At1ScheduleValueLike$4[];
3777
+ values: At1ScheduleValueLike$3[];
3568
3778
  }
3569
3779
  /**
3570
3780
  * Emits every field this module's own MAPPINGS transcription actually defines
@@ -3583,7 +3793,7 @@ interface At1ScheduleDataLike$4 {
3583
3793
  * `schedule3Values`'s `At1ScheduleDataLike` shape exactly: `{ scheduleId,
3584
3794
  * values }`.
3585
3795
  */
3586
- declare function schedule6Values(result: AlbertaSchedule6Result): At1ScheduleDataLike$4;
3796
+ declare function schedule6Values(result: AlbertaSchedule6Result): At1ScheduleDataLike$3;
3587
3797
  declare function computeAlbertaSchedule6(input: AlbertaSchedule6Input): AlbertaSchedule6Result;
3588
3798
  //#endregion
3589
3799
  //#region src/t2/at1/schedules/schedule7-royalty-supplemental.d.ts
@@ -3802,13 +4012,13 @@ interface AlbertaSchedule7Result {
3802
4012
  * file rather than the shared filing module — other agents edit
3803
4013
  * `at1-schedule-line-items.ts` concurrently.
3804
4014
  */
3805
- interface At1ScheduleValueLike$3 {
4015
+ interface At1ScheduleValueLike$2 {
3806
4016
  lineItemId: string;
3807
4017
  value: string | number;
3808
4018
  }
3809
- interface At1ScheduleDataLike$3 {
4019
+ interface At1ScheduleDataLike$2 {
3810
4020
  scheduleId: string;
3811
- values: At1ScheduleValueLike$3[];
4021
+ values: At1ScheduleValueLike$2[];
3812
4022
  }
3813
4023
  /**
3814
4024
  * Emits CPI (007003-029), the computed totals 007051 and 007061, and the two
@@ -3823,7 +4033,7 @@ interface At1ScheduleDataLike$3 {
3823
4033
  * "Schedule 7, line 061" and gives its formula in full, so it is filed here
3824
4034
  * under that citation rather than omitted for lack of a home row.
3825
4035
  */
3826
- declare function schedule7Values(result: AlbertaSchedule7Result): At1ScheduleDataLike$3;
4036
+ declare function schedule7Values$1(result: AlbertaSchedule7Result): At1ScheduleDataLike$2;
3827
4037
  declare function computeAlbertaSchedule7(input: AlbertaSchedule7Input): AlbertaSchedule7Result;
3828
4038
  //#endregion
3829
4039
  //#region src/t2/at1/schedules/schedule8-political-contributions.d.ts
@@ -3954,7 +4164,7 @@ declare function computeSchedule8(input: Schedule8Input): Schedule8Result;
3954
4164
  * Does NOT emit jacket line 000074 (the actual tax credit) — that is a
3955
4165
  * jacket line, not a Schedule 8 line. Use `result.credit` for that.
3956
4166
  */
3957
- declare function schedule8Values(result: Schedule8Result): At1ScheduleData;
4167
+ declare function schedule8Values$1(result: Schedule8Result): At1ScheduleData;
3958
4168
  //#endregion
3959
4169
  //#region src/t2/at1/schedules/schedule9-sred-tax-credit.d.ts
3960
4170
  /**
@@ -4213,13 +4423,13 @@ declare function allocateSchedule9ExpenditureLimit(daysInLongestYear: number, re
4213
4423
  * shared filing module per the task instructions — other agents are editing
4214
4424
  * `at1-schedule-line-items.ts` concurrently.
4215
4425
  */
4216
- interface At1ScheduleValueLike$2 {
4426
+ interface At1ScheduleValueLike$1 {
4217
4427
  lineItemId: string;
4218
4428
  value: string | number;
4219
4429
  }
4220
- interface At1ScheduleDataLike$2 {
4430
+ interface At1ScheduleDataLike$1 {
4221
4431
  scheduleId: string;
4222
- values: At1ScheduleValueLike$2[];
4432
+ values: At1ScheduleValueLike$1[];
4223
4433
  }
4224
4434
  /**
4225
4435
  * The page-3 "Allocation of the Maximum Expenditure Limit" context that has no
@@ -4249,223 +4459,7 @@ interface Schedule9GroupFilingInput {
4249
4459
  * eligible expenditures for Alberta purposes" figure per the spec's own
4250
4460
  * cross-reference ("106 ... Value must equal 009031").
4251
4461
  */
4252
- declare function schedule9Values(result: AlbertaSchedule9Result, group?: Schedule9GroupFilingInput): At1ScheduleDataLike$2;
4253
- //#endregion
4254
- //#region src/t2/at1/schedules/schedule11-manufacturing-processing.d.ts
4255
- /**
4256
- * Alberta AT1 Schedule 11 — Alberta Manufacturing and Processing Profits Deduction.
4257
- *
4258
- * ── This form is HISTORICAL: it stopped applying 2001-03-31 ────────────────
4259
- *
4260
- * The spec's own business rule for the form-required flag (line 011) says so
4261
- * directly: *"If the corp's tax year beginning is prior to April 1, 2001 and
4262
- * the corp derives at least 10% of its gross revenue for the year from
4263
- * manufacturing or processing of goods for sale or lease, then form 011
4264
- * should be completed. NOTE: The M&P Deduction is only applicable up to
4265
- * March 31, 2001."* (TRA spec §3.2.3.12, lines 9135-9146). `computeSchedule11`
4266
- * enforces both halves of that test — the tax-year date AND the 10%
4267
- * gross-revenue ratio — and forces line 042 to nil whenever either fails,
4268
- * regardless of what the capital/labour workings below would otherwise
4269
- * produce.
4270
- *
4271
- * ── What this module does NOT compute ───────────────────────────────────
4272
- *
4273
- * The transcribed section (TRA spec §3.2.3.12, lines 9082-9397) stops at line
4274
- * 042, "Alberta Manufacturing and Processing Profits" — an INCOME figure, not
4275
- * a tax saving. No rate or deduction-dollar calculation appears in that
4276
- * range, so none is invented here; `albertaManufacturingProcessingProfits` is
4277
- * exactly line 042 as specified, nothing further.
4278
- *
4279
- * ADJUBI (line 001 / AMPPD), Cost of Capital (031) and Cost of Labour (037)
4280
- * are the SAME figures federal Schedule 27 Part 2 computes — confirmed
4281
- * against `packages/ca-tax/src/t2/forms/generated/schedule27.captions.ts`,
4282
- * where line 130 is "Adjusted business income (ADJUBI)", line 140 is "Cost of
4283
- * capital (C)" and line 160 is "Cost of labour (L)" (matching the AT1 spec's
4284
- * "fed 027130" / "fed 027140" / "fed 027160" references exactly: `027` +
4285
- * the three-digit federal line number). This codebase has no module that
4286
- * COMPUTES those figures, though: `schedule27-mp.ts` starts from Part 2's
4287
- * OUTPUT (`manufacturingAndProcessingProfits`, fed line 200 = CMPP), never
4288
- * from ADJUBI or the capital/labour cost bases that produce it. Per the task
4289
- * scope instruction, this module takes `federalAdjubi`, `costOfCapital` and
4290
- * `costOfLabour` as plain numeric INPUTS the caller supplies from the
4291
- * federal Schedule 27 Part 2 workings, rather than reimplementing Part 2.
4292
- *
4293
- * ── Line map (TRA spec §3.2.3.12) ───────────────────────────────────────
4294
- *
4295
- * 011001 AMPPD ADJUBI for Alberta purposes (line 9152-9165)
4296
- * 011013 CCPC-only: aggregate investment income (line 9167-9179)
4297
- * 011031 Cost of Capital (= fed 027140) (line 9248-9256)
4298
- * 011033 Alberta Cost of Manufacturing & Processing
4299
- * Capital (≤ 011031) (line 9257-9273)
4300
- * 011037 Cost of Labour (= fed 027160) (line 9274-9282)
4301
- * 011039 Alberta Cost of Manufacturing & Processing
4302
- * Labour (≤ 011037) (line 9283-9294)
4303
- * 011042 AMPP Alberta Manufacturing and Processing Profits (line 9295-9390)
4304
- *
4305
- * ── Line 001 (AMPPD): a discrepancy in the source document ─────────────────
4306
- *
4307
- * The line CAPTION reads *"If the ADJUBI is calculated differently for
4308
- * Alberta purposes, then enter the amount from Schedule 12, line 116"*, but
4309
- * the BUSINESS RULE beside it gives a different, fully-specified formula:
4310
- * *"value = 012112 + 012114. If negative, default = 0. Otherwise, if form 012
4311
- * does not exist, set value = fed 027130."* There is no Schedule 12 line 116
4312
- * anywhere else in this spec. This module follows the business rule's stated
4313
- * arithmetic (012112 + 012114) rather than the caption's single, unverifiable
4314
- * line reference, because a formula that is actually computable beats a
4315
- * citation that cannot be checked. Flagged here rather than silently resolved
4316
- * either way, per the task's instruction not to guess at spec ambiguity.
4317
- *
4318
- * ── Line 042: the four-case formula collapses to two `min`s ────────────────
4319
- *
4320
- * The spec states line 042 as four cases keyed by whether 011031 < 011033 ×
4321
- * 100/85 and whether 011037 < 011039 × 100/75. Each case selects, per
4322
- * dimension, either the RAW cost (031 or 037) or the grossed-up ALBERTA
4323
- * portion (033 × 100/85 or 039 × 100/75) — precisely a `Math.min`, matching
4324
- * the shape federal Schedule 27 lines 150/170 already use for the analogous
4325
- * "cost of manufacturing and processing capital/labour" figures:
4326
- *
4327
- * 042 = 001 × [min(033×100/85, 031) + min(039×100/75, 037)] / (031 + 037)
4328
- *
4329
- * Verified against all four spec cases: whichever side of "031 < 033×100/85"
4330
- * holds, `min(033×100/85, 031)` reduces to exactly the value that case's
4331
- * formula uses (031 itself, or the grossed-up 033), and likewise for the
4332
- * labour term — so the single expression above reproduces all four cases
4333
- * without branching on them explicitly.
4334
- *
4335
- * ── Small manufacturing corporations: out of scope by the spec itself ──────
4336
- *
4337
- * The AMPP business rule (line 9180-9184) says lines 011031-011042 "must be
4338
- * completed" for a corp OTHER than a small manufacturing corp, and "must not
4339
- * exist" otherwise — but gives no alternative formula for a small
4340
- * manufacturer's line 042 anywhere in the transcribed range (the "AT1 Guide"
4341
- * it defers to is a separate document not sourced here). `computeSchedule11`
4342
- * does not guess one: pass `smallManufacturerAmpp` directly when
4343
- * `isSmallManufacturingCorp` is true, or an issue is raised and line 042
4344
- * reports nil.
4345
- *
4346
- * Whole dollars, pure.
4347
- */
4348
- interface Schedule11Input {
4349
- /**
4350
- * The corporation's tax year START date, ISO `YYYY-MM-DD`. The deduction
4351
- * applies only where this is before 2001-04-01 (TRA-spec lines 9135-9146).
4352
- */
4353
- taxYearStart: string;
4354
- /**
4355
- * Gross revenue from manufacturing or processing of goods for sale or
4356
- * lease, for the 10% test (TRA-spec lines 9138-9142).
4357
- */
4358
- manufacturingGrossRevenue?: number;
4359
- /** Total gross revenue for the year, for the 10% test. */
4360
- totalGrossRevenue?: number;
4361
- /**
4362
- * Whether the corp qualifies as a "small manufacturing corp" per the AT1
4363
- * Guide criteria (business rule beside line "AMPP", 9180-9184). Gates
4364
- * whether 011031-011042 apply at all.
4365
- */
4366
- isSmallManufacturingCorp?: boolean;
4367
- /**
4368
- * 011042 supplied directly for a small manufacturing corp. The transcribed
4369
- * spec range states only that 011031-011042 "must not exist" in this case
4370
- * — it does not give the alternative formula, so none is derived here.
4371
- */
4372
- smallManufacturerAmpp?: number;
4373
- /** 027130 — federal Schedule 27 ADJUBI. Used unless the Alberta figure differs. */
4374
- federalAdjubi?: number;
4375
- /**
4376
- * When the corp elects to calculate ADJUBI differently for Alberta
4377
- * purposes (Schedule 12 exists): the two Schedule 12 lines the AT1
4378
- * business rule sums, 012112 + 012114. Supplying this OVERRIDES
4379
- * `federalAdjubi` for line 011001 — presence of this field IS the "chooses
4380
- * to calculate ADJUBI differently, and form 012 exists" signal.
4381
- */
4382
- albertaAdjubiFromSchedule12?: {
4383
- line112: number;
4384
- line114: number;
4385
- };
4386
- /**
4387
- * 000029 = 1 or 2 — Canadian-controlled private corporation, gating line
4388
- * 011013 (CCPC-only aggregate investment income). This figure is a
4389
- * disclosure item: the transcribed spec range (9082-9397) does not use it
4390
- * anywhere in the line 042 formula.
4391
- */
4392
- isCcpc?: boolean;
4393
- /** Whether an Alberta Schedule 12 exists for this return. */
4394
- schedule12Exists?: boolean;
4395
- /** Alberta-specific aggregate investment income, used when Schedule 12 exists. */
4396
- albertaAggregateInvestmentIncome?: number;
4397
- /** 200440 — federal aggregate investment income, used when Schedule 12 does not exist. */
4398
- federalAggregateInvestmentIncome?: number;
4399
- /** 011031 — Cost of Capital. Must equal fed 027140 for a non-small-manufacturer. */
4400
- costOfCapital?: number;
4401
- /** 011033 — the Alberta portion of Cost of Capital. Clamped to ≤ costOfCapital. */
4402
- albertaCostOfCapital?: number;
4403
- /** 011037 — Cost of Labour. Must equal fed 027160 for a non-small-manufacturer. */
4404
- costOfLabour?: number;
4405
- /** 011039 — the Alberta portion of Cost of Labour. Clamped to ≤ costOfLabour. */
4406
- albertaCostOfLabour?: number;
4407
- }
4408
- interface Schedule11Result {
4409
- /** Whether the deduction applies this year at all (date test AND 10% gross-revenue test). */
4410
- eligible: boolean;
4411
- isSmallManufacturingCorp: boolean;
4412
- /** 011001 (AMPPD) — resolved ADJUBI base for the line 042 formula. */
4413
- albertaAdjubi: number;
4414
- /** 011013 — CCPC aggregate investment income. Undefined when the corp is not a CCPC. */
4415
- aggregateInvestmentIncome?: number;
4416
- /** 011031. */
4417
- costOfCapital: number;
4418
- /** 011033. */
4419
- albertaCostOfCapital: number;
4420
- /** 011037. */
4421
- costOfLabour: number;
4422
- /** 011039. */
4423
- albertaCostOfLabour: number;
4424
- /** 011042 — Alberta Manufacturing and Processing Profits. Nil unless `eligible`. */
4425
- albertaManufacturingProcessingProfits: number;
4426
- /** Manufacturing gross revenue ÷ total gross revenue, when both figures were given. */
4427
- grossRevenueRatio?: number;
4428
- issues: string[];
4429
- }
4430
- declare function computeSchedule11(input: Schedule11Input): Schedule11Result;
4431
- /**
4432
- * `scheduleNNValues` for Schedule 11, following the `at1-schedule-line-items.ts`
4433
- * builder pattern (see `schedule20Values`, `schedule16Values`). Kept in THIS
4434
- * file rather than the shared filing module per the task instructions — other
4435
- * agents are editing `at1-schedule-line-items.ts` concurrently.
4436
- */
4437
- interface At1ScheduleValueLike$1 {
4438
- lineItemId: string;
4439
- value: string | number;
4440
- }
4441
- interface At1ScheduleDataLike$1 {
4442
- scheduleId: string;
4443
- values: At1ScheduleValueLike$1[];
4444
- }
4445
- /**
4446
- * Field ids per the spec transcription above: 001 (AMPPD/ADJUBI), 013 (CCPC
4447
- * aggregate investment income), 031/033/037/039 (cost of capital/labour, both
4448
- * jurisdictions) and 042 (Alberta M&P Profits).
4449
- *
4450
- * Line 042 is ALWAYS emitted, including when the historical-eligibility gate
4451
- * (pre-2001-04-01 tax year AND the 10% gross-revenue test) has forced it to
4452
- * nil — an ineligible year still has a line 011042 on the form, and it reads
4453
- * nil, so this files nil rather than omitting the line entirely. The REASON
4454
- * it is nil (a `Schedule 11: … applies only where the tax year begins before
4455
- * 2001-04-01 …` / `… below the 10% threshold …` entry) lives on
4456
- * `result.issues`, which this builder does not carry onto the wire itself —
4457
- * the caller already has `result` (this function's own input) and so already
4458
- * has `result.issues` sitting beside whatever this returns; duplicating it
4459
- * onto `At1ScheduleDataLike`, which has no field for prose, would only be
4460
- * losing information conversion by not adding any.
4461
- *
4462
- * Line 013 (CCPC aggregate investment income) is the one line legitimately
4463
- * OMITTED rather than filed as nil: it is undefined, not zero, for a non-CCPC
4464
- * corporation — the spec's own business rule gates it on `000029 = 1 or 2`,
4465
- * so a non-CCPC has no box to fill here at all, unlike line 042's "nil is a
4466
- * real answer" case above.
4467
- */
4468
- declare function schedule11Values(result: Schedule11Result): At1ScheduleDataLike$1;
4462
+ declare function schedule9Values(result: AlbertaSchedule9Result, group?: Schedule9GroupFilingInput): At1ScheduleDataLike$1;
4469
4463
  //#endregion
4470
4464
  //#region src/t2/at1/schedules/schedule15-resource-related-deductions.d.ts
4471
4465
  /**
@@ -5468,8 +5462,7 @@ interface AlbertaReturnInput {
5468
5462
  result: AlbertaSchedule9Result;
5469
5463
  group?: Schedule9GroupFilingInput;
5470
5464
  };
5471
- lossCarryback?: Schedule10FilingInput; /** Alberta manufacturing and processing profits deduction — historical, pre-2001-04-01 only (Sch 11). */
5472
- manufacturingProcessing?: Schedule11Result;
5465
+ lossCarryback?: Schedule10FilingInput;
5473
5466
  reconciliation?: Schedule12FilingInput;
5474
5467
  cca?: AlbertaSchedule13Result; /** Alberta resource related deductions — eight expense-pool continuities (Sch 15). */
5475
5468
  resourceDeductions?: AlbertaSchedule15Result;
@@ -5655,6 +5648,18 @@ interface At1TransmitterInfo {
5655
5648
  amendmentDescription?: string;
5656
5649
  }
5657
5650
  interface At1FilingData {
5651
+ /**
5652
+ * 000001001 — associated with one or more Canadian-controlled private
5653
+ * corporations? Confirmed against 4 real, accepted TRA Fall-2026 NetFile
5654
+ * certification samples (`research/validation/tra-test-cases-fall-2026/`),
5655
+ * every one of which files this as the FIRST value under
5656
+ * `<Schedule Number="000">`, ahead of 000005001 — not documented as a
5657
+ * numbered row in the spec's own tabular MAPPINGS (it appears only in the
5658
+ * section's prose filing-exemption preamble), which is why the generated
5659
+ * `jacket.captions.ts` cannot discover it. Genuinely mandatory, no safe
5660
+ * default — "No" is `2`, not absence.
5661
+ */
5662
+ associatedWithCcpcs?: boolean;
5658
5663
  softwareCertCode: string;
5659
5664
  legalName: string;
5660
5665
  address: {
@@ -5719,10 +5724,6 @@ interface At1FilingData {
5719
5724
  position: string;
5720
5725
  };
5721
5726
  transmitter: At1TransmitterInfo;
5722
- /** 000003001 — income from active business carried on in Canada (federal). */
5723
- activeBusinessIncome?: number;
5724
- /** 000009001 — federal taxable income, less foreign tax credit adjustments. */
5725
- federalTaxableIncome?: number;
5726
5727
  /** 000047001 — gross revenue, per the financial statements. */
5727
5728
  grossRevenue?: number;
5728
5729
  /** 000048001 — total assets. Must equal federal GIFI 2599. */
@@ -5741,8 +5742,6 @@ interface At1FilingData {
5741
5742
  certificationTelephone?: string;
5742
5743
  /** 000105001 — the CIT authorized email address. */
5743
5744
  authorizedEmail?: string;
5744
- /** 000001001 — associated with one or more CCPCs? */
5745
- associatedWithCcpcs?: boolean;
5746
5745
  /** 000031001 — wind-up of a subsidiary under ITA s.88 during the year? */
5747
5746
  windUpOfSubsidiary?: boolean;
5748
5747
  /** 000032001 — first year of filing after an amalgamation? */
@@ -5826,6 +5825,12 @@ declare class At1MandatoryFieldMissingError extends Error {
5826
5825
  declare function assertAt1MandatoryComplete(d: At1FilingData): void;
5827
5826
  /** Refuse to render when any critical mandatory field is absent. */
5828
5827
  declare function assertCriticalFields(d: At1FilingData): void;
5828
+ type Fmt = 'text' | 'date' | 'amount' | 'factor';
5829
+ interface LineItem<T> {
5830
+ id: string;
5831
+ get: (d: T) => string | number | Date | undefined;
5832
+ fmt: Fmt;
5833
+ }
5829
5834
  /** XML text escaping (ISO-8859-1 payload; escape the five markup-significant chars). */
5830
5835
  declare function xmlEscape(s: string): string;
5831
5836
  /**
@@ -5932,7 +5937,7 @@ declare class RsiLineItemError extends Error {
5932
5937
  constructor(message: string);
5933
5938
  }
5934
5939
  /**
5935
- * Render one line item: `##` + nine digits + five spaces + value.
5940
+ * Render one line item: `##` + nine characters + five spaces + value.
5936
5941
  *
5937
5942
  * §3.2.1.5 — *"For a Line Item to be considered complete and therefore allowed to
5938
5943
  * be output to the AT1 RSI, it must contain both a Line Item ID and a Value"*. An
@@ -5969,6 +5974,37 @@ declare function renderAt1Rsi(header: Omit<RsiHeaderInput, 'pageNumber' | 'total
5969
5974
  totalPages?: number;
5970
5975
  }): string;
5971
5976
  //#endregion
5977
+ //#region src/t2/at1/filing/at1-rsi-adapter.d.ts
5978
+ /** Convert one declarative line-item table (jacket or EDI) into RSI line items. */
5979
+ declare function toRsiLineItems<T>(data: T, items: ReadonlyArray<LineItem<T>>): RsiLineItem[];
5980
+ /** Convert an already-assembled supporting-schedule payload (Net File shape) to RSI shape. */
5981
+ declare function toRsiSchedule(schedule: At1ScheduleData): RsiScheduleInput;
5982
+ /** The AT1 jacket (schedule `000`) and the EDI transmitter block (schedule `EDI`), RSI-formatted. */
5983
+ declare function toRsiJacketSchedules(data: At1FilingData): RsiScheduleInput[];
5984
+ /** The RSI header identity fields (everything but pagination) from the same filing data Net File uses. */
5985
+ declare function toRsiHeader(data: At1FilingData): {
5986
+ corporateAccountNumber: string;
5987
+ taxYearEnd: Date;
5988
+ legalName: string;
5989
+ };
5990
+ //#endregion
5991
+ //#region src/t2/at1/filing/at1-transmitter-validation.d.ts
5992
+ /** One rule TRA would have failed, and the code it would have failed with. */
5993
+ interface At1TransmitterDefect {
5994
+ /** The `At1TransmitterInfo` path — `contact.phone`, `address.postalCode`. */
5995
+ field: string;
5996
+ /** TRA's own error code for this rule. */
5997
+ traCode: string;
5998
+ message: string;
5999
+ }
6000
+ declare function validateAt1Transmitter(info: At1TransmitterInfo): At1TransmitterDefect[];
6001
+ declare class At1TransmitterInvalidError extends Error {
6002
+ readonly defects: At1TransmitterDefect[];
6003
+ constructor(defects: At1TransmitterDefect[]);
6004
+ }
6005
+ /** Throw unless every filer-detail rule TRA applies is satisfied. */
6006
+ declare function assertAt1TransmitterValid(info: At1TransmitterInfo): void;
6007
+ //#endregion
5972
6008
  //#region src/t2/at1/schedules/schedule12-reconciliation.d.ts
5973
6009
  /**
5974
6010
  * AT1 Schedule 12 — Alberta Income/Loss Reconciliation.
@@ -6102,6 +6138,17 @@ declare function albertaDispositionAdjustments(alberta: {
6102
6138
  * deduction lowers Alberta income, so it is a DEDUCTION.
6103
6139
  */
6104
6140
  declare function albertaReserveDifference(albertaNetEffect: number, federalNetEffect: number): Schedule12Adjustment;
6141
+ /**
6142
+ * A resource-deduction pool (AT1 Schedule 15 vs federal Schedule 12) as a
6143
+ * Schedule 12 adjustment — same direction convention as CCA/reserves above:
6144
+ * a LARGER Alberta claim is a DEDUCTION (Alberta income lower), a smaller
6145
+ * one is an ADDITION. Shared across the five reconciling pairs Schedule 12
6146
+ * lines 022/023 (Depletion), 026/027 (CEE), 028/029 (CDE), 030/031
6147
+ * (Foreign exploration/development), 032/033 (COGPE) all follow — the
6148
+ * labels/refs differ per pool, everything else is identical, so this one
6149
+ * function replaces five near-duplicate hand-written diffs.
6150
+ */
6151
+ declare function albertaResourceDeductionDifference(label: string, ref: string, albertaClaim: number, federalClaim: number): Schedule12Adjustment;
6105
6152
  /** Reconcile from a list of directional adjustments (zero/'none' ones are dropped). */
6106
6153
  declare function reconcileAlbertaNetIncome(federalNetIncomeForTax: number, adjustments: readonly Schedule12Adjustment[]): Schedule12Result;
6107
6154
  /**
@@ -6111,156 +6158,6 @@ declare function reconcileAlbertaNetIncome(federalNetIncomeForTax: number, adjus
6111
6158
  */
6112
6159
  declare function albertaCurrentYearLoss(result: Schedule12Result): number;
6113
6160
  //#endregion
6114
- //#region src/t2/at1/schedules/schedule14-cec.d.ts
6115
- /**
6116
- * Alberta AT1 Schedule 14 — Cumulative Eligible Capital Deduction.
6117
- *
6118
- * **Read this before using it.** Eligible capital property was REPEALED on
6119
- * 1 January 2017 and replaced by CCA class 14.1. The TRA keeps Schedule 14 only
6120
- * for tax years that **end on or after 1 January 2017 and include 31 December
6121
- * 2016** — the straddling year — for which the Schedule 14 Supplemental Worksheet
6122
- * must also be filed, separately from the Net File payload. For any wholly
6123
- * post-2016 tax year, class 14.1 on Schedule 8 / AT1 Schedule 13 replaces this
6124
- * schedule entirely and it must not be filed.
6125
- *
6126
- * It is implemented because prior-year returns and amendments are in scope, not
6127
- * because a current-year filing needs it. `appliesToTaxYear` states the rule.
6128
- *
6129
- * Same reconciliation shape as the other Alberta schedules: every figure defaults
6130
- * to the corresponding federal one (T2 Schedule 10, lines 010nnn), and the form is
6131
- * forbidden when the return declares no Alberta/federal divergence and required
6132
- * when the opening balance or the claim (014024 / 014040) differs from federal.
6133
- *
6134
- * Line map (TRA spec §3.2.3.15) and the specified arithmetic:
6135
- *
6136
- * 014002 CEC balance at the end of the preceding year ← fed 010220
6137
- * 014004 cost of eligible capital property acquired ← fed 010222
6138
- * 014006 transferred on amalgamation or wind-up ← fed 010224
6139
- * 014008 other adjustments (additions side) ← fed 010226
6140
- * 014011 non-taxable portion of a non-arm's-length
6141
- * transferor's gain, post-2002-12-20 ← fed 010228 × ½
6142
- * 014014 proceeds of sale, net of outlays ← fed 010242
6143
- * 014016 gross s.80(7) forgiven-debt reduction ← fed 010244
6144
- * 014018 other adjustments (deductions side) ← fed 010246
6145
- * 014023 CEC for property no longer owned after ceasing
6146
- * to carry on that business ← fed 010249
6147
- * 014024 current year deduction
6148
- * 014026 CEC closing balance
6149
- *
6150
- * A = ((014004 + 014008) × ¾) − 014011 floored at 0
6151
- * B = 014002 + A + 014006
6152
- * C = (014014 + 014016 + 014018) × ¾
6153
- * D = B − C floored at 0
6154
- *
6155
- * 014024 ≤ (D − 014023) × 7%, never negative
6156
- * 014026 = D − 014023 − 014024 when D is positive, otherwise nil
6157
- *
6158
- * The ¾ inclusion and the 7% declining rate are the old CEC regime's, not the
6159
- * federal 75%-of-income donation limit and not a CCA rate — they only look
6160
- * similar.
6161
- *
6162
- * When D is NEGATIVE the schedule's "Amount to be Included in Income Arising from
6163
- * Disposition" section must be completed instead, and the deduction section must
6164
- * not be; when D is non-negative that section must be left blank. Both directions
6165
- * are reported so a filer cannot complete the wrong half.
6166
- *
6167
- * Whole dollars, pure.
6168
- */
6169
- /** The ¾ inclusion rate of the repealed cumulative eligible capital regime. */
6170
- declare const CEC_INCLUSION_RATE = 0.75;
6171
- /** The 7% declining-balance rate of the repealed regime. */
6172
- declare const CEC_DEDUCTION_RATE = 0.07;
6173
- /**
6174
- * Figures for the "Amount to be Included in Income Arising from Disposition"
6175
- * section (014032-014048). Only completed when D is negative.
6176
- */
6177
- interface CecIncomeInclusionDetail {
6178
- /** 014032 — total CEC deductions claimed for years commencing before 1988-07-01. */
6179
- deductionsBeforeJuly1988?: number;
6180
- /** 014034 — negative CEC balances included in income before 1988-07-01 (positive). */
6181
- amountsIncludedBeforeJuly1988?: number;
6182
- /** 014042 — total CEC deductions for years beginning after 1988-06-30. */
6183
- deductionsAfterJune1988?: number;
6184
- /** 014044 — amounts that reduced CEC under ITA s.80(7), current and prior years. */
6185
- subsection807Reductions?: number;
6186
- /** 014047 — s.14(1)(b) income inclusions between 1988-06-30 and 2000-02-28. */
6187
- paragraph141bInclusions?: number;
6188
- /** 014048 — line 014056 from the preceding year's Schedule 14. */
6189
- priorYearLine056?: number;
6190
- }
6191
- interface AlbertaSchedule14Input {
6192
- /** 014002 — opening CEC balance. */
6193
- openingBalance?: number;
6194
- /** 014004 — cost of eligible capital property acquired in the year. */
6195
- acquisitions?: number;
6196
- /** 014006 — amount transferred on amalgamation or wind-up. */
6197
- transferredIn?: number;
6198
- /** 014008 — other adjustments on the additions side. */
6199
- otherAdditions?: number;
6200
- /** 014011 — non-taxable portion of a non-arm's-length transferor's gain. */
6201
- nonArmsLengthNonTaxablePortion?: number;
6202
- /** 014014 — proceeds of sale, net of outlays not otherwise deductible. */
6203
- proceedsOfSale?: number;
6204
- /** 014016 — gross reduction for a forgiven debt obligation, ITA s.80(7). */
6205
- forgivenDebtReduction?: number;
6206
- /** 014018 — other adjustments on the deductions side. */
6207
- otherDeductions?: number;
6208
- /** 014023 — CEC for property no longer owned after ceasing that business. */
6209
- cecForPropertyNoLongerOwned?: number;
6210
- /** 014024 — the amount actually claimed. Omit to claim the maximum. */
6211
- amountClaimed?: number;
6212
- /** The income-inclusion section, when D is negative. */
6213
- incomeInclusion?: CecIncomeInclusionDetail;
6214
- /** Tax year end, ISO `YYYY-MM-DD` — for the applicability check. */
6215
- taxYearEnd?: string;
6216
- /** Tax year start, ISO `YYYY-MM-DD` — for the applicability check. */
6217
- taxYearStart?: string;
6218
- /** 000060 — reporting different Alberta taxable income. */
6219
- reportsDifferentAlbertaIncome?: boolean;
6220
- /** 000061 — different discretionary amounts or opening balances. */
6221
- electsDifferentDiscretionaryAmounts?: boolean;
6222
- /** True when the Alberta opening balance or claim differs from federal. */
6223
- differsFromFederal?: boolean;
6224
- }
6225
- interface AlbertaSchedule14Result {
6226
- /** A = ((004 + 008) × ¾) − 011, floored at 0. */
6227
- a: number;
6228
- /** B = 002 + A + 006. */
6229
- b: number;
6230
- /** C = (014 + 016 + 018) × ¾. */
6231
- c: number;
6232
- /** D = B − C, floored at 0. */
6233
- d: number;
6234
- /** D before the floor — negative means the income-inclusion section applies. */
6235
- rawD: number;
6236
- /** 014024 — the deduction actually claimed. */
6237
- amountClaimed: number;
6238
- /** The most that could have been claimed: (D − 023) × 7%. */
6239
- maxDeduction: number;
6240
- /** 014026 — closing balance. */
6241
- closingBalance: number;
6242
- /**
6243
- * True when D is negative: the deduction section must be left blank and the
6244
- * income-inclusion section (014032-014048) completed instead.
6245
- */
6246
- incomeInclusionSectionApplies: boolean;
6247
- /** Whether the schedule applies to this tax year at all. */
6248
- appliesToTaxYear: boolean;
6249
- /** Whether the supplemental worksheet must be filed separately. */
6250
- supplementalWorksheetRequired: boolean;
6251
- formRequired: boolean;
6252
- formPermitted: boolean;
6253
- issues: string[];
6254
- }
6255
- /**
6256
- * Schedule 14 applies only to a tax year that ENDS on or after 2017-01-01 and
6257
- * INCLUDES 2016-12-31 — the year straddling the repeal of eligible capital
6258
- * property. A wholly pre-2017 year used the federal Schedule 10 regime as it then
6259
- * stood; a wholly post-2016 year uses class 14.1.
6260
- */
6261
- declare function cecScheduleAppliesToTaxYear(taxYearStart?: string, taxYearEnd?: string): boolean;
6262
- declare function computeAlbertaSchedule14(input: AlbertaSchedule14Input): AlbertaSchedule14Result;
6263
- //#endregion
6264
6161
  //#region src/t2/at1/schedules/schedule21-loss-continuity.d.ts
6265
6162
  interface LossScheduleInput {
6266
6163
  openingBalance: number;
@@ -6276,6 +6173,192 @@ interface LossScheduleResult {
6276
6173
  /** One loss pool end to end: Schedule 10 (carry-back) → Schedule 21 (continuity). */
6277
6174
  declare function computeLossSchedule(input: LossScheduleInput): LossScheduleResult;
6278
6175
  //#endregion
6176
+ //#region src/t2/filing/t2-schedule-line-items.d.ts
6177
+ /**
6178
+ * Federal T2 — the per-schedule, per-line breakdown of a computed return.
6179
+ *
6180
+ * Alberta has had this since the AT1 filing path was built
6181
+ * (`at1-schedule-line-items.ts`): every schedule's result turned into a flat
6182
+ * list of `{lineItemId, value}` pairs, persisted with the computed return, and
6183
+ * read back by the paper Form Views so a preparer sees the actual figure
6184
+ * against the actual line. Federal had nothing equivalent. Its computed return
6185
+ * carried only summary fields under symbolic names — `netIncomeForTax`,
6186
+ * `ccaClaimed` — which no form can be keyed by, so every federal paper view
6187
+ * rendered "not available" against every computed line of every schedule.
6188
+ *
6189
+ * ── The rule this file follows, and why it is strict ────────────────────────
6190
+ *
6191
+ * A value is emitted ONLY where the line it belongs on is recorded in code:
6192
+ * carried in the data (Schedule 1's own `Schedule1Line.line`), exported as a
6193
+ * named constant (`SCHEDULE_8_CCA_LINE`), or stated in the result type's own
6194
+ * doc comment. Nothing here is a line number typed from memory or inferred from
6195
+ * a caption that looks close.
6196
+ *
6197
+ * The reason is the failure this repository keeps hitting: a figure filed under
6198
+ * the wrong line is not a missing figure, it is a WRONG return, and it looks
6199
+ * completely correct on screen. Schedule 4's jacket references claimed lines 150
6200
+ * and 250 where the form prints 130 and 225; Schedule 33's own result type said
6201
+ * line 690 where the form has 790. Both were plausible, both were wrong, and
6202
+ * neither was caught by a type.
6203
+ *
6204
+ * So a schedule whose result has no recorded line mapping produces NO entry
6205
+ * rather than a guessed one, and the paper view keeps saying "not available"
6206
+ * for it. That is the honest state, and it is visibly incomplete, which is what
6207
+ * makes it safe to extend one verified line at a time.
6208
+ *
6209
+ * ── Identifier shape ────────────────────────────────────────────────────────
6210
+ *
6211
+ * Six characters: the three-digit CRA line, then a three-digit occurrence.
6212
+ * Alberta uses nine (`SSSFFFOOO`) because a TRA line item id names its schedule
6213
+ * too; a federal line number is already unique across the whole return, so the
6214
+ * schedule is carried once on the envelope instead of repeated on every row.
6215
+ * The trailing occurrence exists for the grid forms, where one line number
6216
+ * repeats down a column — Schedule 8 has one row per capital cost allowance
6217
+ * class, all of them line 217.
6218
+ */
6219
+ /** One filed value: the line item id and its figure. */
6220
+ interface T2ScheduleValue {
6221
+ lineItemId: string;
6222
+ value: string | number;
6223
+ }
6224
+ /** One schedule's filed values. `scheduleId` is the form id, e.g. `T2SCH1`. */
6225
+ interface T2ScheduleData {
6226
+ scheduleId: string;
6227
+ values: T2ScheduleValue[];
6228
+ }
6229
+ /** `LLLOOO` — three-digit CRA line, three-digit occurrence. Occurrence is 1-based. */
6230
+ declare function t2LineItemId(line: string, occurrence?: number): string;
6231
+ /**
6232
+ * Split a federal line item id back into its line and occurrence.
6233
+ *
6234
+ * Returns `undefined` for anything that is not six digits, so a caller handed
6235
+ * an Alberta nine-digit id (or a malformed one) drops it rather than reading
6236
+ * the first three characters as a line number and displaying a figure against
6237
+ * a line it does not belong to.
6238
+ */
6239
+ declare function parseT2LineItemId(lineItemId: string): {
6240
+ line: string;
6241
+ occurrence: number;
6242
+ } | undefined;
6243
+ /**
6244
+ * Schedule 1 — the only federal schedule that needs no line table here.
6245
+ *
6246
+ * `Schedule1Line` carries its own `line`, and has since the schedule was built,
6247
+ * precisely because "a reconciling item recorded only as a description with an
6248
+ * amount has nowhere to go on the wire". Reading it back out is the whole job.
6249
+ *
6250
+ * A line may legitimately repeat: the form provides open rows (135, 295, 395,
6251
+ * 495) for items it does not name, and a return can carry several. Those get
6252
+ * successive occurrences rather than being summed, so the paper view can show
6253
+ * each on its own row. A line with no number is skipped — `assertSchedule1Fileable`
6254
+ * is what refuses the return over it, not this.
6255
+ */
6256
+ declare function schedule1Values(r: {
6257
+ additions: readonly {
6258
+ line?: string;
6259
+ amount: number;
6260
+ }[];
6261
+ deductions: readonly {
6262
+ line?: string;
6263
+ amount: number;
6264
+ }[];
6265
+ totalAdditions: number;
6266
+ totalDeductions: number;
6267
+ }): T2ScheduleData;
6268
+ /** Schedule 2 — the donation claim. Only line 210 is a named constant. */
6269
+ declare function schedule2Values(r: {
6270
+ donationsClaimed: number;
6271
+ }): T2ScheduleData;
6272
+ /**
6273
+ * Schedule 7 — the adjusted aggregate investment income that grinds the
6274
+ * business limit. Line 745 is exported by the form module; the rest of Part 2's
6275
+ * working lines are not recorded anywhere, so they are not emitted.
6276
+ */
6277
+ declare function schedule7Values(r: {
6278
+ adjustedAggregateInvestmentIncome: number;
6279
+ }): T2ScheduleData;
6280
+ /**
6281
+ * Schedule 8 — capital cost allowance, one occurrence per class.
6282
+ *
6283
+ * Only the three lines the form module exports are emitted: recapture (213),
6284
+ * terminal loss (215) and the claim (217). The grid's other twenty columns are
6285
+ * either intermediate arithmetic the form shows without numbering, or columns
6286
+ * whose number this package has not recorded — see `SCHEDULE_8_COLUMNS`.
6287
+ */
6288
+ declare function schedule8Values(r: {
6289
+ classes: readonly {
6290
+ recapture: number;
6291
+ terminalLoss: number;
6292
+ ccaClaimed: number;
6293
+ }[];
6294
+ }): T2ScheduleData;
6295
+ /**
6296
+ * Schedule 21 — the two foreign tax credits.
6297
+ *
6298
+ * These land on different jacket lines (632 non-business, 636 business) and the
6299
+ * form module's own doc comment warns that swapping them "is not cosmetic".
6300
+ * Both come from named constants for exactly that reason.
6301
+ */
6302
+ declare function schedule21Values(r: {
6303
+ nonBusinessFtc: number;
6304
+ businessFtc: number;
6305
+ }): T2ScheduleData;
6306
+ /**
6307
+ * Schedule 33 — taxable capital.
6308
+ *
6309
+ * The four figures whose lines the result type states: capital (190), the
6310
+ * investment allowance (490), taxable capital (500) and taxable capital
6311
+ * employed in Canada (790, from the form module's constant — the result type's
6312
+ * comment used to say 690, which is not a line of this form).
6313
+ */
6314
+ declare function schedule33Values(r: {
6315
+ capital: number;
6316
+ investmentAllowance: number;
6317
+ taxableCapital: number;
6318
+ taxableCapitalEmployedInCanada: number;
6319
+ }): T2ScheduleData;
6320
+ /** Schedule 53 — the closing general rate income pool. */
6321
+ declare function schedule53Values(r: {
6322
+ closingGrip: number;
6323
+ }): T2ScheduleData;
6324
+ /**
6325
+ * Schedule 55 — Part III.1 tax.
6326
+ *
6327
+ * The result type states "20% of amount B (s.185.1(1)(a)) — line 190 / line
6328
+ * 290". Two lines for one figure because the form splits by corporation type:
6329
+ * Part 1 (line 190) for CCPCs and deposit insurance corporations, Part 2 (line
6330
+ * 290) for everyone else. Nothing in the result says which part applied, so the
6331
+ * base tax is emitted against BOTH and the paper view shows it under whichever
6332
+ * part the reader is looking at, rather than this file picking one and being
6333
+ * wrong for half of all filers.
6334
+ */
6335
+ declare function schedule55Values(r: {
6336
+ baseTax: number;
6337
+ }): T2ScheduleData;
6338
+ /** The subset of a federal result this file reads. Structural, so it cannot cycle. */
6339
+ interface FederalResultForPayloads {
6340
+ schedule1: Parameters<typeof schedule1Values>[0];
6341
+ netIncomeForTax: number;
6342
+ taxableIncome: number;
6343
+ totalFederalTax: number;
6344
+ donations?: Parameters<typeof schedule2Values>[0];
6345
+ adjustedAggregateInvestmentIncomeSchedule?: Parameters<typeof schedule7Values>[0];
6346
+ cca?: Parameters<typeof schedule8Values>[0];
6347
+ foreignTaxCredit?: Parameters<typeof schedule21Values>[0];
6348
+ taxableCapitalSchedule?: Parameters<typeof schedule33Values>[0];
6349
+ grip?: Parameters<typeof schedule53Values>[0];
6350
+ partIII1?: Parameters<typeof schedule55Values>[0];
6351
+ }
6352
+ /**
6353
+ * Every schedule's filed line items for one computed federal return.
6354
+ *
6355
+ * A schedule that was not computed is ABSENT, not present and empty — the same
6356
+ * rule Alberta's assembler follows. An empty schedule on a return says "this
6357
+ * schedule was completed and everything on it is nil", which is a different
6358
+ * statement from "this schedule does not apply", and only one of them is true.
6359
+ */
6360
+ declare function federalSchedulePayloads(r: FederalResultForPayloads): T2ScheduleData[];
6361
+ //#endregion
6279
6362
  //#region src/t2/rates/corporate-rates.d.ts
6280
6363
  /** The full federal rate/threshold table for one tax year. */
6281
6364
  interface CorpTaxRates {
@@ -6410,6 +6493,74 @@ interface SbdResult {
6410
6493
  sbdAmount: number;
6411
6494
  }
6412
6495
  declare function computeSBD(input: SbdInput, rates?: CorpTaxRates): SbdResult;
6496
+ interface AggregateInvestmentIncomeInput {
6497
+ /** 002 — eligible portion of taxable capital gains for the year. */
6498
+ taxableCapitalGains?: number;
6499
+ /** 012 — eligible portion of allowable capital losses (incl. ABILs). */
6500
+ allowableCapitalLosses?: number;
6501
+ /** 022 — net capital losses of previous years claimed (T2 jacket line 332). */
6502
+ netCapitalLossesClaimed?: number;
6503
+ /** 032 — total income from property (Canadian-source specified investment business). */
6504
+ incomeFromProperty?: number;
6505
+ /** 042 — exempt income. */
6506
+ exemptIncome?: number;
6507
+ /** 052 — amounts received from AgriInvest Fund No. 2. */
6508
+ agriInvestFundReceived?: number;
6509
+ /** 062 — taxable dividends deductible (s.113(1)(c) + Schedule 3 column F, net of related expenses). */
6510
+ taxableDividendsDeductible?: number;
6511
+ /** 072 — business income from a trust interest treated as property income (s.108(5)(a)). */
6512
+ trustPropertyIncome?: number;
6513
+ /** 082 — total losses from property (Canadian-source). */
6514
+ lossesFromProperty?: number;
6515
+ }
6516
+ interface AggregateInvestmentIncomeResult {
6517
+ /** Amount A — line 012 + line 022. */
6518
+ amountA: number;
6519
+ /** Amount B — line 002 minus amount A, floored at 0. */
6520
+ amountB: number;
6521
+ /** Amount C — lines 042 + 052 + 062 + 072. */
6522
+ amountC: number;
6523
+ /** Amount D — line 032 minus amount C. */
6524
+ amountD: number;
6525
+ /** Amount E — amount B plus amount D. */
6526
+ amountE: number;
6527
+ /** Line 092 — amount E minus line 082, floored at 0. Files as jacket line 440. */
6528
+ aggregateInvestmentIncome: number;
6529
+ }
6530
+ declare function computeAggregateInvestmentIncome(input: AggregateInvestmentIncomeInput): AggregateInvestmentIncomeResult;
6531
+ interface AdjustedAggregateInvestmentIncomeInput {
6532
+ /** 705 — eligible taxable capital gains, OTHER than from disposing an active asset. */
6533
+ taxableCapitalGains?: number;
6534
+ /** 710 — eligible allowable capital losses (incl. ABILs), OTHER than from disposing an active asset. */
6535
+ allowableCapitalLosses?: number;
6536
+ /** 715 — total income from property. */
6537
+ incomeFromProperty?: number;
6538
+ /** 720 — exempt income. */
6539
+ exemptIncome?: number;
6540
+ /** 725 — amounts received from AgriInvest Fund No. 2. */
6541
+ agriInvestFundReceived?: number;
6542
+ /** 730 — dividends from connected corporations. */
6543
+ dividendsFromConnectedCorporations?: number;
6544
+ /** 735 — business income from a trust interest treated as property income (s.108(5)(a)). */
6545
+ trustPropertyIncome?: number;
6546
+ /** 740 — total losses from property. */
6547
+ lossesFromProperty?: number;
6548
+ /** 741 — amount deducted under s.91(4) (FAPI) in computing income for the year. */
6549
+ subsection91_4Deduction?: number;
6550
+ }
6551
+ interface AdjustedAggregateInvestmentIncomeResult {
6552
+ /** Amount F — line 705 minus line 710, floored at 0. */
6553
+ amountF: number;
6554
+ /** Amount G — lines 720 + 725 + 730 + 735. */
6555
+ amountG: number;
6556
+ /** Amount H — line 715 minus amount G. */
6557
+ amountH: number;
6558
+ /** Amount I — amount F plus amount H. */
6559
+ amountI: number;
6560
+ /** Line 745 — amount I minus line 740, plus line 741, floored at 0. */
6561
+ adjustedAggregateInvestmentIncome: number;
6562
+ }
6563
+ declare function computeAdjustedAggregateInvestmentIncome(input: AdjustedAggregateInvestmentIncomeInput): AdjustedAggregateInvestmentIncomeResult;
6413
6564
  //#endregion
6414
6565
  //#region src/t2/jacket/part1-tax.d.ts
6415
6566
  interface PartITaxInput {
@@ -6533,35 +6684,376 @@ declare function dayWeightedRate(periodStart: Date | string | number, periodEnd:
6533
6684
  */
6534
6685
  declare function blendProvinceRateTable(baseTable: ProvinceRateTable, changes: ProvincialRateChanges, periodStart: Date | string | number, periodEnd: Date | string | number): ProvinceRateTable;
6535
6686
  //#endregion
6536
- //#region src/t2/schedules/eifel-excluded-entity.d.ts
6687
+ //#region src/t2/schedules/eifel-adjusted-taxable-income.d.ts
6537
6688
  /**
6538
- * EIFELexcessive interest and financing expenses limitation (s.18.2, 18.21).
6689
+ * ITA subsection 18.2(1) **adjusted taxable income**, the base the EIFEL
6690
+ * ceiling is computed on.
6539
6691
  *
6540
- * This module determines whether the regime APPLIES. It does not compute the
6541
- * limitation, and that is a deliberate scope decision, not an omission:
6692
+ * `eifel-limitation.ts` took this as a required input because deriving it
6693
+ * partially would produce a plausible figure from an incomplete definition. This
6694
+ * derives it, and is explicit about the components it does and does not cover.
6542
6695
  *
6543
- * · For the overwhelming majority of returns the regime does not apply at
6544
- * all, and establishing that is a complete and correct answer.
6545
- * · For the residual, refusing the return is correct. Computing a restricted
6546
- * amount from a fixed ratio and an adjusted-taxable-income definition we
6547
- * have not built would be worse than refusing — it would be confidently
6548
- * wrong.
6696
+ * ── What it is ──────────────────────────────────────────────────────────────
6549
6697
  *
6550
- * ── The excluded-entity test (s.18.2(1)) ─────────────────────────────────
6698
+ * An EBITDA-like measure, built from taxable income by adding back the things the
6699
+ * regime is measuring against and removing the things that would double-count.
6551
6700
  *
6552
- * Three exceptions. Any one of them takes the corporation outside the regime:
6701
+ * ATI = A + B C
6553
6702
  *
6554
- * 1. **Small CCPC** a CCPC throughout the year whose taxable capital
6555
- * employed in Canada, TOGETHER WITH associated corporations, is under
6556
- * $50 million. This covers essentially every owner-managed CCPC.
6557
- * 2. **De minimis** — group net interest and financing expenses of
6558
- * $1,000,000 or less.
6559
- * 3. **Domestic** — all or substantially all business carried on in Canada,
6560
- * subject to conditions. Asserted by the preparer; we cannot derive it.
6703
+ * A = D E the income base
6704
+ * B the ADD-BACKS
6705
+ * C the REDUCTIONS
6561
6706
  *
6562
- * Both limbs of test 1 are already in the engine: CCPC status is an existing
6563
- * input, and taxable capital comes from Schedule 33. So the common case
6564
- * resolves with no extra preparer input at all.
6707
+ * **The add-backs include the interest and financing expenses themselves.** That
6708
+ * is the point of the measure and the thing to hold on to: the ceiling is a
6709
+ * percentage of income computed *before* the very expenses being limited, so a
6710
+ * corporation cannot shrink its own ceiling by borrowing more.
6711
+ *
6712
+ * ── A — the income base (D − E) ─────────────────────────────────────────────
6713
+ *
6714
+ * **D** is taxable income for the year, determined **without regard to** s.18.2(2)
6715
+ * itself, paragraphs 12(1)(l.2) and 111(1)(a.1), and clause 95(2)(f.11)(ii)(D) —
6716
+ * a non-resident uses taxable income earned in Canada on the same basis. The
6717
+ * circularity is deliberate: the limitation cannot be an input to its own base.
6718
+ *
6719
+ * **E** subtracts the year's non-capital loss on the same basis, any amount
6720
+ * claimed under paragraph 111(1)(a) that did not actually reduce taxable income,
6721
+ * and a controlled-foreign-affiliate component (`T × U ÷ V`).
6722
+ *
6723
+ * ── B — the add-backs ───────────────────────────────────────────────────────
6724
+ *
6725
+ * (a) interest and financing expenses for the year
6726
+ * (b) capital cost allowance and resource deductions — paragraph 20(1)(a),
6727
+ * 59.1(a) and subsections 66(4), 66.1(2)/(3), 66.2(2), 66.21(4), 66.4(2),
6728
+ * 66.7(1)-(5)
6729
+ * (c) terminal losses — subsection 20(16)
6730
+ * (d) the taxpayer's share of a partnership's 20(1)(a) and 20(16) deductions
6731
+ * (e) the portion of a paragraph 111(1)(e) limited-partnership-loss claim
6732
+ * attributable to those amounts
6733
+ *
6734
+ * ── C — the reductions ──────────────────────────────────────────────────────
6735
+ *
6736
+ * (a) interest and financing revenues
6737
+ * (b) recapture — subsection 13(1)
6738
+ * (c) the taxpayer's share of a partnership's 13(1) inclusion
6739
+ * (d) resource inclusions — subsections 59(1), 59(3.2), paragraph 59.1(b)
6740
+ * (e) for a corporation, a grossed-up foreign tax credit amount:
6741
+ * **100/28** of what would be deductible under s.126(1), and
6742
+ * the s.126(2) amounts times the relevant factor
6743
+ *
6744
+ * ── Not modelled ────────────────────────────────────────────────────────────
6745
+ *
6746
+ * The trust variant of C(e), and the later paragraphs of B and C dealing with
6747
+ * foreign affiliate income and exempt interest. Each is available as an explicit
6748
+ * `otherAdditions` / `otherReductions` input rather than silently omitted, so a
6749
+ * preparer with one of those amounts can still arrive at the right figure and the
6750
+ * engine does not pretend the definition is shorter than it is.
6751
+ *
6752
+ * Source: `research/sources/legislation/ITA-section-18.2-EIFEL.txt`.
6753
+ *
6754
+ * Pure, whole dollars.
6755
+ */
6756
+ /** C(e)(i) — s.126(1) amounts are grossed up by 100/28. */
6757
+ declare const FOREIGN_TAX_CREDIT_GROSS_UP: number;
6758
+ interface AdjustedTaxableIncomeInput {
6759
+ /**
6760
+ * D — taxable income for the year, determined **without regard to** s.18.2(2),
6761
+ * paragraphs 12(1)(l.2) and 111(1)(a.1), and clause 95(2)(f.11)(ii)(D). For a
6762
+ * non-resident, taxable income earned in Canada on the same basis.
6763
+ *
6764
+ * Signed: a loss year gives a negative figure and the definition permits it.
6765
+ */
6766
+ taxableIncome: number;
6767
+ /** E(a) — the non-capital loss for the year, on the same determinations. */
6768
+ nonCapitalLossForYear?: number;
6769
+ /**
6770
+ * E(a.1) — an amount claimed under paragraph 111(1)(a) **to the extent it did
6771
+ * not reduce** taxable income as determined for D.
6772
+ */
6773
+ lossClaimNotReducingTaxableIncome?: number;
6774
+ /** E(b) — the controlled foreign affiliate component, `T × U ÷ V`. */
6775
+ foreignAccrualPropertyLossComponent?: number;
6776
+ /** B(a) — interest and financing expenses for the year. */
6777
+ interestAndFinancingExpenses?: number;
6778
+ /** B(b) — capital cost allowance, paragraph 20(1)(a). */
6779
+ capitalCostAllowance?: number;
6780
+ /** B(b) — resource deductions under s.59.1(a) and the s.66 series. */
6781
+ resourceDeductions?: number;
6782
+ /** B(c) — terminal losses, subsection 20(16). */
6783
+ terminalLoss?: number;
6784
+ /** B(d) — the taxpayer's share of a partnership's 20(1)(a) / 20(16) deductions. */
6785
+ partnershipCapitalAndTerminalShare?: number;
6786
+ /** B(e) — the attributable portion of a paragraph 111(1)(e) claim. */
6787
+ limitedPartnershipLossPortion?: number;
6788
+ /**
6789
+ * The amount deducted under paragraph 110(1)(k) in computing taxable income —
6790
+ * Schedule 130 Part 2F **line 088**, one of the later B paragraphs this
6791
+ * module's doc comment describes. Named rather than folded into
6792
+ * `otherAdditions` because the engine derives it directly from Schedule 43
6793
+ * (`part-vi-1-deduction.ts`), and a figure the engine computes should be
6794
+ * auditable against its own form line rather than buried in an "other".
6795
+ */
6796
+ partVI1TaxDeduction?: number;
6797
+ /**
6798
+ * Schedule 130 Part 2F **line 089** — the portion of a paragraph 111(1)(a)
6799
+ * loss claim that is derived from IFE (Part 2E amount A). Named for the same
6800
+ * reason as `partVI1TaxDeduction`: `eifel-ife.ts` computes it.
6801
+ */
6802
+ lossPortionDerivedFromIfe?: number;
6803
+ /**
6804
+ * Schedule 130 Part 2F **line 092** — the corporation's loss from activities
6805
+ * funded by a borrowing that produces exempt IFE (Part 1B amount C).
6806
+ */
6807
+ exemptIfeActivityLoss?: number;
6808
+ /** Any further B paragraph this module does not model. */
6809
+ otherAdditions?: number;
6810
+ /** C(a) — interest and financing revenues for the year. */
6811
+ interestAndFinancingRevenues?: number;
6812
+ /** C(b) — recapture included under subsection 13(1). */
6813
+ recapture?: number;
6814
+ /** C(c) — the taxpayer's share of a partnership's 13(1) inclusion. */
6815
+ partnershipRecaptureShare?: number;
6816
+ /** C(d) — inclusions under s.59(1), 59(3.2) or paragraph 59.1(b). */
6817
+ resourceInclusions?: number;
6818
+ /** C(e)(i) — amounts deductible under s.126(1). Grossed up by 100/28 here. */
6819
+ section126_1ForeignTaxCredits?: number;
6820
+ /** C(e)(ii) — amounts deductible under s.126(2), already at the relevant factor. */
6821
+ section126_2GrossedUp?: number;
6822
+ /**
6823
+ * Schedule 130 Part 2F **line 104** — the corporation's income from
6824
+ * activities funded by a borrowing that produces exempt IFE (Part 1B amount
6825
+ * B). The mirror of `exemptIfeActivityLoss` on the reduction side.
6826
+ */
6827
+ exemptIfeActivityIncome?: number;
6828
+ /** Any further C paragraph this module does not model. */
6829
+ otherReductions?: number;
6830
+ }
6831
+ interface AdjustedTaxableIncomeResult {
6832
+ /** A — the income base, D − E. Signed. */
6833
+ incomeBase: number;
6834
+ /** B — total add-backs. */
6835
+ totalAdditions: number;
6836
+ /** C — total reductions. */
6837
+ totalReductions: number;
6838
+ /** A + B − C. **Signed** — the definition permits a negative result. */
6839
+ adjustedTaxableIncome: number;
6840
+ issues: string[];
6841
+ }
6842
+ declare function computeAdjustedTaxableIncome(input: AdjustedTaxableIncomeInput): AdjustedTaxableIncomeResult;
6843
+ //#endregion
6844
+ //#region src/t2/schedules/eifel-capacity.d.ts
6845
+ /**
6846
+ * ITA subsection 18.2(1) — the EIFEL **excess-capacity regime**: excess
6847
+ * capacity, absorbed capacity, cumulative unused excess capacity (CUEC), the
6848
+ * restricted interest and financing expenses (RIFE) deductible under paragraph
6849
+ * 111(1)(a.1), and the RIFE that arises under subsection 111(8).
6850
+ *
6851
+ * The two modules either side of this one were already built and this one was
6852
+ * the gap between them:
6853
+ *
6854
+ * `eifel-adjusted-taxable-income.ts` ATI — Schedule 130 Part 2F
6855
+ * **this module** capacity — Parts 1A, 2G, 2H, 2I, 2J, 2O
6856
+ * `eifel-limitation.ts` the denial — Parts 2K, 2L
6857
+ *
6858
+ * Verified line by line against `research/sources/cra-forms/pdf/T2SCH130-eifel.pdf`
6859
+ * (T2 SCH 130 E, pages 1 and 10-14), rendered with `pdftotext -layout` and read
6860
+ * part by part. Every amount below names the form line it reconstructs.
6861
+ *
6862
+ * ── Why this matters beyond the federal return ───────────────────────────────
6863
+ *
6864
+ * Two of its outputs are the ONLY source for figures other forms ask for by
6865
+ * name, and both were previously typed in by hand because nothing computed
6866
+ * them:
6867
+ *
6868
+ * Part 2G amount F → Schedule 130 line 129 → **AT1 Schedule 21 line 320**
6869
+ * Part 1A amount A → Schedule 130 line 130 → **AT1 Schedule 21 line 330**
6870
+ * Part 2O amount A → **Schedule 4 line 710** → AT1 Schedule 21 line 230
6871
+ *
6872
+ * ── The ordering, which looks circular and is not ───────────────────────────
6873
+ *
6874
+ * The form's cross-references form a strict topological order, not a cycle:
6875
+ *
6876
+ * 2G amount F needs ATI, IFE, IFR (nothing downstream)
6877
+ * 2J amounts A, B need F and received capacity
6878
+ * 2G line 115 needs 2J amount B → excess capacity for the year
6879
+ * 2I amounts A, B need line 115
6880
+ * 2H amount D needs 2I amount B → absorbed capacity
6881
+ * 2I amount C needs 2H amount D → CUEC
6882
+ *
6883
+ * So F is computed BEFORE anything that depends on it, and each later step only
6884
+ * ever reads an earlier one. `computeEifelCapacity` runs them in exactly that
6885
+ * sequence.
6886
+ *
6887
+ * ── The one trap: line 111 reaches around section 257 ───────────────────────
6888
+ *
6889
+ * Line 106 (ATI) is floored at nil — "if negative, enter 0" — and lines 107 and
6890
+ * 119 read that floored figure. Line 111 does **not**: it asks for "the absolute
6891
+ * value of ATI" where "in the absence of section 257, the ATI is a negative
6892
+ * amount". Section 257 is the Act's own no-negative-amounts rule, and the form
6893
+ * deliberately reaches around it here. This module therefore takes the
6894
+ * **signed** ATI and derives both readings, rather than taking the floored one
6895
+ * and losing the information line 111 needs.
6896
+ *
6897
+ * Pure, whole dollars.
6898
+ */
6899
+ /** Part 1A — one eligible group entity the corporation received capacity from. */
6900
+ interface ReceivedCapacityRow {
6901
+ /** Column 1 — name of the eligible group entity. */
6902
+ entityName?: string;
6903
+ /** Column 2 — that entity's account number. */
6904
+ accountNumber?: string;
6905
+ /** Column 3 — that entity's tax year end, ISO `YYYY-MM-DD`. */
6906
+ taxYearEnd?: string;
6907
+ /** 005, column 4 — the amount of capacity received. */
6908
+ amount: number;
6909
+ }
6910
+ /**
6911
+ * Part 2I — one preceding year's excess-capacity vintage. The form provides
6912
+ * exactly three rows (the third, second and first immediately preceding years),
6913
+ * matching the three-year life of unused excess capacity.
6914
+ */
6915
+ interface ExcessCapacityVintage {
6916
+ /** 1 = the first immediately preceding year, 2 = second, 3 = third. */
6917
+ yearsAgo: number;
6918
+ /** 122, column 1 — that year's excess capacity. */
6919
+ excessCapacity: number;
6920
+ /** 123, column 2 — amounts previously transferred under subsection 18.2(4). */
6921
+ previouslyTransferred?: number;
6922
+ /** 124, column 3 — amounts previously absorbed under subsection 18.2(2). */
6923
+ previouslyAbsorbed?: number;
6924
+ }
6925
+ interface EifelCapacityInput {
6926
+ /**
6927
+ * Line 106 from Part 2F — adjusted taxable income, **signed**. Pass
6928
+ * `computeAdjustedTaxableIncome`'s own signed result: lines 107/119 floor it
6929
+ * at nil themselves, and line 111 needs the negative value this would lose.
6930
+ */
6931
+ adjustedTaxableIncome: number;
6932
+ /** Line 045 from Part 2A — the corporation's IFE for the year. */
6933
+ interestAndFinancingExpenses: number;
6934
+ /** Line 072 from Part 2D — the corporation's IFR for the year. */
6935
+ interestAndFinancingRevenues?: number;
6936
+ /** Lines 108/112/120 — the ratio of permissible expenses for the year. */
6937
+ ratioOfPermissibleExpenses: number;
6938
+ /**
6939
+ * Whether a group ratio election under subsection 18.21(2) was made. Part 2G
6940
+ * opens with "If a group ratio election under subsection 18.21(2) has been
6941
+ * made, the excess capacity is nil" — so this suppresses the whole of 2G.
6942
+ */
6943
+ hasGroupRatioElection?: boolean;
6944
+ /** Line 118 — the allocated group ratio amount, where the election was made. */
6945
+ groupRatioAmount?: number;
6946
+ /** Part 1A — the received-capacity table. Its column-4 total is line 130. */
6947
+ receivedCapacity?: readonly ReceivedCapacityRow[];
6948
+ /** Line 128 — RIFE from previous tax years. */
6949
+ rifeFromPreviousYears?: number;
6950
+ /** Part 2I's table — the three preceding years' excess-capacity vintages. */
6951
+ priorYearExcessCapacity?: readonly ExcessCapacityVintage[];
6952
+ /** Line 159 — excess IFE under subsection 18.2(2) (amount B from Part 2L). */
6953
+ excessInterestAndFinancingExpenses?: number;
6954
+ /** Line 160 — partnership IFE add-back under paragraph 12(1)(l.2) (Part 2N). */
6955
+ partnershipIfeAddBack?: number;
6956
+ /** Line 161 — the amount under subclause 95(2)(f.11)(ii)(D)(I) (Part 2M). */
6957
+ clause95FapiAmountI?: number;
6958
+ /** Line 162 — the amount under subclause 95(2)(f.11)(ii)(D)(II) (Part 2M). */
6959
+ clause95FapiAmountII?: number;
6960
+ }
6961
+ interface EifelCapacityResult {
6962
+ /** Amount A — total received capacity. Schedule 130 **line 130**. */
6963
+ receivedCapacity: number;
6964
+ /** Amount A — line 107 × line 108. */
6965
+ permittedAmount: number;
6966
+ /** Line 110 — the amount by which IFR exceeds IFE, floored at nil. */
6967
+ revenueOverExpense: number;
6968
+ /** Line 111 — the absolute value of a negative ATI, otherwise nil. */
6969
+ negativeAtiAbsolute: number;
6970
+ /** Amount B — the lesser of lines 110 and 111. */
6971
+ negativeAtiOffset: number;
6972
+ /** Amount C — amount B × line 112. */
6973
+ negativeAtiOffsetAtRatio: number;
6974
+ /** Amount D — line 109 minus amount C, floored at nil. */
6975
+ revenueCapacity: number;
6976
+ /** Amount E — amount A plus amount D. */
6977
+ totalCapacityBeforeExpenses: number;
6978
+ /**
6979
+ * Amount F — amount E minus line 113, floored at nil. Schedule 130
6980
+ * **line 129**, and the figure AT1 Schedule 21 line 320 asks for by name.
6981
+ */
6982
+ excessCapacityBeforeRife: number;
6983
+ /** Line 115 — excess capacity for the current year (amount F minus line 114). */
6984
+ excessCapacityForYear: number;
6985
+ /** Amount A — line 129 plus line 130. */
6986
+ rifeCapacityAvailable: number;
6987
+ /** Amount B — RIFE deductible under paragraph 111(1)(a.1): lesser of 128 and A. */
6988
+ rifeDeductible: number;
6989
+ /** Amount A — the total of column 4 across the three preceding years. */
6990
+ priorYearUnusedCapacity: number;
6991
+ /** Amount B — CUEC determined as if the year's absorbed capacity were nil. */
6992
+ cumulativeUnusedExcessCapacityBeforeAbsorption: number;
6993
+ /** Amount C — cumulative unused excess capacity. */
6994
+ cumulativeUnusedExcessCapacity: number;
6995
+ /** Amount D — absorbed capacity for the year. */
6996
+ absorbedCapacity: number;
6997
+ /**
6998
+ * Line 136 minus line 137 — received capacity in excess of what was deducted
6999
+ * under paragraph 111(1)(a.1). This is variable **D** of subsection 18.2(2),
7000
+ * which `computeEifelLimitation` takes as `excessReceivedCapacity`.
7001
+ */
7002
+ excessReceivedCapacity: number;
7003
+ /**
7004
+ * Amount A — RIFE for the tax year, the total of lines 159 to 162. The form
7005
+ * directs this to **Schedule 4** (line 710), which AT1 Schedule 21 line 230
7006
+ * then carries in.
7007
+ */
7008
+ rifeForYear: number;
7009
+ issues: string[];
7010
+ }
7011
+ /**
7012
+ * Part 2O on its own — the total of lines 159 to 162.
7013
+ *
7014
+ * Exported separately because of the order the form imposes: line 159 is the
7015
+ * denial from Part 2L, which cannot be computed until Parts 2G-2J have supplied
7016
+ * `excessReceivedCapacity` and `absorbedCapacity` to Part 2K. A caller running
7017
+ * the whole chain therefore computes capacity, then the limitation, then calls
7018
+ * this — rather than computing capacity twice.
7019
+ */
7020
+ declare function computeRifeUnderSubsection111_8(input: {
7021
+ /** Line 159 — excess IFE under subsection 18.2(2) (amount B from Part 2L). */excessInterestAndFinancingExpenses?: number; /** Line 160 — partnership IFE add-back under paragraph 12(1)(l.2). */
7022
+ partnershipIfeAddBack?: number; /** Line 161 — subclause 95(2)(f.11)(ii)(D)(I). */
7023
+ clause95FapiAmountI?: number; /** Line 162 — subclause 95(2)(f.11)(ii)(D)(II). */
7024
+ clause95FapiAmountII?: number;
7025
+ }): number;
7026
+ declare function computeEifelCapacity(input: EifelCapacityInput): EifelCapacityResult;
7027
+ //#endregion
7028
+ //#region src/t2/schedules/eifel-excluded-entity.d.ts
7029
+ /**
7030
+ * EIFEL — excessive interest and financing expenses limitation (s.18.2, 18.21).
7031
+ *
7032
+ * This module determines whether the regime APPLIES. It does not compute the
7033
+ * limitation, and that is a deliberate scope decision, not an omission:
7034
+ *
7035
+ * · For the overwhelming majority of returns the regime does not apply at
7036
+ * all, and establishing that is a complete and correct answer.
7037
+ * · For the residual, refusing the return is correct. Computing a restricted
7038
+ * amount from a fixed ratio and an adjusted-taxable-income definition we
7039
+ * have not built would be worse than refusing — it would be confidently
7040
+ * wrong.
7041
+ *
7042
+ * ── The excluded-entity test (s.18.2(1)) ─────────────────────────────────
7043
+ *
7044
+ * Three exceptions. Any one of them takes the corporation outside the regime:
7045
+ *
7046
+ * 1. **Small CCPC** — a CCPC throughout the year whose taxable capital
7047
+ * employed in Canada, TOGETHER WITH associated corporations, is under
7048
+ * $50 million. This covers essentially every owner-managed CCPC.
7049
+ * 2. **De minimis** — group net interest and financing expenses of
7050
+ * $1,000,000 or less.
7051
+ * 3. **Domestic** — all or substantially all business carried on in Canada,
7052
+ * subject to conditions. Asserted by the preparer; we cannot derive it.
7053
+ *
7054
+ * Both limbs of test 1 are already in the engine: CCPC status is an existing
7055
+ * input, and taxable capital comes from Schedule 33. So the common case
7056
+ * resolves with no extra preparer input at all.
6565
7057
  *
6566
7058
  * ── Applicability ────────────────────────────────────────────────────────
6567
7059
  *
@@ -6605,7 +7097,13 @@ interface EifelResult {
6605
7097
  exemption: EifelExemption;
6606
7098
  /**
6607
7099
  * True when the regime applies and the limitation is therefore required.
6608
- * The engine does not compute it, so this must block filing.
7100
+ *
7101
+ * `computeFederalT2` computes it — `eifelAdjustedTaxableIncome`,
7102
+ * `eifelCapacity` and `eifelLimitation` on its result — and applies the
7103
+ * denial to Schedule 1 and taxable income. This stays true anyway, because
7104
+ * the computation runs on preparer-supplied figures and several parts of
7105
+ * Schedule 130 are not modelled; `issues` says which. It marks a return for
7106
+ * review, not an uncomputed one.
6609
7107
  */
6610
7108
  requiresLimitation: boolean;
6611
7109
  /** Blocking explanations for the review layer. */
@@ -6619,71 +7117,619 @@ interface EifelThresholds {
6619
7117
  }
6620
7118
  declare function assessEifel(input: EifelInput, thresholds: EifelThresholds): EifelResult;
6621
7119
  //#endregion
6622
- //#region src/t2/schedules/schedule1.d.ts
7120
+ //#region src/t2/schedules/eifel-ife.d.ts
6623
7121
  /**
6624
- * T2 Schedule 1 — Net income (loss) for income tax purposes.
7122
+ * ITA subsection 18.2(1)**interest and financing expenses** (IFE) and
7123
+ * **interest and financing revenues** (IFR), and the supporting parts that
7124
+ * build them.
6625
7125
  *
6626
- * The book→tax reconciliation, and the spine of the return: start from net
6627
- * income per the financial statements, ADD back amounts that are not deductible
6628
- * for tax (book amortization, 50% of meals, the income-tax provision, reserves,
6629
- * …) and DEDUCT tax-specific amounts (CCA from Schedule 8, tax reserves, …). The
6630
- * result flows to the T2 jacket and, for Alberta, into AT1 Schedule 12.
7126
+ * This is the last of the four EIFEL modules, and the one that stops the
7127
+ * regime asking a preparer to hand-total a figure the return already holds:
6631
7128
  *
6632
- * net income for tax = book net income + Σ additions − Σ deductions
7129
+ * `eifel-adjusted-taxable-income.ts` ATI — Part 2F
7130
+ * `eifel-capacity.ts` capacity — Parts 1A, 2G-2J, 2O
7131
+ * `eifel-limitation.ts` the denial — Parts 2K, 2L
7132
+ * **this module** IFE and IFR — Parts 1B-1E, 2A-2E, 2M
6633
7133
  *
6634
- * Pure, integer whole dollars (GIFI convention). The named builders below cover
6635
- * the most commonly-missed reconciling items and make the Sch-8 Sch-1 linkage
6636
- * explicit.
7134
+ * Verified against `research/sources/cra-forms/pdf/T2SCH130-eifel.pdf`
7135
+ * (T2 SCH 130 E, pages 1-8 and 13), rendered with `pdftotext -layout`. Every
7136
+ * amount names the form line it reconstructs.
7137
+ *
7138
+ * ── Why the sub-parts exist at all ──────────────────────────────────────────
7139
+ *
7140
+ * IFE is not "the interest the corporation paid". It reaches into three places
7141
+ * where interest has already been capitalised into something else and pulls it
7142
+ * back out — the capital cost of depreciable property (Part 2B), resource
7143
+ * expense pools (Part 2C), and a partnership's own IFE (Part 1E) — then nets
7144
+ * off the amounts that reduce the cost of funding (variable B). A preparer
7145
+ * totalling "interest expense" from the income statement would miss all three.
7146
+ *
7147
+ * ── The one ordering constraint ─────────────────────────────────────────────
7148
+ *
7149
+ * Part 2M's first table needs amount G from Part 2K — the proportion denied —
7150
+ * so it cannot run until the limitation has. `computeClause95Amounts` therefore
7151
+ * takes that proportion as an argument, the same way Part 2O takes the denial.
7152
+ * Everything else here runs before the limitation, because the limitation is
7153
+ * computed FROM it.
7154
+ *
7155
+ * Whole dollars, pure.
6637
7156
  */
6638
- interface Schedule1Line {
6639
- /**
6640
- * The CRA line number — `'104'` for book amortization, `'403'` for CCA.
6641
- *
6642
- * This is the transmission key, not decoration: every value on a filed return
6643
- * goes to CRA keyed by line number, and a reconciling item recorded only as a
6644
- * description with an amount has **nowhere to go on the wire**. Optional here
6645
- * because the form itself provides open rows (`'135'`, `'295'`, `'395'`,
6646
- * `'495'`) for items it does not name, and because a preparer mid-entry has an
6647
- * amount before they have chosen a line — but a return cannot be filed while
6648
- * any line is missing, and `assertSchedule1Fileable` is what says so.
6649
- */
6650
- line?: string;
7157
+ /** Part 1C/1D column 1 — who the other party to the financing is. */
7158
+ type EifelCounterpartyRelationship = 'canadian-arm-length' | 'canadian-non-arm-length' | 'non-resident-arm-length' | 'non-resident-non-arm-length';
7159
+ /**
7160
+ * One public-sector agreement whose borrowing produces exempt IFE. Exempt IFE
7161
+ * is left OUT of the IFE total entirely (see variable A's own opening words),
7162
+ * but the income and losses of the activities it funded still adjust ATI.
7163
+ */
7164
+ interface ExemptIfeRow {
7165
+ /** 007 the public sector authority the agreement is with. */
7166
+ authorityName?: string;
7167
+ /** 008 principal amount of the borrowing entered into under the agreement. */
7168
+ principalAmount?: number;
7169
+ /** 009, column 3 — IFE incurred on that amount. */
7170
+ ifeIncurred?: number;
7171
+ /** 010, column 4 — corporation income from the activities it funded. */
7172
+ incomeFromFundedActivities?: number;
7173
+ /** 011, column 5 — corporation loss from those activities, as a positive amount. */
7174
+ lossFromFundedActivities?: number;
7175
+ }
7176
+ interface ExemptIfeResult {
7177
+ /** Amount A — total of column 3. */
7178
+ totalExemptIfe: number;
7179
+ /** Amount B — total of column 4. Part 2F **line 104** (an ATI reduction). */
7180
+ incomeFromExemptActivities: number;
7181
+ /** Amount C — total of column 5. Part 2F **line 092** (an ATI addition). */
7182
+ lossFromExemptActivities: number;
7183
+ }
7184
+ declare function computeExemptIfe(rows: readonly ExemptIfeRow[]): ExemptIfeResult;
7185
+ interface BorrowingRow {
7186
+ relationship?: EifelCounterpartyRelationship;
7187
+ /** 012 — total principal of borrowings at any point in the year. */
7188
+ principalAmount?: number;
7189
+ /** 013 — total notional of derivatives entered in respect of them. */
7190
+ derivativeNotional?: number;
7191
+ /** 014, column 4 — paragraph (a) of variable A. Part 2A **line 027**. */
7192
+ interestPaidOrPayable?: number;
7193
+ /** 015, column 5 — paragraph (e) of variable A. Part 2A **line 033**. */
7194
+ fundingCostAmounts?: number;
7195
+ /** 016, column 6 — paragraph (a) of variable B. Part 2A **line 042**. */
7196
+ costReducingAmounts?: number;
7197
+ }
7198
+ interface BorrowingsResult {
7199
+ /** Amount A → line 027. */
7200
+ interestPaidOrPayable: number;
7201
+ /** Amount B → line 033. */
7202
+ fundingCostAmounts: number;
7203
+ /** Amount C → line 042. */
7204
+ costReducingAmounts: number;
7205
+ }
7206
+ declare function computeBorrowings(rows: readonly BorrowingRow[]): BorrowingsResult;
7207
+ interface LoanRow {
7208
+ relationship?: EifelCounterpartyRelationship;
7209
+ /** 017 — total principal of loans at any point in the year. */
7210
+ principalAmount?: number;
7211
+ /** 018 — total notional of derivatives entered in respect of them. */
7212
+ derivativeNotional?: number;
7213
+ /** 019, column 4 — paragraph (d) of variable A of IFR. Part 2D **line 061**. */
7214
+ returnAmounts?: number;
7215
+ /** 020, column 5 — paragraph (a) of variable B of IFR. Part 2D **line 066**. */
7216
+ returnReducingAmounts?: number;
7217
+ }
7218
+ interface LoansResult {
7219
+ /** Amount A → line 061. */
7220
+ returnAmounts: number;
7221
+ /** Amount B → line 066. */
7222
+ returnReducingAmounts: number;
7223
+ }
7224
+ declare function computeLoans(rows: readonly LoanRow[]): LoansResult;
7225
+ interface PartnershipIfeRow {
7226
+ /** 021 — the partnership's name. */
7227
+ partnershipName?: string;
7228
+ /** 022 — its account number; blank where the partnership is non-resident. */
7229
+ accountNumber?: string;
7230
+ /** 023, column 3 — the corporation's share of variable A of the partnership's IFE. */
7231
+ shareOfPartnershipIfe?: number;
7232
+ /** 024, column 4 — the portion of column 3 to which paragraph 12(1)(l.1) applies. */
7233
+ portionUnderParagraph12_1_l1?: number;
7234
+ /** 025, column 5 — the portion not deductible because of subsection 96(2.1). */
7235
+ portionDeniedBySubsection96_2_1?: number;
7236
+ }
7237
+ interface PartnershipIfeResult {
7238
+ rows: {
7239
+ partnershipName?: string;
7240
+ includedAmount: number;
7241
+ }[];
6651
7242
  /**
6652
- * The caption. Where `line` names a line the form itself captions, this is
6653
- * ignored on output in favour of the official wording — see
6654
- * `T2_SCHEDULE_1`. It carries the preparer's own description only on the
6655
- * open rows.
6656
- */
6657
- label: string;
6658
- amount: number;
6659
- /** ITA section or working-paper reference, for the cited workpaper. */
6660
- ref?: string;
7243
+ * Amount A total of column 6. Feeds THREE places: Part 2A **line 039**,
7244
+ * Part 2L **line 142** (where it is removed again from the denial base) and
7245
+ * Part 2N **line 156** (the 12(1)(l.2) add-back).
7246
+ */
7247
+ totalIncluded: number;
7248
+ }
7249
+ declare function computePartnershipIfe(rows: readonly PartnershipIfeRow[]): PartnershipIfeResult;
7250
+ interface CapitalizedIfeRow {
7251
+ /** 046 — the CCA class the capitalized interest sits in. */
7252
+ ccaClass?: string;
7253
+ /** 047, column 2 — IFE in the UCC at the beginning of the year. */
7254
+ ifeInOpeningUcc?: number;
7255
+ /** 048, column 3 — IFE in acquisitions, adjustments, transfers and proceeds. */
7256
+ ifeInAcquisitionsAndDispositions?: number;
7257
+ /** 050, column 5 — IFE in the terminal loss (note 2 on the form). */
7258
+ ifeInTerminalLoss?: number;
7259
+ /** 051, column 6 — IFE in the CCA claimed. Capped at column 4. */
7260
+ ifeInCca?: number;
7261
+ }
7262
+ interface CapitalizedIfeResult {
7263
+ rows: {
7264
+ ccaClass?: string;
7265
+ ifeInUcc: number;
7266
+ ifeInCca: number;
7267
+ closingIfeInUcc: number;
7268
+ }[];
7269
+ /** Amount A — total of column 5. Part 2A **line 032** (terminal loss). */
7270
+ totalIfeInTerminalLoss: number;
7271
+ /** Amount B — total of column 6. Part 2A **line 030** (CCA). */
7272
+ totalIfeInCca: number;
7273
+ issues: string[];
6661
7274
  }
6662
- interface Schedule1Input {
6663
- /** Net income (loss) per the financial statements (book). */
6664
- bookNetIncome: number;
6665
- /** Amounts ADDED to book income (non-deductible expenses, book amortization, …). */
6666
- additions?: readonly Schedule1Line[];
6667
- /** Amounts DEDUCTED from book income (CCA, tax-specific deductions). */
6668
- deductions?: readonly Schedule1Line[];
7275
+ declare function computeCapitalizedIfe(rows: readonly CapitalizedIfeRow[]): CapitalizedIfeResult;
7276
+ /** The ten pools Part 2C lists, in the form's own row order. */
7277
+ type ResourceIfePool = 'ccee-regular' | 'ccee-successor' | 'ccde-regular' | 'ccde-successor' | 'ccogpe-regular' | 'ccogpe-successor' | 'fede-regular' | 'fede-successor' | 'cfre-regular' | 'cfre-successor';
7278
+ interface ResourceIfeRow {
7279
+ pool: ResourceIfePool;
7280
+ /** 053, column 2 IFE in the opening balance. */
7281
+ ifeInOpeningBalance?: number;
7282
+ /** 054, column 3 — IFE added to or deducted from the pool during the year. */
7283
+ ifeAddedOrDeducted?: number;
7284
+ /** 056, column 5 — IFE in the current-year claim. Capped at column 4. */
7285
+ ifeInCurrentYearClaim?: number;
7286
+ }
7287
+ interface ResourceIfeResult {
7288
+ rows: {
7289
+ pool: ResourceIfePool;
7290
+ ifeAvailable: number;
7291
+ ifeClaimed: number;
7292
+ closing: number;
7293
+ }[];
7294
+ /** Amount A — total of column 5. Part 2A **line 031**. */
7295
+ totalIfeInResourceClaims: number;
7296
+ issues: string[];
6669
7297
  }
6670
- interface Schedule1Result {
6671
- bookNetIncome: number;
6672
- additions: Schedule1Line[];
6673
- deductions: Schedule1Line[];
6674
- totalAdditions: number;
6675
- totalDeductions: number;
6676
- /** Net income (loss) for income tax purposes — feeds the jacket / AT1 Sch 12. */
6677
- netIncomeForTax: number;
7298
+ declare function computeResourceIfe(rows: readonly ResourceIfeRow[]): ResourceIfeResult;
7299
+ interface InterestAndFinancingExpensesInput {
7300
+ /** 027 — interest paid or payable on a borrowing (Part 1C amount A). */
7301
+ interestOnBorrowings?: number;
7302
+ /** 028 — interest paid or payable, other. */
7303
+ otherInterest?: number;
7304
+ /** 029 amounts deductible under the subsection 20(1)(e) series. */
7305
+ subsection20_1_eAmounts?: number;
7306
+ /** 030 — IFE claimed as CCA (Part 2B amount B). */
7307
+ ifeInCca?: number;
7308
+ /** 031 — IFE claimed as resource expenses (Part 2C amount A). */
7309
+ ifeInResourceExpenses?: number;
7310
+ /** 032 — IFE claimed as a terminal loss (Part 2B amount A). */
7311
+ ifeInTerminalLoss?: number;
7312
+ /** 033 — funding-cost amounts deductible in the year (Part 1C amount B). */
7313
+ fundingCostAmounts?: number;
7314
+ /** 034 — a loss deductible in the year under such an arrangement. */
7315
+ fundingCostLoss?: number;
7316
+ /** 035 — a capital loss reducing paragraph 3(b) or taxable income. */
7317
+ fundingCostCapitalLoss?: number;
7318
+ /** 036 — an expense or fee giving rise to an amount included in IFE. */
7319
+ feeGivingRiseToIfe?: number;
7320
+ /** 037 — an expense or fee giving rise to an amount reducing IFE. */
7321
+ feeReducingIfe?: number;
7322
+ /** 038 — a lease financing amount. */
7323
+ leaseFinancingAmount?: number;
7324
+ /** 039 — the corporation's share of a partnership's IFE (Part 1E amount A). */
7325
+ partnershipShare?: number;
7326
+ /** 040 — a denied 111(1)(e) claim from a preceding year attributable to IFE. */
7327
+ reinstatedPartnershipLoss?: number;
7328
+ /**
7329
+ * 041 — a controlled foreign affiliate's relevant affiliate interest and
7330
+ * financing expenses (RAIFE), to the extent of the specified participating
7331
+ * percentage. Also Part 2L **line 143**, where it is removed again.
7332
+ */
7333
+ affiliateRaife?: number;
7334
+ /** 042 — amounts received or receivable (Part 1C amount C). */
7335
+ costReducingAmounts?: number;
7336
+ /** 043 — a gain included in income. */
7337
+ costReducingGain?: number;
7338
+ /** 044 — the corporation's share of such an amount in a partnership. */
7339
+ costReducingPartnershipShare?: number;
7340
+ }
7341
+ interface InterestAndFinancingExpensesResult {
7342
+ /**
7343
+ * Amount A — the total of lines 027 to 041. Part 2K **line 139** and Part 2L
7344
+ * **line 141**: the denial is a proportion OF THIS, not of the net figure.
7345
+ */
7346
+ variableA: number;
7347
+ /** Amount B — the total of lines 042 to 044. */
7348
+ variableB: number;
7349
+ /** 045 — total IFE, amount A minus amount B, floored at nil. */
7350
+ totalIfe: number;
7351
+ }
7352
+ declare function computeInterestAndFinancingExpenses(input: InterestAndFinancingExpensesInput): InterestAndFinancingExpensesResult;
7353
+ interface InterestAndFinancingRevenuesInput {
7354
+ /** 058 — interest received or receivable. */
7355
+ interestReceived?: number;
7356
+ /** 059 — amounts included under subsection 12(9) or section 17.1. */
7357
+ subsection12_9Amounts?: number;
7358
+ /** 060 — a guarantee or credit-support fee included in income. */
7359
+ guaranteeFees?: number;
7360
+ /** 061 — amounts received under a financing arrangement (Part 1D amount A). */
7361
+ returnAmounts?: number;
7362
+ /** 062 — a gain included in income. */
7363
+ returnGain?: number;
7364
+ /** 063 — a lease financing amount included in income. */
7365
+ leaseFinancingAmount?: number;
7366
+ /** 064 — the corporation's share of a partnership's IFR. */
7367
+ partnershipShare?: number;
7368
+ /** 065 — a controlled foreign affiliate's relevant affiliate IFR. */
7369
+ affiliateRaifr?: number;
7370
+ /** 066 — amounts paid or payable under the arrangement (Part 1D amount B). */
7371
+ returnReducingAmounts?: number;
7372
+ /** 067 — a deductible loss. */
7373
+ returnReducingLoss?: number;
7374
+ /** 068 — a capital loss reducing the paragraph 3(b) amount. */
7375
+ returnReducingCapitalLoss?: number;
7376
+ /** 069 — the corporation's share of such an amount in a partnership. */
7377
+ returnReducingPartnershipShare?: number;
7378
+ /** 070 — IFR sheltered from Canadian tax by a foreign tax credit or deduction. */
7379
+ shelteredByForeignTaxRelief?: number;
7380
+ /** 071 — amounts in variable A that are exempt from Part I tax. */
7381
+ exemptFromPartITax?: number;
7382
+ }
7383
+ interface InterestAndFinancingRevenuesResult {
7384
+ /** Amount A — the total of lines 058 to 065. */
7385
+ variableA: number;
7386
+ /** Amount B — the total of lines 066 to 071. */
7387
+ variableB: number;
7388
+ /** 072 — total IFR, amount A minus amount B, floored at nil. */
7389
+ totalIfr: number;
7390
+ }
7391
+ declare function computeInterestAndFinancingRevenues(input: InterestAndFinancingRevenuesInput): InterestAndFinancingRevenuesResult;
7392
+ /**
7393
+ * The portion of a non-capital loss claimed under paragraph 111(1)(a) that is
7394
+ * attributable to IFE, which is added back to ATI. Per-vintage, because each
7395
+ * loss year carries its own IFE proportion.
7396
+ */
7397
+ interface LossPortionFromIfeRow {
7398
+ /** 073, column 1 — the tax year the non-capital loss arose in. */
7399
+ taxYearOfOrigin?: string;
7400
+ /** 074, column 2 — the non-capital loss, variable J(i). */
7401
+ nonCapitalLoss: number;
7402
+ /** 075, column 3 — the amount determined under (ii) of variable J. */
7403
+ variableJSecondAmount?: number;
7404
+ /** 077, column 5 — the amount actually deducted under paragraph 111(1)(a). */
7405
+ amountDeducted?: number;
7406
+ }
7407
+ interface LossPortionFromIfeResult {
7408
+ rows: {
7409
+ taxYearOfOrigin?: string;
7410
+ variableJ: number;
7411
+ attributableToIfe: number;
7412
+ }[];
7413
+ /** Amount A — total of column 6. Part 2F **line 089**. */
7414
+ totalAttributableToIfe: number;
7415
+ issues: string[];
6678
7416
  }
6679
- declare function computeSchedule1(input: Schedule1Input): Schedule1Result;
6680
- /** Line 104 — book amortization is not deductible for tax (then deduct CCA at 403). */
6681
- declare function amortizationAddBack(bookAmortization: number): Schedule1Line;
7417
+ declare function computeLossPortionFromIfe(rows: readonly LossPortionFromIfeRow[]): LossPortionFromIfeResult;
6682
7418
  /**
6683
- * Line 121 50% of meals and entertainment is non-deductible (ITA s.67.1).
6684
- * Pass the FULL expense; the halving happens here.
6685
- */
6686
- declare function mealsAndEntertainmentAddBack(totalMeals: number): Schedule1Line;
7419
+ * The amount actually denied, and the amount actually added back on Schedule 1
7420
+ * line 251.
7421
+ *
7422
+ * This is NOT simply "the shortfall". Part 2K computes a **proportion** (amount
7423
+ * G) and Part 2L applies it to a base that deliberately excludes two things
7424
+ * already counted elsewhere:
7425
+ *
7426
+ * 141 variable A of IFE
7427
+ * 142 less the partnership share (Part 1E amount A) — denied instead through
7428
+ * the paragraph 12(1)(l.2) add-back in Part 2N
7429
+ * 143 less a CFA's relevant affiliate IFE — denied instead through
7430
+ * clause 95(2)(f.11)(ii)(D) in Part 2M
7431
+ *
7432
+ * With neither of those present the base is variable A and the result equals
7433
+ * the raw shortfall, which is why a simple corporation sees no difference. With
7434
+ * either present, using the shortfall directly double-counts the denial.
7435
+ */
7436
+ declare function computeExcessIfe(input: {
7437
+ /** 141 — variable A of IFE (Part 2A amount A). */variableAOfIfe: number; /** 142 — the partnership share (Part 1E amount A). */
7438
+ partnershipShare?: number; /** 143 — a CFA's relevant affiliate IFE (Part 2A line 041). */
7439
+ affiliateRaife?: number; /** Amount G from Part 2K — the proportion denied. */
7440
+ deniedProportion: number;
7441
+ }): {
7442
+ base: number;
7443
+ excessIfe: number;
7444
+ };
7445
+ /**
7446
+ * Part 2N line 158 — the partnership IFE add-back under paragraph 12(1)(l.2):
7447
+ * the Part 1E total (line 156) at the Part 2K proportion (line 157). Feeds
7448
+ * Schedule 1 **line 252** and Part 2O **line 160**.
7449
+ */
7450
+ declare function computePartnershipIfeAddBack(partnershipShare: number, deniedProportion: number): number;
7451
+ interface Clause95DeniedRow {
7452
+ /** 144 — the controlled foreign affiliate's name. */
7453
+ affiliateName?: string;
7454
+ /** 145, column 2 — variable A of the definition of IFE for the affiliate. */
7455
+ variableAForAffiliate: number;
7456
+ /**
7457
+ * 148, column 5 — the corporation's specified participating percentage for
7458
+ * the affiliate's tax year, as a FRACTION (0.4, not 40).
7459
+ */
7460
+ specifiedParticipatingPercentage?: number;
7461
+ }
7462
+ interface Clause95IncludedRow {
7463
+ /** 151 — the affiliate that is a member of the partnership. */
7464
+ affiliateName?: string;
7465
+ /** 152, column 2 — the amount under subclause 95(2)(f.11)(ii)(D)(II) in the CFA's FAPI. */
7466
+ amountInAffiliateFapi: number;
7467
+ /** 153, column 3 — specified participating percentage, as a FRACTION. */
7468
+ specifiedParticipatingPercentage?: number;
7469
+ }
7470
+ interface Clause95Result {
7471
+ /** 150 — total of the first table's column 6. Part 2O **line 161**. */
7472
+ deniedUnderSubclauseI: number;
7473
+ /** 155 — total of the second table's column 4. Part 2O **line 162**. */
7474
+ includedUnderSubclauseII: number;
7475
+ }
7476
+ /**
7477
+ * @param deniedProportion Amount G from Part 2K — the proportion of each
7478
+ * expense denied under subsection 18.2(2). This is why Part 2M runs after the
7479
+ * limitation rather than before it.
7480
+ */
7481
+ declare function computeClause95Amounts(denied: readonly Clause95DeniedRow[], included: readonly Clause95IncludedRow[], deniedProportion: number): Clause95Result;
7482
+ //#endregion
7483
+ //#region src/t2/schedules/eifel-limitation.d.ts
7484
+ /**
7485
+ * ITA subsection 18.2(2) — the excessive interest and financing expenses
7486
+ * limitation itself.
7487
+ *
7488
+ * `eifel-excluded-entity.ts` decides **whether** the regime applies. This decides
7489
+ * **how much** it denies, which was previously left unbuilt on the grounds that
7490
+ * computing it from an unbuilt definition would be confidently wrong.
7491
+ *
7492
+ * ── The provision ───────────────────────────────────────────────────────────
7493
+ *
7494
+ * s.18.2(2) denies a *proportion* of each interest and financing expense:
7495
+ *
7496
+ * (A − (B + C + D + E)) ÷ F
7497
+ *
7498
+ * A the taxpayer's interest and financing expenses for the year
7499
+ * B the group-ratio amount under s.18.21(2) where that applies, otherwise
7500
+ * **G × H** — the ratio of permissible expenses times adjusted taxable income
7501
+ * C the taxpayer's interest and financing revenues for the year
7502
+ * D received capacity, to the extent it exceeds the amount deductible under
7503
+ * paragraph 111(1)(a.1)
7504
+ * E absorbed capacity
7505
+ * F ordinarily the same figure as A
7506
+ *
7507
+ * Because F is A in the ordinary case, the *amount* denied is simply
7508
+ *
7509
+ * denied = A − (B + C + D + E), floored at nil
7510
+ *
7511
+ * which is the form this module computes, while still reporting the proportion —
7512
+ * the statute denies a fraction of *each* expense, and a preparer allocating the
7513
+ * denial across expense lines needs the fraction rather than the total.
7514
+ *
7515
+ * ── The ratio of permissible expenses ───────────────────────────────────────
7516
+ *
7517
+ * Keyed off when the taxation year **BEGINS**, not when it ends:
7518
+ *
7519
+ * begins on or after 2023-10-01 and before 2024-01-01 → **40%**
7520
+ * begins on or after 2024-01-01 → **30%**
7521
+ *
7522
+ * The 40% band is transitional and narrow — one quarter — and it does **not**
7523
+ * apply when determining cumulative unused excess capacity for a year beginning
7524
+ * on or after 1 January 2024. That carve-out is not modelled; excess-capacity
7525
+ * carry-forward is a separate mechanism this module does not compute.
7526
+ *
7527
+ * ── What this module does NOT compute ───────────────────────────────────────
7528
+ *
7529
+ * **Adjusted taxable income** is an input to THIS module, not a derivation — it
7530
+ * is a build-up from taxable income through a dozen add-backs and reductions,
7531
+ * and deriving it partially here would produce a plausible number from an
7532
+ * incomplete definition. It is therefore **required**, and an absent one denies
7533
+ * nothing while saying so. `eifel-adjusted-taxable-income.ts` derives it
7534
+ * (Schedule 130 Part 2F), and `computeFederalT2` feeds that result in.
7535
+ *
7536
+ * Likewise the received and absorbed capacity amounts, which come from the
7537
+ * excess-capacity regime — `eifel-capacity.ts` computes those (Parts 1A and
7538
+ * 2G-2J), and the engine threads them in as `excessReceivedCapacity` (Part 2K
7539
+ * amount C) and `absorbedCapacity` (Part 2H amount D). The group-ratio election
7540
+ * under s.18.21 remains a preparer assertion.
7541
+ *
7542
+ * Source: `research/sources/legislation/ITA-section-18.2-EIFEL.txt`.
7543
+ *
7544
+ * Pure, whole dollars.
7545
+ */
7546
+ /** The ratio bands, keyed off the taxation year START. */
7547
+ declare const EIFEL_TRANSITIONAL_RATIO = 0.4;
7548
+ declare const EIFEL_STANDARD_RATIO = 0.3;
7549
+ /** The regime's first day — years beginning before this are outside it. */
7550
+ declare const EIFEL_FIRST_YEAR_START = "2023-10-01";
7551
+ /** The transitional 40% band ends when years beginning in 2024 start. */
7552
+ declare const EIFEL_STANDARD_RATIO_FROM = "2024-01-01";
7553
+ interface EifelLimitationInput {
7554
+ /** A — interest and financing expenses for the year. */
7555
+ interestAndFinancingExpenses: number;
7556
+ /**
7557
+ * H — adjusted taxable income. **Required**: the definition is a large build-up
7558
+ * this module does not derive, and an absent one denies nothing rather than
7559
+ * being assumed.
7560
+ */
7561
+ adjustedTaxableIncome?: number;
7562
+ /** C — interest and financing revenues for the year. */
7563
+ interestAndFinancingRevenues?: number;
7564
+ /**
7565
+ * D — received capacity in excess of the amount deducted under paragraph
7566
+ * 111(1)(a.1).
7567
+ */
7568
+ excessReceivedCapacity?: number;
7569
+ /** E — absorbed capacity for the year. */
7570
+ absorbedCapacity?: number;
7571
+ /**
7572
+ * B — the group ratio amount under s.18.21(2), where the election was made.
7573
+ * Supplying it REPLACES the ratio × adjusted taxable income computation, as the
7574
+ * provision directs.
7575
+ */
7576
+ groupRatioAmount?: number;
7577
+ /** Taxation year start, ISO `YYYY-MM-DD` — selects the ratio band. */
7578
+ taxYearStart: string;
7579
+ }
7580
+ interface EifelLimitationResult {
7581
+ /** G — the ratio of permissible expenses that applied. */
7582
+ ratioOfPermissibleExpenses: number;
7583
+ /** B — the permitted amount, however it was arrived at. */
7584
+ permittedAmount: number;
7585
+ /** Whether B came from the group ratio election rather than ratio × income. */
7586
+ usedGroupRatio: boolean;
7587
+ /** B + C + D + E — everything that shelters the expenses. */
7588
+ totalShelter: number;
7589
+ /** The amount denied, floored at nil. */
7590
+ deniedAmount: number;
7591
+ /**
7592
+ * The proportion of EACH expense that is denied. The statute denies a fraction
7593
+ * of every interest and financing expense, so a preparer allocating the denial
7594
+ * across expense lines needs this, not just the total.
7595
+ */
7596
+ deniedProportion: number;
7597
+ /** Interest and financing expenses that remain deductible. */
7598
+ deductibleAmount: number;
7599
+ issues: string[];
7600
+ }
7601
+ /**
7602
+ * The ratio of permissible expenses for a year beginning on `taxYearStart`.
7603
+ * Returns 0 for a year beginning before the regime applies at all.
7604
+ */
7605
+ declare function ratioOfPermissibleExpenses(taxYearStart: string): number;
7606
+ declare function computeEifelLimitation(input: EifelLimitationInput): EifelLimitationResult;
7607
+ //#endregion
7608
+ //#region src/t2/schedules/part-vi-1-deduction.d.ts
7609
+ /**
7610
+ * ITA paragraph 110(1)(k) — the deduction against taxable income for Part VI.1 tax.
7611
+ *
7612
+ * Part VI.1 taxes dividends paid on taxable preferred shares (s.191.1(1)), and
7613
+ * paragraph 110(1)(k) gives it back as a deduction in computing taxable income —
7614
+ * a multiple of the tax, not the tax itself. Omitting it overstates taxable income
7615
+ * by several times the Part VI.1 tax, which is why Schedule 43 has been returning
7616
+ * `deductionPending` rather than a figure.
7617
+ *
7618
+ * The provision, verbatim:
7619
+ *
7620
+ * > the amount determined by multiplying the taxpayer's tax payable under
7621
+ * > subsection 191.1(1) for the year by
7622
+ * > (i) if the taxation year ends before 2010, 3,
7623
+ * > (ii) if the taxation year ends after 2009 and before 2012, 3.2, and
7624
+ * > (iii) if the taxation year ends after 2011, 3.5.
7625
+ *
7626
+ * Two things worth pinning down, because both are easy to get wrong:
7627
+ *
7628
+ * • The multiple keys off the taxation year **END**, not its beginning, and not
7629
+ * the date the dividend was paid.
7630
+ * • The bands are not a rate change applied prospectively — a year ending in
7631
+ * 2011 uses 3.2 for the whole year.
7632
+ *
7633
+ * The multiple has stood at 3.5 since 2012. It is modelled as a band table
7634
+ * anyway, because prior-year returns and amendments are in scope and a hard-coded
7635
+ * 3.5 silently misstates a 2010 amendment by 15%.
7636
+ *
7637
+ * Source: `research/sources/legislation/ITA-section-110-deductions.txt`.
7638
+ *
7639
+ * Pure, whole dollars.
7640
+ */
7641
+ /** The s.110(1)(k) multiple, by taxation year end. Ascending. */
7642
+ interface PartVI1DeductionBand {
7643
+ /** The multiple applies to a year ending on or after this date. */
7644
+ readonly from: string;
7645
+ readonly multiple: number;
7646
+ }
7647
+ declare const PART_VI_1_DEDUCTION_BANDS: readonly PartVI1DeductionBand[];
7648
+ interface PartVI1DeductionResult {
7649
+ /** The Part VI.1 tax the deduction is computed on. */
7650
+ partVI1Tax: number;
7651
+ /** The statutory multiple that applied. */
7652
+ multiple: number;
7653
+ /** The paragraph 110(1)(k) deduction against taxable income. */
7654
+ deduction: number;
7655
+ issues: string[];
7656
+ }
7657
+ /** The multiple in force for a taxation year ending on `taxYearEnd`. */
7658
+ declare function partVI1DeductionMultiple(taxYearEnd: string, bands?: readonly PartVI1DeductionBand[]): number;
7659
+ /**
7660
+ * The paragraph 110(1)(k) deduction.
7661
+ *
7662
+ * An unreadable year end yields nil and says so, rather than defaulting to the
7663
+ * current multiple — guessing the year would misstate taxable income, and this
7664
+ * deduction is large relative to the tax it follows.
7665
+ */
7666
+ declare function computePartVI1Deduction(partVI1Tax: number, taxYearEnd: string, bands?: readonly PartVI1DeductionBand[]): PartVI1DeductionResult;
7667
+ //#endregion
7668
+ //#region src/t2/schedules/schedule1.d.ts
7669
+ /**
7670
+ * T2 Schedule 1 — Net income (loss) for income tax purposes.
7671
+ *
7672
+ * The book→tax reconciliation, and the spine of the return: start from net
7673
+ * income per the financial statements, ADD back amounts that are not deductible
7674
+ * for tax (book amortization, 50% of meals, the income-tax provision, reserves,
7675
+ * …) and DEDUCT tax-specific amounts (CCA from Schedule 8, tax reserves, …). The
7676
+ * result flows to the T2 jacket and, for Alberta, into AT1 Schedule 12.
7677
+ *
7678
+ * net income for tax = book net income + Σ additions − Σ deductions
7679
+ *
7680
+ * Pure, integer whole dollars (GIFI convention). The named builders below cover
7681
+ * the most commonly-missed reconciling items and make the Sch-8 → Sch-1 linkage
7682
+ * explicit.
7683
+ */
7684
+ interface Schedule1Line {
7685
+ /**
7686
+ * The CRA line number — `'104'` for book amortization, `'403'` for CCA.
7687
+ *
7688
+ * This is the transmission key, not decoration: every value on a filed return
7689
+ * goes to CRA keyed by line number, and a reconciling item recorded only as a
7690
+ * description with an amount has **nowhere to go on the wire**. Optional here
7691
+ * because the form itself provides open rows (`'135'`, `'295'`, `'395'`,
7692
+ * `'495'`) for items it does not name, and because a preparer mid-entry has an
7693
+ * amount before they have chosen a line — but a return cannot be filed while
7694
+ * any line is missing, and `assertSchedule1Fileable` is what says so.
7695
+ */
7696
+ line?: string;
7697
+ /**
7698
+ * The caption. Where `line` names a line the form itself captions, this is
7699
+ * ignored on output in favour of the official wording — see
7700
+ * `T2_SCHEDULE_1`. It carries the preparer's own description only on the
7701
+ * open rows.
7702
+ */
7703
+ label: string;
7704
+ amount: number;
7705
+ /** ITA section or working-paper reference, for the cited workpaper. */
7706
+ ref?: string;
7707
+ }
7708
+ interface Schedule1Input {
7709
+ /** Net income (loss) per the financial statements (book). */
7710
+ bookNetIncome: number;
7711
+ /** Amounts ADDED to book income (non-deductible expenses, book amortization, …). */
7712
+ additions?: readonly Schedule1Line[];
7713
+ /** Amounts DEDUCTED from book income (CCA, tax-specific deductions). */
7714
+ deductions?: readonly Schedule1Line[];
7715
+ }
7716
+ interface Schedule1Result {
7717
+ bookNetIncome: number;
7718
+ additions: Schedule1Line[];
7719
+ deductions: Schedule1Line[];
7720
+ totalAdditions: number;
7721
+ totalDeductions: number;
7722
+ /** Net income (loss) for income tax purposes — feeds the jacket / AT1 Sch 12. */
7723
+ netIncomeForTax: number;
7724
+ }
7725
+ declare function computeSchedule1(input: Schedule1Input): Schedule1Result;
7726
+ /** Line 104 — book amortization is not deductible for tax (then deduct CCA at 403). */
7727
+ declare function amortizationAddBack(bookAmortization: number): Schedule1Line;
7728
+ /**
7729
+ * Line 121 — 50% of meals and entertainment is non-deductible (ITA s.67.1).
7730
+ * Pass the FULL expense; the halving happens here.
7731
+ */
7732
+ declare function mealsAndEntertainmentAddBack(totalMeals: number): Schedule1Line;
6687
7733
  /** Line 101 — the current income tax provision per the books is not deductible. */
6688
7734
  declare function incomeTaxProvisionAddBack(provision: number): Schedule1Line;
6689
7735
  /** Line 102 — the deferred provision, a separate line from the current one. */
@@ -7010,6 +8056,341 @@ interface Schedule6Result {
7010
8056
  }
7011
8057
  declare function computeSchedule6(dispositions: readonly CapitalDisposition[], inclusionRate: number): Schedule6Result;
7012
8058
  //#endregion
8059
+ //#region src/t2/schedules/schedule12-resource-deductions.d.ts
8060
+ /**
8061
+ * T2 Schedule 12 — Resource-Related Deductions (2025 and later tax years).
8062
+ *
8063
+ * Federal T2 had ZERO tracking for any of this before this module — the
8064
+ * Alberta side (AT1 Schedule 15, `t2/at1/schedules/schedule15-resource-related-deductions.ts`)
8065
+ * has been fully built and wired for a while, computing an Alberta figure to
8066
+ * diff against a federal figure that was always silently 0. This module
8067
+ * closes that gap on the federal side.
8068
+ *
8069
+ * Source: `research/sources/cra-forms/pdf/T2SCH12-resource-related-deductions.pdf`
8070
+ * (T2 SCH 12 E (26), downloaded 2026-09-03 — canada.ca was unreachable
8071
+ * earlier in this project; re-verified reachable on this date), rendered
8072
+ * page-by-page and read directly, not run through `pdftotext` (this form is
8073
+ * a grid, the same class of layout `pdftotext -layout` has misaligned
8074
+ * elsewhere in this codebase — rendering avoided that risk from the start).
8075
+ *
8076
+ * ── Five claim totals, one per Schedule 1 line ──────────────────────────────
8077
+ *
8078
+ * Part 1+2+3 Depletion (EDA regular/successor + CMEDB) → line 344
8079
+ * Part 4 Cumulative Canadian exploration expenses → line 341
8080
+ * Part 5 Cumulative Canadian development expenses → line 340
8081
+ * Part 6 Cumulative Canadian oil & gas property exp. → line 342
8082
+ * Part 7+8+9 Foreign exploration/development + resource → line 345
8083
+ *
8084
+ * ── What this module deliberately does NOT model ────────────────────────────
8085
+ *
8086
+ * The real form's full continuity has columns this module has no input for:
8087
+ * amalgamation/wind-up transfers, transfers to/from a successor corporation,
8088
+ * flow-through share renunciations, the look-back rule (s.66(12.66)), and
8089
+ * CEE↔CDE reclassification (ss.66.1(9)/66.7(9)). These are real provisions,
8090
+ * genuinely rare for a typical filer, and each one entered as a bare "other
8091
+ * additions/deductions" figure risks silently misclassifying something the
8092
+ * form treats specially (e.g. a flow-through renunciation has its own
8093
+ * unique interaction with the pool). Each pool below accepts a plain
8094
+ * `otherAdditions`/`otherDeductions` catch-all instead and says so in its
8095
+ * own doc comment — an honest scope limit, not a silent gap. Successor
8096
+ * pools ARE modelled (the form structurally requires the split), but with
8097
+ * the same collapsed catch-all shape as the regular pools.
8098
+ *
8099
+ * ACDE (Accelerated Canadian development expenses, generally incurred
8100
+ * after November 20, 2018 and before 2025) is NOT modelled as a separate
8101
+ * input: this schedule version is titled "2025 and later tax years", so a
8102
+ * CURRENT-year expense entered here is, for the ordinary case, always
8103
+ * RCDE-eligible rather than ACDE-eligible (RCDE covers 2024-2034,
8104
+ * overlapping the day this schedule starts applying). The narrow exception
8105
+ * — a tax year straddling the 2024/2025 boundary with genuine pre-2025
8106
+ * current-year CDE/COGPE additions — is not separately split out; treating
8107
+ * 100% of current-year CDE/COGPE additions as RCDE-eligible is the correct
8108
+ * default for the mainline case this schedule version targets, not a guess.
8109
+ * Same logic for ACOGPE/RCOGPE (Part 6).
8110
+ *
8111
+ * The CCOGPE↔CDE cross-linkage (a negative CCOGPE subtotal routes to EITHER
8112
+ * CDE line 105/133 depending on an s.66.7(4)(a)(iii) designation this
8113
+ * engine has no source for) is the SAME ambiguity the AT1 module already
8114
+ * flags unresolved for its own mirror of this rule — this module raises the
8115
+ * identical class of `issues` entry rather than guessing a designation
8116
+ * status it cannot know.
8117
+ *
8118
+ * Whole dollars, pure functions, no I/O.
8119
+ */
8120
+ interface DepletionInput {
8121
+ /** 101 */
8122
+ edaRegularOpening?: number;
8123
+ /** 115 — discretionary claim under Regulation 1201, capped at the pool. */
8124
+ edaRegularClaim?: number;
8125
+ /** 126 */
8126
+ edaSuccessorOpening?: number;
8127
+ /** 140 — discretionary claim under Regulation 1202(2), capped at the pool. */
8128
+ edaSuccessorClaim?: number;
8129
+ /** 150 */
8130
+ cmedbOpening?: number;
8131
+ /** 170 — discretionary claim under Regulation 1203(1), capped at the pool. */
8132
+ cmedbClaim?: number;
8133
+ }
8134
+ interface DepletionResult {
8135
+ edaRegularPool: number;
8136
+ /** 115 */
8137
+ edaRegularClaim: number;
8138
+ /** 120 */
8139
+ edaRegularClosing: number;
8140
+ edaSuccessorPool: number;
8141
+ /** 140 */
8142
+ edaSuccessorClaim: number;
8143
+ /** 145 */
8144
+ edaSuccessorClosing: number;
8145
+ cmedbPool: number;
8146
+ /** 170 */
8147
+ cmedbClaim: number;
8148
+ /** 175 */
8149
+ cmedbClosing: number;
8150
+ /** 3D → Schedule 1 line 344. */
8151
+ totalClaim: number;
8152
+ issues: string[];
8153
+ }
8154
+ declare function computeDepletion(input?: DepletionInput): DepletionResult;
8155
+ interface CeeInput {
8156
+ /** 200 */
8157
+ regularOpening?: number;
8158
+ /** 205 */
8159
+ regularCurrentYearExpenses?: number;
8160
+ /** 220 — collapsed catch-all; see module doc comment. */
8161
+ regularOtherAdditions?: number;
8162
+ /** 225 */
8163
+ regularGovernmentAssistance?: number;
8164
+ /** 230 — collapsed catch-all; see module doc comment. */
8165
+ regularOtherDeductions?: number;
8166
+ /** 245 — discretionary claim, capped at the subtotal (no rate — 100% claimable). */
8167
+ regularClaim?: number;
8168
+ /** 250 */
8169
+ successorOpening?: number;
8170
+ /** 280 — collapsed catch-all. */
8171
+ successorOtherDeductions?: number;
8172
+ /** 295 — discretionary claim, capped at the subtotal. */
8173
+ successorClaim?: number;
8174
+ }
8175
+ interface CeeResult {
8176
+ /** Amount C — regular subtotal before claim. */
8177
+ regularSubtotal: number;
8178
+ /** 245 */
8179
+ regularClaim: number;
8180
+ /** 249 */
8181
+ regularClosing: number;
8182
+ /** Amount D — successor subtotal before claim. */
8183
+ successorSubtotal: number;
8184
+ /** 295 */
8185
+ successorClaim: number;
8186
+ /** 299 */
8187
+ successorClosing: number;
8188
+ /** 4C → Schedule 1 line 341. */
8189
+ totalClaim: number;
8190
+ issues: string[];
8191
+ }
8192
+ declare function computeCee(input?: CeeInput): CeeResult;
8193
+ interface CdeInput {
8194
+ /** 300 */
8195
+ regularOpening?: number;
8196
+ /** 303 */
8197
+ regularCurrentYearExpenses?: number;
8198
+ /** 310 — collapsed catch-all. */
8199
+ regularOtherAdditions?: number;
8200
+ /** 320 */
8201
+ regularGovernmentAssistance?: number;
8202
+ /** 325 */
8203
+ regularReceivableOnDisposition?: number;
8204
+ /**
8205
+ * 330 — credit balance in the CCOGPE-regular pool, when that pool's own
8206
+ * subtotal is negative (see `computeCogpe`'s `regularSubtotal`, and the
8207
+ * module doc comment on the CCOGPE↔CDE cross-linkage). Auto-supplied by
8208
+ * `computeSchedule12ResourceDeductions` from the COGPE result — do not
8209
+ * set this directly unless calling `computeCde` standalone.
8210
+ */
8211
+ regularCreditBalanceInCogpePool?: number;
8212
+ /** 335 — collapsed catch-all. */
8213
+ regularOtherDeductions?: number;
8214
+ /** 345 — discretionary claim, capped at the rate-limited maximum. */
8215
+ regularClaim?: number;
8216
+ /** 350 */
8217
+ successorOpening?: number;
8218
+ /** 380 — credit balance in the CCOGPE-successor pool. Auto-supplied like 330 above. */
8219
+ successorCreditBalanceInCogpePool?: number;
8220
+ /** 385 — collapsed catch-all. */
8221
+ successorOtherDeductions?: number;
8222
+ /** 395 — discretionary claim, capped at the rate-limited maximum. */
8223
+ successorClaim?: number;
8224
+ }
8225
+ interface CdeResult {
8226
+ /** Amount E — regular subtotal before claim. */
8227
+ regularSubtotal: number;
8228
+ /** 345 */
8229
+ regularClaim: number;
8230
+ /** 349 */
8231
+ regularClosing: number;
8232
+ /** Amount F — successor subtotal before claim. */
8233
+ successorSubtotal: number;
8234
+ /** 395 */
8235
+ successorClaim: number;
8236
+ /** 399 */
8237
+ successorClosing: number;
8238
+ /** 5C → Schedule 1 line 340. */
8239
+ totalClaim: number;
8240
+ issues: string[];
8241
+ }
8242
+ declare function computeCde(input: CdeInput | undefined, daysInTaxYear: number | undefined, /** From `computeCogpe` — see module doc comment on the cross-linkage. */
8243
+
8244
+ cogpe?: {
8245
+ regularSubtotal: number;
8246
+ successorSubtotal: number;
8247
+ }): CdeResult;
8248
+ interface CogpeInput {
8249
+ /** 400 */
8250
+ regularOpening?: number;
8251
+ /** 405 */
8252
+ regularCurrentYearExpenses?: number;
8253
+ /** 415 — collapsed catch-all. */
8254
+ regularOtherAdditions?: number;
8255
+ /** 420 */
8256
+ regularReceivableOnDisposition?: number;
8257
+ /** 425 */
8258
+ regularGovernmentAssistance?: number;
8259
+ /**
8260
+ * 440 — collapsed catch-all deduction. May also receive a carryover from
8261
+ * a negative CCOGPE-successor subtotal (line 495(b)) when no s.66.7(4)(a)(iii)
8262
+ * designation was made — NOT auto-applied; see module doc comment.
8263
+ */
8264
+ regularOtherDeductions?: number;
8265
+ /** 445 — discretionary claim, capped at the rate-limited maximum. */
8266
+ regularClaim?: number;
8267
+ /** 450 */
8268
+ successorOpening?: number;
8269
+ /** 470 */
8270
+ successorReceivableOnDisposition?: number;
8271
+ /** 490 — collapsed catch-all. */
8272
+ successorOtherDeductions?: number;
8273
+ /** 495 — discretionary claim, capped at the rate-limited maximum. */
8274
+ successorClaim?: number;
8275
+ }
8276
+ interface CogpeResult {
8277
+ /** Amount J — regular subtotal before claim. */
8278
+ regularSubtotal: number;
8279
+ /** 445 */
8280
+ regularClaim: number;
8281
+ /** 449 */
8282
+ regularClosing: number;
8283
+ /** Amount K — successor subtotal before claim. */
8284
+ successorSubtotal: number;
8285
+ /** 495 */
8286
+ successorClaim: number;
8287
+ /** 499 */
8288
+ successorClosing: number;
8289
+ /** 6C → Schedule 1 line 342. */
8290
+ totalClaim: number;
8291
+ issues: string[];
8292
+ }
8293
+ declare function computeCogpe(input: CogpeInput | undefined, daysInTaxYear: number | undefined): CogpeResult;
8294
+ interface ForeignExplorationInput {
8295
+ /** 500 */
8296
+ regularOpening?: number;
8297
+ /** 515 — collapsed catch-all. */
8298
+ regularOtherDeductions?: number;
8299
+ /** 530 — foreign-source resource income; caps the claim. */
8300
+ regularForeignResourceIncome?: number;
8301
+ /** 520 — discretionary claim under s.66(4)/66.7(2). */
8302
+ regularClaim?: number;
8303
+ /** 550 */
8304
+ successorOpening?: number;
8305
+ /** 565 — collapsed catch-all. */
8306
+ successorOtherDeductions?: number;
8307
+ /** 580 — foreign-source resource income attributable to successored properties. */
8308
+ successorForeignResourceIncome?: number;
8309
+ /** 570 — discretionary claim. */
8310
+ successorClaim?: number;
8311
+ }
8312
+ interface ForeignExplorationResult {
8313
+ regularPool: number;
8314
+ /** 520 */
8315
+ regularClaim: number;
8316
+ /** 525 */
8317
+ regularClosing: number;
8318
+ successorPool: number;
8319
+ /** 570 */
8320
+ successorClaim: number;
8321
+ /** 575 */
8322
+ successorClosing: number;
8323
+ issues: string[];
8324
+ }
8325
+ /** Part 7 — Foreign exploration and development expenses (pre-2001 tax years; still a real, if rare, carryforward). */
8326
+ declare function computeForeignExploration(input: ForeignExplorationInput | undefined, daysInTaxYear: number | undefined): ForeignExplorationResult;
8327
+ /**
8328
+ * Parts 8/9 — per-country specified foreign exploration/development (Part 8,
8329
+ * pre-2001) and cumulative foreign resource expenses (Part 9, post-2000).
8330
+ * Modelled as a flat total across countries — the form's own per-country
8331
+ * allocation (required when claiming, per s.66(4.2)/66.7(2.2)/66.21) is a
8332
+ * preparer-side allocation exercise this module does not perform; the total
8333
+ * claim is what feeds Schedule 1 either way.
8334
+ */
8335
+ interface ForeignPerCountryInput {
8336
+ /** Sum of all countries' opening balances. */
8337
+ openingBalance?: number;
8338
+ /** Sum of all countries' current-year additions (Part 9 only; Part 8 has none). */
8339
+ currentYearExpenses?: number;
8340
+ /** Sum of all countries' other deductions/transfers. */
8341
+ otherDeductions?: number;
8342
+ /** Sum of all countries' foreign resource income. */
8343
+ foreignResourceIncome?: number;
8344
+ /** Discretionary claim, capped per the part's own formula. */
8345
+ claim?: number;
8346
+ }
8347
+ interface ForeignPerCountryResult {
8348
+ pool: number;
8349
+ claim: number;
8350
+ closing: number;
8351
+ issues: string[];
8352
+ }
8353
+ /** Part 8 — specified foreign exploration/development, regular OR successor (call once per column; rates are identical). */
8354
+ declare function computeSpecifiedForeignExploration(input: ForeignPerCountryInput | undefined, label: string): ForeignPerCountryResult;
8355
+ /** Part 9 — cumulative foreign resource expenses, regular OR successor. */
8356
+ declare function computeCumulativeForeignResource(input: ForeignPerCountryInput | undefined, daysInTaxYear: number | undefined, label: string): ForeignPerCountryResult;
8357
+ interface Schedule12ResourceDeductionsInput {
8358
+ depletion?: DepletionInput;
8359
+ cee?: CeeInput;
8360
+ cde?: Omit<CdeInput, 'regularCreditBalanceInCogpePool' | 'successorCreditBalanceInCogpePool'>;
8361
+ cogpe?: CogpeInput;
8362
+ foreignExploration?: ForeignExplorationInput;
8363
+ specifiedForeignRegular?: ForeignPerCountryInput;
8364
+ specifiedForeignSuccessor?: ForeignPerCountryInput;
8365
+ cumulativeForeignRegular?: ForeignPerCountryInput;
8366
+ cumulativeForeignSuccessor?: ForeignPerCountryInput;
8367
+ /** Days in the tax year, for the ≥357-day step / linear provincial prorations. Default 365. */
8368
+ daysInTaxYear?: number;
8369
+ }
8370
+ interface Schedule12ResourceDeductionsResult {
8371
+ depletion?: DepletionResult;
8372
+ cee?: CeeResult;
8373
+ cde?: CdeResult;
8374
+ cogpe?: CogpeResult;
8375
+ foreignExploration?: ForeignExplorationResult;
8376
+ specifiedForeignRegular?: ForeignPerCountryResult;
8377
+ specifiedForeignSuccessor?: ForeignPerCountryResult;
8378
+ cumulativeForeignRegular?: ForeignPerCountryResult;
8379
+ cumulativeForeignSuccessor?: ForeignPerCountryResult;
8380
+ /** Schedule 1 line 344. */
8381
+ depletionClaim: number;
8382
+ /** Schedule 1 line 341. */
8383
+ ceeClaim: number;
8384
+ /** Schedule 1 line 340. */
8385
+ cdeClaim: number;
8386
+ /** Schedule 1 line 342. */
8387
+ cogpeClaim: number;
8388
+ /** Schedule 1 line 345 — sum of Parts 7, 8 and 9's claims. */
8389
+ foreignClaim: number;
8390
+ issues: string[];
8391
+ }
8392
+ declare function computeSchedule12ResourceDeductions(input: Schedule12ResourceDeductionsInput): Schedule12ResourceDeductionsResult;
8393
+ //#endregion
7013
8394
  //#region src/t2/schedules/schedule13-reserves.d.ts
7014
8395
  /**
7015
8396
  * T2 Schedule 13 — Continuity of Reserves (Part 2, "Other reserves").
@@ -7388,11 +8769,11 @@ declare function computeSchedule31(input: Schedule31Input, rates: Schedule31Rate
7388
8769
  * Part 2 Investment allowance = lines 401–407 → line 490
7389
8770
  * Part 3 Taxable capital = capital − investment allowance → line 500
7390
8771
  * Part 4 Taxable capital employed in Canada
7391
- * = taxable capital × (taxable income earned in Canada ÷ taxable income) → line 690
8772
+ * = taxable capital × (taxable income earned in Canada ÷ taxable income) → line 790
7392
8773
  *
7393
8774
  * Part 5 of the paper form (the 0.225% figure at line 415) is the SUPERSEDED
7394
8775
  * capital-tax-era grind; the CURRENT business-limit grind (straight-line $10M→$50M)
7395
- * lives in Schedule 7. This schedule therefore stops at line 690 and hands that
8776
+ * lives in Schedule 7. This schedule therefore stops at line 790 and hands that
7396
8777
  * figure to the Schedule 7 grind. The federal Part I.3 tax itself was repealed
7397
8778
  * (2006) and is not computed. Pure, integer whole dollars.
7398
8779
  */
@@ -7462,7 +8843,14 @@ interface TaxableCapitalResult {
7462
8843
  investmentAllowance: number;
7463
8844
  /** Line 500 — taxable capital for the year (≥ 0). */
7464
8845
  taxableCapital: number;
7465
- /** Line 690 — taxable capital employed in Canada (feeds the Schedule 7 grind). */
8846
+ /**
8847
+ * Line 790 — taxable capital employed in Canada (feeds the Schedule 7 grind).
8848
+ *
8849
+ * This comment said 690, which is not a line of Schedule 33 at all. The form
8850
+ * prints "Taxable capital employed in Canada (line 701 minus amount E)"
8851
+ * against 790, and `SCHEDULE_33_TAXABLE_CAPITAL_IN_CANADA_LINE` has always
8852
+ * said so — the two disagreed and nothing checked.
8853
+ */
7466
8854
  taxableCapitalEmployedInCanada: number;
7467
8855
  /** True when > $10M — Schedule 33 must be filed (large-corporation test). */
7468
8856
  filingRequired: boolean;
@@ -8053,6 +9441,28 @@ interface FederalT2Input {
8053
9441
  class13?: Class13Input;
8054
9442
  /** Class 14 (limited-life intangibles), the full per-property Reg 1100(1)(c) mechanic. */
8055
9443
  class14?: Class14Input;
9444
+ /**
9445
+ * Class 14.1's pre-2027 transitional additional allowance (Reg
9446
+ * 1100(1)(c.1)/(c.2)) — requires a `'14.1'` row in `ccaClasses`. See
9447
+ * `computeClass141AdditionalAllowance`'s own doc comment. Omit entirely for
9448
+ * a corporation with no pre-2017 class 14.1 history (the common case).
9449
+ */
9450
+ class141Transitional?: {
9451
+ transitionalBalanceAt2017?: number;
9452
+ additionalAllowanceClaimedToDate?: number;
9453
+ };
9454
+ /**
9455
+ * s.13(39) — reduces recapture on a disposition of class 14.1 property that
9456
+ * was eligible capital property (ECP) before 2017. Requires a `'14.1'` row
9457
+ * in `ccaClasses` with a disposition. See
9458
+ * `computeClass141RecaptureReduction`'s own doc comment for the formula and
9459
+ * its disclosed third-limb approximation.
9460
+ */
9461
+ class141Disposition?: {
9462
+ proceeds: number;
9463
+ capitalCost: number;
9464
+ transitionalBalanceRemaining?: number;
9465
+ };
8056
9466
  /**
8057
9467
  * Schedule 6 capital-property dispositions — engine computes the taxable capital
8058
9468
  * gain (added to income) and any current-year net capital loss (→ Schedule 4).
@@ -8067,10 +9477,27 @@ interface FederalT2Input {
8067
9477
  * through the Schedule 4 continuity inputs. Neither belongs here.
8068
9478
  */
8069
9479
  divisionCDeductions?: readonly TaxableIncomeLine[];
8070
- /** Charitable donations made this year (Schedule 2). Engine applies the 75% limit. */
9480
+ /**
9481
+ * CHARITABLE donations made this year (Schedule 2, Part 2 — lines 210/240).
9482
+ * Engine applies the 75% of net income limit. Do NOT combine cultural or
9483
+ * ecological gifts into this figure — see `culturalEcologicalGifts` below;
9484
+ * mixing them in over-caps a gift type the Act does not limit at all.
9485
+ */
8071
9486
  charitableDonations?: number;
8072
- /** Unclaimed donation pool carried forward from prior years. */
9487
+ /** Unclaimed CHARITABLE donation pool carried forward from prior years (Schedule 2 line 240). */
8073
9488
  openingDonationPool?: number;
9489
+ /**
9490
+ * Gifts of certified cultural property (s.110.1(1)(b)) and ecologically
9491
+ * sensitive land (s.110.1(1)(c)) made this year — Schedule 2 Parts 3/4
9492
+ * (lines 410/520). Deducted in FULL, every year: unlike charitable
9493
+ * donations, neither is limited to 75% of net income, so this engine
9494
+ * claims the whole amount with no cap and no carryforward pool (this
9495
+ * package does not yet track a multi-year cultural/ecological
9496
+ * carryforward — see `SCHEDULE_2_CARRYFORWARD_YEARS` in
9497
+ * `forms/schedule2.ts` for the 5/10-year periods a future carryforward
9498
+ * implementation would need).
9499
+ */
9500
+ culturalEcologicalGifts?: number;
8074
9501
  /** Opening non-capital loss pool carried forward from the prior year. */
8075
9502
  openingNonCapitalLoss?: number;
8076
9503
  /** Opening net-capital loss pool carried forward from the prior year. */
@@ -8155,8 +9582,40 @@ interface FederalT2Input {
8155
9582
  * as an S1 deduction. Capital-gains reserves (Part 1) go through Schedule 6.
8156
9583
  */
8157
9584
  reserveContinuity?: readonly ReserveContinuityRow[];
8158
- /** Adjusted aggregate investment income (prior year). */
9585
+ /**
9586
+ * Adjusted aggregate investment income, PRIOR year (Schedule 7 Part 2, line
9587
+ * 745, s.125(7)) — the SBD passive-income grind (s.125(5.1)(b)) only. This is
9588
+ * NOT the same figure or the same year as `aggregateInvestmentIncome` below;
9589
+ * see that field's doc comment for the conflation this app used to have.
9590
+ */
8159
9591
  aaii?: number;
9592
+ /**
9593
+ * Schedule 7 Part 2's own line-by-line detail (705-741) — when given AND
9594
+ * `aaii` is omitted, `aaii` is DERIVED from this via
9595
+ * `computeAdjustedAggregateInvestmentIncome` instead of being typed in
9596
+ * directly. `aaii` above still wins if both are supplied — an explicit
9597
+ * override, not silently replaced.
9598
+ */
9599
+ adjustedAggregateInvestmentIncomeDetail?: AdjustedAggregateInvestmentIncomeInput;
9600
+ /**
9601
+ * Aggregate investment income, CURRENT year (Schedule 7 Part 1, line 092 —
9602
+ * filed as jacket line 440) — feeds Part IV/RDTOH (s.129(3)), NOT the SBD
9603
+ * grind. Genuinely a different number from `aaii`: different year (current
9604
+ * vs. prior) AND different definition (plain AII vs. the s.125(7)-adjusted
9605
+ * figure — Part 2 excludes gains/losses on active-asset dispositions and
9606
+ * substitutes "income/losses from property" for Part 1's broader base).
9607
+ * Defaults to `aaii` when omitted — an approximation this app has always
9608
+ * made, now explicit rather than silent. See
9609
+ * `research/findings/federal/S7-aaii-vs-aggregate-investment-income-conflation.md`.
9610
+ */
9611
+ aggregateInvestmentIncome?: number;
9612
+ /**
9613
+ * Schedule 7 Part 1's own line-by-line detail (002-082) — when given AND
9614
+ * `aggregateInvestmentIncome` is omitted, it is DERIVED from this via
9615
+ * `computeAggregateInvestmentIncome` instead of being typed in directly.
9616
+ * `aggregateInvestmentIncome` above still wins if both are supplied.
9617
+ */
9618
+ aggregateInvestmentIncomeDetail?: AggregateInvestmentIncomeInput;
8160
9619
  /** Taxable dividends received from non-connected (portfolio) corps — Part IV. */
8161
9620
  portfolioDividendsReceived?: number;
8162
9621
  /** Of the portfolio dividends, the eligible portion (→ ERDTOH). */
@@ -8210,9 +9669,69 @@ interface FederalT2Input {
8210
9669
  */
8211
9670
  eifel?: Omit<EifelInput, 'taxYearStart' | 'isCcpc'> & {
8212
9671
  isCcpc?: boolean;
9672
+ /**
9673
+ * Schedule 130 Part 2A line 045 — the corporation's gross interest and
9674
+ * financing expenses. Distinct from `netInterestAndFinancingExpenses`,
9675
+ * which is the group's NET figure used only for the de-minimis
9676
+ * excluded-entity test. Without this the limitation has no base to work
9677
+ * on and nothing is denied.
9678
+ */
9679
+ interestAndFinancingExpenses?: number; /** Part 2D line 072 — the corporation's interest and financing revenues. */
9680
+ interestAndFinancingRevenues?: number;
9681
+ /**
9682
+ * Part 2F line 106 — adjusted taxable income, supplied directly. Wins over
9683
+ * the derivation below, same explicit-over-detail precedence as Schedule 7's
9684
+ * `aaii`/`aaiiDetail` pair.
9685
+ */
9686
+ adjustedTaxableIncome?: number;
9687
+ /**
9688
+ * Part 2F — the components of the ATI build-up this engine cannot derive
9689
+ * from the return (partnership shares, foreign affiliate amounts, exempt-IFE
9690
+ * activity, foreign tax credit gross-ups). Taxable income, the year's
9691
+ * non-capital loss, IFE, CCA, resource deductions, terminal loss, the
9692
+ * 110(1)(k) deduction, IFR and recapture are all derived from the return
9693
+ * itself and must NOT be repeated here.
9694
+ */
9695
+ adjustedTaxableIncomeDetail?: Omit<AdjustedTaxableIncomeInput, 'taxableIncome' | 'nonCapitalLossForYear' | 'lossClaimNotReducingTaxableIncome' | 'interestAndFinancingExpenses' | 'capitalCostAllowance' | 'resourceDeductions' | 'terminalLoss' | 'partVI1TaxDeduction' | 'interestAndFinancingRevenues' | 'recapture'>; /** Whether a group ratio election under subsection 18.21(2) was made. */
9696
+ hasGroupRatioElection?: boolean; /** Part 2G line 118 / Part 2K line 132 — the allocated group ratio amount. */
9697
+ groupRatioAmount?: number; /** Part 1A — the received-capacity table; its total is line 130. */
9698
+ receivedCapacity?: readonly ReceivedCapacityRow[]; /** Part 2J line 128 — restricted interest and financing expenses carried forward. */
9699
+ rifeFromPreviousYears?: number; /** Part 2I — the three preceding years' excess-capacity vintages. */
9700
+ priorYearExcessCapacity?: readonly ExcessCapacityVintage[];
9701
+ /**
9702
+ * Part 2N line 158 — partnership IFE add-back (Schedule 1 line 252).
9703
+ * DERIVED from `partnershipIfe` below × the Part 2K proportion when that
9704
+ * table is supplied; this overrides the derivation.
9705
+ */
9706
+ partnershipIfeAddBack?: number; /** Part 2M line 150 — subclause 95(2)(f.11)(ii)(D)(I). Derived from `clause95Denied`. */
9707
+ clause95FapiAmountI?: number; /** Part 2M line 155 — subclause 95(2)(f.11)(ii)(D)(II). Derived from `clause95Included`. */
9708
+ clause95FapiAmountII?: number; /** Part 1B — borrowings under a public-sector agreement producing exempt IFE. */
9709
+ exemptIfe?: readonly ExemptIfeRow[]; /** Part 1C — borrowings and other financings. Feeds lines 027/033/042. */
9710
+ borrowings?: readonly BorrowingRow[]; /** Part 1D — loans and other financings. Feeds lines 061/066. */
9711
+ loans?: readonly LoanRow[]; /** Part 1E — IFE allocated from a partnership. Feeds lines 039/142/156. */
9712
+ partnershipIfe?: readonly PartnershipIfeRow[]; /** Part 2B — IFE capitalized into depreciable property. Feeds lines 030/032. */
9713
+ capitalizedIfe?: readonly CapitalizedIfeRow[]; /** Part 2C — IFE inside resource expense pools. Feeds line 031. */
9714
+ resourceIfe?: readonly ResourceIfeRow[]; /** Part 2E — the IFE-derived portion of a 111(1)(a) loss claim. Feeds line 089. */
9715
+ lossPortionFromIfe?: readonly LossPortionFromIfeRow[];
9716
+ /**
9717
+ * Part 2A lines 027-044 — the IFE build-up. Lines fed by the sub-part
9718
+ * tables above (027, 030, 031, 032, 033, 039, 042) are filled in from them
9719
+ * and must NOT be repeated here. `interestAndFinancingExpenses` above
9720
+ * overrides the whole derivation.
9721
+ */
9722
+ ifeDetail?: InterestAndFinancingExpensesInput;
9723
+ /**
9724
+ * Part 2D lines 058-071 — the IFR build-up. Lines 061 and 066 come from
9725
+ * `loans` above. `interestAndFinancingRevenues` overrides the derivation.
9726
+ */
9727
+ ifrDetail?: InterestAndFinancingRevenuesInput; /** Part 2M, first table — amounts denied under subclause 95(2)(f.11)(ii)(D)(I). */
9728
+ clause95Denied?: readonly Clause95DeniedRow[]; /** Part 2M, second table — amounts included under subclause 95(2)(f.11)(ii)(D)(II). */
9729
+ clause95Included?: readonly Clause95IncludedRow[];
8213
9730
  };
8214
9731
  internetBusiness?: Schedule88Input;
8215
9732
  firstReturn?: Schedule101Input;
9733
+ /** Feeds Schedule 1 lines 340/341/342/344/345. */
9734
+ resourceDeductions?: Schedule12ResourceDeductionsInput;
8216
9735
  /** Qualified SR&ED expenditures for the year (the ITC base). */
8217
9736
  sredQualifiedExpenditures?: number;
8218
9737
  /**
@@ -8274,6 +9793,20 @@ interface FederalT2Result {
8274
9793
  schedule1: Schedule1Result;
8275
9794
  taxableIncomeCalc: TaxableIncomeResult;
8276
9795
  businessLimit: BusinessLimitResult;
9796
+ /**
9797
+ * Schedule 7 Part 2 — AAII derived from its own detail (when
9798
+ * `adjustedAggregateInvestmentIncomeDetail` given). Its own
9799
+ * `adjustedAggregateInvestmentIncome` is already folded into `aaii`'s
9800
+ * resolved value feeding `businessLimit` — exposed here for the audit
9801
+ * trail, not a separate figure to apply again.
9802
+ */
9803
+ adjustedAggregateInvestmentIncomeSchedule?: AdjustedAggregateInvestmentIncomeResult;
9804
+ /**
9805
+ * Schedule 7 Part 1 — AII derived from its own detail (when
9806
+ * `aggregateInvestmentIncomeDetail` given). Already folded into RDTOH —
9807
+ * exposed here for the audit trail.
9808
+ */
9809
+ aggregateInvestmentIncomeSchedule?: AggregateInvestmentIncomeResult;
8277
9810
  sbd: SbdResult;
8278
9811
  partI: PartITaxResult;
8279
9812
  /** Part IV tax on portfolio dividends + the RDTOH accounts (Schedule 3). */
@@ -8290,6 +9823,20 @@ interface FederalT2Result {
8290
9823
  class13?: Class13Result;
8291
9824
  /** Schedule 8 — Class 14 limited-life properties (when `class14` given). */
8292
9825
  class14?: Class14Result;
9826
+ /**
9827
+ * Class 14.1's pre-2027 transitional additional allowance (when
9828
+ * `class141Transitional` given AND `ccaClasses` has a `'14.1'` row). Its
9829
+ * `additionalAllowance` is already folded into `schedule1Deductions`/line
9830
+ * 403 — exposed here for the audit trail, not as a separate claim to add.
9831
+ */
9832
+ class141AdditionalAllowance?: Class141AdditionalAllowanceResult;
9833
+ /**
9834
+ * s.13(39) reduction applied against class 14.1 recapture (when
9835
+ * `class141Disposition` given). Already netted into the `'14.1'` row's
9836
+ * `recapture` inside `cca` and into `cca.totalRecapture` — exposed here for
9837
+ * the audit trail.
9838
+ */
9839
+ class141RecaptureReduction?: number;
8293
9840
  /** Schedule 6 — capital dispositions, taxable capital gain, net capital loss (when given). */
8294
9841
  capitalGains?: Schedule6Result;
8295
9842
  /** Schedule 5 — provincial/territorial tax (when a single Schedule-5 province is set). */
@@ -8315,15 +9862,55 @@ interface FederalT2Result {
8315
9862
  */
8316
9863
  partVI1?: Schedule43Result;
8317
9864
  /**
8318
- * EIFEL excluded-entity assessment. `requiresLimitation` true means the
8319
- * regime applies and the restriction is NOT computed the return must not
8320
- * be filed.
9865
+ * ITA s.110(1)(k) — the Division C deduction for Part VI.1 tax paid (jacket
9866
+ * line 325). Its `deduction` is already folded into `divisionCDeductions`/
9867
+ * `taxableIncome` — exposed here for the audit trail, not a separate claim.
9868
+ */
9869
+ partVI1Deduction?: PartVI1DeductionResult;
9870
+ /**
9871
+ * EIFEL excluded-entity assessment — whether the regime applies at all.
9872
+ * When `requiresLimitation` is true, `eifelAdjustedTaxableIncome`,
9873
+ * `eifelLimitation` and `eifelCapacity` below carry the computation itself.
8321
9874
  */
8322
9875
  eifel?: EifelResult;
9876
+ /** Schedule 130 Part 2F — adjusted taxable income (present when the regime applies). */
9877
+ eifelAdjustedTaxableIncome?: AdjustedTaxableIncomeResult;
9878
+ /**
9879
+ * Schedule 130 Parts 2K/2L — the subsection 18.2(2) denial itself.
9880
+ *
9881
+ * `deniedAmount` IS folded into `schedule1` (line 251) and therefore into
9882
+ * `netIncomeForTax` and `taxableIncome`. Because adjusted taxable income is
9883
+ * defined from taxable income "determined without regard to subsection
9884
+ * 18.2(2)", the engine runs the Schedule 1 → taxable income sequence twice:
9885
+ * once to give the limitation its base, once to apply what it produced. See
9886
+ * `runIncomeSequence` in this module.
9887
+ */
9888
+ eifelLimitation?: EifelLimitationResult;
9889
+ /**
9890
+ * Schedule 130 Parts 1A/2G/2H/2I/2J/2O — the excess-capacity regime.
9891
+ *
9892
+ * Three of its outputs are what other forms ask for by name:
9893
+ * `excessCapacityBeforeRife` is line 129, `receivedCapacity` is line 130,
9894
+ * and `rifeForYear` is Schedule 4 line 710. AT1 Schedule 21's own RIFE
9895
+ * section carries all three across.
9896
+ */
9897
+ eifelCapacity?: EifelCapacityResult;
9898
+ /**
9899
+ * Schedule 130 Part 2A — interest and financing expenses, built from the
9900
+ * borrowing, partnership, capitalized-interest and resource-pool tables
9901
+ * rather than typed in as one figure. `totalIfe` is line 045; `variableA` is
9902
+ * the gross figure lines 139/141 read, which is what the denial is a
9903
+ * proportion OF.
9904
+ */
9905
+ eifelIfe?: InterestAndFinancingExpensesResult;
9906
+ /** Schedule 130 Part 2D — interest and financing revenues; `totalIfr` is line 072. */
9907
+ eifelIfr?: InterestAndFinancingRevenuesResult;
8323
9908
  /** Schedule 88 — internet business activities (information; present when filed). */
8324
9909
  internetBusiness?: Schedule88Result;
8325
9910
  /** Schedule 101 / 24 — first return (information; present when this is a first return). */
8326
9911
  firstReturn?: Schedule101Result;
9912
+ /** Schedule 12 — resource-related deductions (present when any pool has input). */
9913
+ resourceDeductions?: Schedule12ResourceDeductionsResult;
8327
9914
  /** Schedule 31 — SR&ED investment tax credit (when qualified expenditures / opening pool present). */
8328
9915
  sredItc?: Schedule31Result;
8329
9916
  /** Schedule 27 — zero-emission technology manufacturing reduced-rate benefit (when ZETM income present). */
@@ -8347,6 +9934,20 @@ interface FederalT2Result {
8347
9934
  totalFederalTax: number;
8348
9935
  /** Total tax = federal + provincial/territorial (Schedule 5). */
8349
9936
  totalTax: number;
9937
+ /**
9938
+ * Each schedule's computed figures, keyed by the CRA line they belong on.
9939
+ *
9940
+ * The counterpart of Alberta's `schedulePayloads`. Everything else on this
9941
+ * result is keyed by a name the engine chose — `netIncomeForTax`, `cca` — and
9942
+ * a form cannot be rendered from those, which is why every federal paper Form
9943
+ * View showed "not available" against every computed line. This carries the
9944
+ * same figures under the numbers the return is filed by.
9945
+ *
9946
+ * Deliberately PARTIAL: a schedule appears only where the line each figure
9947
+ * belongs on is recorded in code rather than inferred. See
9948
+ * `t2-schedule-line-items.ts` for why that restraint is the point.
9949
+ */
9950
+ schedulePayloads: T2ScheduleData[];
8350
9951
  }
8351
9952
  declare function computeFederalT2(input: FederalT2Input): FederalT2Result;
8352
9953
  //#endregion
@@ -8689,497 +10290,199 @@ interface T2CifRdtoh {
8689
10290
  interface T2CifProvincial {
8690
10291
  province: string;
8691
10292
  provincialTaxableIncome?: number;
8692
- provincialTax: number;
8693
- }
8694
- interface T2CifCertification {
8695
- firstName: string;
8696
- lastName: string;
8697
- position: string;
8698
- }
8699
- /** Balance owing / refund settlement (lines 840 / 890 / 894). */
8700
- interface T2CifSettlement {
8701
- instalmentsPaid: number;
8702
- /**
8703
- * Line 890 — **total credits**, amount B on page 9: every refundable credit
8704
- * (780, 784, 788, 792, 795–798, 800, 808, 812) plus instalments at 840.
8705
- * Optional because the caller does not always assemble the full credit stack.
8706
- */
8707
- totalCredits?: number;
8708
- /**
8709
- * Amount A minus amount B. The form prints this WITHOUT a numbered box — one
8710
- * signed balance, negative meaning a refund — so it carries no line number.
8711
- */
8712
- balanceOwing: number;
8713
- /** The same balance when negative. No line number, for the same reason. */
8714
- overpaymentRefund: number;
8715
- /**
8716
- * Line 894 — **refund code**, a single digit directing what the CRA does with
8717
- * an overpayment (refund it, or transfer it to the next instalment). A CODE,
8718
- * never a dollar amount.
8719
- */
8720
- refundCode?: string;
8721
- }
8722
- interface T2GifiLine {
8723
- code: string;
8724
- amount: number;
8725
- }
8726
- /** GIFI Schedule 100 (balance sheet) / 125 (income statement) / 141 (notes). */
8727
- interface T2CifGifi {
8728
- schedule100: readonly T2GifiLine[];
8729
- schedule125: readonly T2GifiLine[];
8730
- notes?: {
8731
- preparedByAccountant?: boolean;
8732
- assuranceLevel?: string;
8733
- notesIncluded?: boolean;
8734
- };
8735
- }
8736
- interface T2CifAddress {
8737
- line1?: string;
8738
- city?: string;
8739
- province?: string;
8740
- postalCode?: string;
8741
- country?: string;
8742
- }
8743
- /**
8744
- * T2 jacket yes/no questionnaire (pages 2–3). The CRA line for each is in the
8745
- * comment. A complete return serialises every applicable line even when the
8746
- * answer is "No"; the answers drive which schedules CRA expects, so the host
8747
- * cross-checks them against the attached schedules.
8748
- */
8749
- interface T2CifQuestionnaire {
8750
- addressChanged?: boolean;
8751
- firstYear?: boolean;
8752
- finalReturn?: boolean;
8753
- amalgamation?: boolean;
8754
- windUp?: boolean;
8755
- acquisitionOfControl?: boolean;
8756
- nonResident?: boolean;
8757
- residentOfCanada?: boolean;
8758
- professionalCorp?: boolean;
8759
- inactive?: boolean;
8760
- associated?: boolean;
8761
- associatedClaimingExpenditureLimit?: boolean;
8762
- relatedCorporations?: boolean;
8763
- charitableDonations?: boolean;
8764
- dividends?: boolean;
8765
- claimingLosses?: boolean;
8766
- provincialCreditOrMultiJurisdiction?: boolean;
8767
- capitalGains?: boolean;
8768
- investmentIncome?: boolean;
8769
- manufacturingOrZetm?: boolean;
8770
- investmentTaxCredit?: boolean;
8771
- sredExpenditures?: boolean;
8772
- foreignTaxCredits?: boolean;
8773
- foreignAffiliates?: boolean;
8774
- foreignPropertyOver100k?: boolean;
8775
- nonArmsLengthNonResidentTransactions?: boolean;
8776
- }
8777
- interface T2CifShareholder {
8778
- name: string;
8779
- identifier?: string;
8780
- commonPct?: number;
8781
- preferredPct?: number;
8782
- }
8783
- /** Part I tax build-up (jacket) — reconciles to line 700. */
8784
- interface T2CifPartI {
8785
- basicTax: number;
8786
- abatement: number;
8787
- smallBusinessDeduction: number;
8788
- generalRateReduction: number;
8789
- }
8790
- interface T2CifData {
8791
- identity: T2CifIdentity;
8792
- /** T2 jacket yes/no questionnaire (pages 2–3). */
8793
- questionnaire?: T2CifQuestionnaire;
8794
- /** GIFI financial statements (Schedule 100/125/141) — mandatory on a real filing. */
8795
- gifi?: T2CifGifi;
8796
- /** Schedule 50 — shareholders holding ≥10% (private corporations). */
8797
- shareholders?: readonly T2CifShareholder[];
8798
- schedule1?: T2CifSchedule1;
8799
- capitalGains?: T2CifCapitalGains;
8800
- cca?: T2CifCca;
8801
- losses?: T2CifLosses;
8802
- donations?: T2CifSchedule2;
8803
- sbd?: T2CifSbd;
8804
- zetm?: T2CifZetm;
8805
- foreignTaxCredit?: T2CifForeignTaxCredit;
8806
- sredItc?: T2CifSredItc;
8807
- rdtoh?: T2CifRdtoh;
8808
- grip?: T2CifGrip;
8809
- provincial?: T2CifProvincial;
8810
- taxableIncome: number;
8811
- partIBuildUp?: T2CifPartI;
8812
- partITax: number;
8813
- /**
8814
- * Part III.1 tax on an excessive eligible dividend designation — jacket 710.
8815
- * Schedule 55. Included in `totalFederalTax`, so it MUST be disclosed here:
8816
- * the jacket summary is an addition, and a 770 that exceeds the sum of its
8817
- * components is an internally inconsistent return.
8818
- */
8819
- partIII1Tax?: number;
8820
- /** Part VI.1 tax on taxable preferred share dividends — jacket 724. Schedule 43. */
8821
- partVI1Tax?: number;
8822
- /** Total FEDERAL tax net of credits + dividend refund (Part I + IV − refund − credits). */
8823
- totalFederalTax?: number;
8824
- totalTax: number;
8825
- settlement?: T2CifSettlement;
8826
- certification?: T2CifCertification;
8827
- }
8828
- /**
8829
- * Render the T2 return. Pass `{ forFiling: true }` for a real transmission: it
8830
- * makes the CRA-mandatory sections UNCONDITIONAL — a missing GIFI balance sheet
8831
- * (S100), income statement (S125), notes checklist (S141), head-office address,
8832
- * or (for a private corporation) Schedule 50 THROWS rather than silently
8833
- * omitting. A draft/preview (the default) renders whatever is present.
8834
- */
8835
- declare function renderT2DraftReturn(data: T2CifData, opts?: {
8836
- forFiling?: boolean;
8837
- }): string;
8838
- //#endregion
8839
- //#region src/t2/jacket/settlement.d.ts
8840
- /**
8841
- * T2 jacket — balance owing / refund settlement (the bottom of page 8).
8842
- *
8843
- * A complete return must reconcile total tax payable down to what the
8844
- * corporation actually owes or is refunded:
8845
- *
8846
- * balance owing (890) = max(0, total tax payable − instalments/payments)
8847
- * overpayment/refund (894) = max(0, instalments/payments − total tax payable)
8848
- *
8849
- * `totalTaxPayable` here is the engine's tax figure, already NET of the dividend
8850
- * refund and refundable credits it folds in (so those are not subtracted again).
8851
- * `instalmentsPaid` (line 840) is a PAYMENT record supplied by the host — it is
8852
- * not a computed tax value, so it stays a caller input. Whole dollars.
8853
- */
8854
- interface T2SettlementInput {
8855
- /** Total tax payable (line 770), net of refundable credits per the engine. */
8856
- totalTaxPayable: number;
8857
- /** Tax paid by instalments and other payments during the year (line 840). */
8858
- instalmentsPaid?: number;
8859
- }
8860
- interface T2SettlementResult {
8861
- totalTaxPayable: number;
8862
- instalmentsPaid: number;
8863
- /** Balance unpaid (line 890) — zero when overpaid. */
8864
- balanceOwing: number;
8865
- /** Overpayment refundable to the corporation (line 894) — zero when a balance is owing. */
8866
- overpaymentRefund: number;
8867
- }
8868
- declare function computeT2Settlement(input: T2SettlementInput): T2SettlementResult;
8869
- //#endregion
8870
- //#region src/t2/schedules/eifel-adjusted-taxable-income.d.ts
8871
- /**
8872
- * ITA subsection 18.2(1) — **adjusted taxable income**, the base the EIFEL
8873
- * ceiling is computed on.
8874
- *
8875
- * `eifel-limitation.ts` took this as a required input because deriving it
8876
- * partially would produce a plausible figure from an incomplete definition. This
8877
- * derives it, and is explicit about the components it does and does not cover.
8878
- *
8879
- * ── What it is ──────────────────────────────────────────────────────────────
8880
- *
8881
- * An EBITDA-like measure, built from taxable income by adding back the things the
8882
- * regime is measuring against and removing the things that would double-count.
8883
- *
8884
- * ATI = A + B − C
8885
- *
8886
- * A = D − E the income base
8887
- * B the ADD-BACKS
8888
- * C the REDUCTIONS
8889
- *
8890
- * **The add-backs include the interest and financing expenses themselves.** That
8891
- * is the point of the measure and the thing to hold on to: the ceiling is a
8892
- * percentage of income computed *before* the very expenses being limited, so a
8893
- * corporation cannot shrink its own ceiling by borrowing more.
8894
- *
8895
- * ── A — the income base (D − E) ─────────────────────────────────────────────
8896
- *
8897
- * **D** is taxable income for the year, determined **without regard to** s.18.2(2)
8898
- * itself, paragraphs 12(1)(l.2) and 111(1)(a.1), and clause 95(2)(f.11)(ii)(D) —
8899
- * a non-resident uses taxable income earned in Canada on the same basis. The
8900
- * circularity is deliberate: the limitation cannot be an input to its own base.
8901
- *
8902
- * **E** subtracts the year's non-capital loss on the same basis, any amount
8903
- * claimed under paragraph 111(1)(a) that did not actually reduce taxable income,
8904
- * and a controlled-foreign-affiliate component (`T × U ÷ V`).
8905
- *
8906
- * ── B — the add-backs ───────────────────────────────────────────────────────
8907
- *
8908
- * (a) interest and financing expenses for the year
8909
- * (b) capital cost allowance and resource deductions — paragraph 20(1)(a),
8910
- * 59.1(a) and subsections 66(4), 66.1(2)/(3), 66.2(2), 66.21(4), 66.4(2),
8911
- * 66.7(1)-(5)
8912
- * (c) terminal losses — subsection 20(16)
8913
- * (d) the taxpayer's share of a partnership's 20(1)(a) and 20(16) deductions
8914
- * (e) the portion of a paragraph 111(1)(e) limited-partnership-loss claim
8915
- * attributable to those amounts
8916
- *
8917
- * ── C — the reductions ──────────────────────────────────────────────────────
8918
- *
8919
- * (a) interest and financing revenues
8920
- * (b) recapture — subsection 13(1)
8921
- * (c) the taxpayer's share of a partnership's 13(1) inclusion
8922
- * (d) resource inclusions — subsections 59(1), 59(3.2), paragraph 59.1(b)
8923
- * (e) for a corporation, a grossed-up foreign tax credit amount:
8924
- * **100/28** of what would be deductible under s.126(1), and
8925
- * the s.126(2) amounts times the relevant factor
8926
- *
8927
- * ── Not modelled ────────────────────────────────────────────────────────────
8928
- *
8929
- * The trust variant of C(e), and the later paragraphs of B and C dealing with
8930
- * foreign affiliate income and exempt interest. Each is available as an explicit
8931
- * `otherAdditions` / `otherReductions` input rather than silently omitted, so a
8932
- * preparer with one of those amounts can still arrive at the right figure and the
8933
- * engine does not pretend the definition is shorter than it is.
8934
- *
8935
- * Source: `research/sources/legislation/ITA-section-18.2-EIFEL.txt`.
8936
- *
8937
- * Pure, whole dollars.
8938
- */
8939
- /** C(e)(i) — s.126(1) amounts are grossed up by 100/28. */
8940
- declare const FOREIGN_TAX_CREDIT_GROSS_UP: number;
8941
- interface AdjustedTaxableIncomeInput {
8942
- /**
8943
- * D — taxable income for the year, determined **without regard to** s.18.2(2),
8944
- * paragraphs 12(1)(l.2) and 111(1)(a.1), and clause 95(2)(f.11)(ii)(D). For a
8945
- * non-resident, taxable income earned in Canada on the same basis.
8946
- *
8947
- * Signed: a loss year gives a negative figure and the definition permits it.
8948
- */
8949
- taxableIncome: number;
8950
- /** E(a) — the non-capital loss for the year, on the same determinations. */
8951
- nonCapitalLossForYear?: number;
8952
- /**
8953
- * E(a.1) — an amount claimed under paragraph 111(1)(a) **to the extent it did
8954
- * not reduce** taxable income as determined for D.
8955
- */
8956
- lossClaimNotReducingTaxableIncome?: number;
8957
- /** E(b) — the controlled foreign affiliate component, `T × U ÷ V`. */
8958
- foreignAccrualPropertyLossComponent?: number;
8959
- /** B(a) — interest and financing expenses for the year. */
8960
- interestAndFinancingExpenses?: number;
8961
- /** B(b) — capital cost allowance, paragraph 20(1)(a). */
8962
- capitalCostAllowance?: number;
8963
- /** B(b) — resource deductions under s.59.1(a) and the s.66 series. */
8964
- resourceDeductions?: number;
8965
- /** B(c) — terminal losses, subsection 20(16). */
8966
- terminalLoss?: number;
8967
- /** B(d) — the taxpayer's share of a partnership's 20(1)(a) / 20(16) deductions. */
8968
- partnershipCapitalAndTerminalShare?: number;
8969
- /** B(e) — the attributable portion of a paragraph 111(1)(e) claim. */
8970
- limitedPartnershipLossPortion?: number;
8971
- /** Any further B paragraph this module does not model. */
8972
- otherAdditions?: number;
8973
- /** C(a) — interest and financing revenues for the year. */
8974
- interestAndFinancingRevenues?: number;
8975
- /** C(b) — recapture included under subsection 13(1). */
8976
- recapture?: number;
8977
- /** C(c) — the taxpayer's share of a partnership's 13(1) inclusion. */
8978
- partnershipRecaptureShare?: number;
8979
- /** C(d) — inclusions under s.59(1), 59(3.2) or paragraph 59.1(b). */
8980
- resourceInclusions?: number;
8981
- /** C(e)(i) — amounts deductible under s.126(1). Grossed up by 100/28 here. */
8982
- section126_1ForeignTaxCredits?: number;
8983
- /** C(e)(ii) — amounts deductible under s.126(2), already at the relevant factor. */
8984
- section126_2GrossedUp?: number;
8985
- /** Any further C paragraph this module does not model. */
8986
- otherReductions?: number;
8987
- }
8988
- interface AdjustedTaxableIncomeResult {
8989
- /** A — the income base, D − E. Signed. */
8990
- incomeBase: number;
8991
- /** B — total add-backs. */
8992
- totalAdditions: number;
8993
- /** C — total reductions. */
8994
- totalReductions: number;
8995
- /** A + B − C. **Signed** — the definition permits a negative result. */
8996
- adjustedTaxableIncome: number;
8997
- issues: string[];
8998
- }
8999
- declare function computeAdjustedTaxableIncome(input: AdjustedTaxableIncomeInput): AdjustedTaxableIncomeResult;
9000
- //#endregion
9001
- //#region src/t2/schedules/eifel-limitation.d.ts
9002
- /**
9003
- * ITA subsection 18.2(2) — the excessive interest and financing expenses
9004
- * limitation itself.
9005
- *
9006
- * `eifel-excluded-entity.ts` decides **whether** the regime applies. This decides
9007
- * **how much** it denies, which was previously left unbuilt on the grounds that
9008
- * computing it from an unbuilt definition would be confidently wrong.
9009
- *
9010
- * ── The provision ───────────────────────────────────────────────────────────
9011
- *
9012
- * s.18.2(2) denies a *proportion* of each interest and financing expense:
9013
- *
9014
- * (A − (B + C + D + E)) ÷ F
9015
- *
9016
- * A the taxpayer's interest and financing expenses for the year
9017
- * B the group-ratio amount under s.18.21(2) where that applies, otherwise
9018
- * **G × H** — the ratio of permissible expenses times adjusted taxable income
9019
- * C the taxpayer's interest and financing revenues for the year
9020
- * D received capacity, to the extent it exceeds the amount deductible under
9021
- * paragraph 111(1)(a.1)
9022
- * E absorbed capacity
9023
- * F ordinarily the same figure as A
9024
- *
9025
- * Because F is A in the ordinary case, the *amount* denied is simply
9026
- *
9027
- * denied = A − (B + C + D + E), floored at nil
9028
- *
9029
- * which is the form this module computes, while still reporting the proportion —
9030
- * the statute denies a fraction of *each* expense, and a preparer allocating the
9031
- * denial across expense lines needs the fraction rather than the total.
9032
- *
9033
- * ── The ratio of permissible expenses ───────────────────────────────────────
9034
- *
9035
- * Keyed off when the taxation year **BEGINS**, not when it ends:
9036
- *
9037
- * begins on or after 2023-10-01 and before 2024-01-01 → **40%**
9038
- * begins on or after 2024-01-01 → **30%**
9039
- *
9040
- * The 40% band is transitional and narrow — one quarter — and it does **not**
9041
- * apply when determining cumulative unused excess capacity for a year beginning
9042
- * on or after 1 January 2024. That carve-out is not modelled; excess-capacity
9043
- * carry-forward is a separate mechanism this module does not compute.
9044
- *
9045
- * ── What this module does NOT compute ───────────────────────────────────────
9046
- *
9047
- * **Adjusted taxable income** is an input, not a derivation. Its definition is a
9048
- * build-up from taxable income through a dozen add-backs and reductions —
9049
- * interest and financing expenses, capital cost allowance, resource deductions,
9050
- * loss claims with their own nested formulas — each with its own defined term. A
9051
- * partial implementation would produce a plausible number from an incomplete
9052
- * definition, which is precisely the failure this module was deferred to avoid.
9053
- * It is therefore **required**, and an absent one denies nothing while saying so.
9054
- *
9055
- * Likewise the group-ratio election under s.18.21, and the received/absorbed
9056
- * capacity amounts, which come from the excess-capacity regime.
9057
- *
9058
- * Source: `research/sources/legislation/ITA-section-18.2-EIFEL.txt`.
9059
- *
9060
- * Pure, whole dollars.
9061
- */
9062
- /** The ratio bands, keyed off the taxation year START. */
9063
- declare const EIFEL_TRANSITIONAL_RATIO = 0.4;
9064
- declare const EIFEL_STANDARD_RATIO = 0.3;
9065
- /** The regime's first day — years beginning before this are outside it. */
9066
- declare const EIFEL_FIRST_YEAR_START = "2023-10-01";
9067
- /** The transitional 40% band ends when years beginning in 2024 start. */
9068
- declare const EIFEL_STANDARD_RATIO_FROM = "2024-01-01";
9069
- interface EifelLimitationInput {
9070
- /** A — interest and financing expenses for the year. */
9071
- interestAndFinancingExpenses: number;
10293
+ provincialTax: number;
10294
+ }
10295
+ interface T2CifCertification {
10296
+ firstName: string;
10297
+ lastName: string;
10298
+ position: string;
10299
+ }
10300
+ /** Balance owing / refund settlement (lines 840 / 890 / 894). */
10301
+ interface T2CifSettlement {
10302
+ instalmentsPaid: number;
9072
10303
  /**
9073
- * Hadjusted taxable income. **Required**: the definition is a large build-up
9074
- * this module does not derive, and an absent one denies nothing rather than
9075
- * being assumed.
10304
+ * Line 890 **total credits**, amount B on page 9: every refundable credit
10305
+ * (780, 784, 788, 792, 795–798, 800, 808, 812) plus instalments at 840.
10306
+ * Optional because the caller does not always assemble the full credit stack.
9076
10307
  */
9077
- adjustedTaxableIncome?: number;
9078
- /** C — interest and financing revenues for the year. */
9079
- interestAndFinancingRevenues?: number;
10308
+ totalCredits?: number;
9080
10309
  /**
9081
- * D received capacity in excess of the amount deducted under paragraph
9082
- * 111(1)(a.1).
10310
+ * Amount A minus amount B. The form prints this WITHOUT a numbered box — one
10311
+ * signed balance, negative meaning a refund — so it carries no line number.
9083
10312
  */
9084
- excessReceivedCapacity?: number;
9085
- /** E absorbed capacity for the year. */
9086
- absorbedCapacity?: number;
10313
+ balanceOwing: number;
10314
+ /** The same balance when negative. No line number, for the same reason. */
10315
+ overpaymentRefund: number;
9087
10316
  /**
9088
- * Bthe group ratio amount under s.18.21(2), where the election was made.
9089
- * Supplying it REPLACES the ratio × adjusted taxable income computation, as the
9090
- * provision directs.
10317
+ * Line 894 **refund code**, a single digit directing what the CRA does with
10318
+ * an overpayment (refund it, or transfer it to the next instalment). A CODE,
10319
+ * never a dollar amount.
9091
10320
  */
9092
- groupRatioAmount?: number;
9093
- /** Taxation year start, ISO `YYYY-MM-DD` — selects the ratio band. */
9094
- taxYearStart: string;
10321
+ refundCode?: string;
9095
10322
  }
9096
- interface EifelLimitationResult {
9097
- /** G — the ratio of permissible expenses that applied. */
9098
- ratioOfPermissibleExpenses: number;
9099
- /** B — the permitted amount, however it was arrived at. */
9100
- permittedAmount: number;
9101
- /** Whether B came from the group ratio election rather than ratio × income. */
9102
- usedGroupRatio: boolean;
9103
- /** B + C + D + E — everything that shelters the expenses. */
9104
- totalShelter: number;
9105
- /** The amount denied, floored at nil. */
9106
- deniedAmount: number;
10323
+ interface T2GifiLine {
10324
+ code: string;
10325
+ amount: number;
10326
+ }
10327
+ /** GIFI Schedule 100 (balance sheet) / 125 (income statement) / 141 (notes). */
10328
+ interface T2CifGifi {
10329
+ schedule100: readonly T2GifiLine[];
10330
+ schedule125: readonly T2GifiLine[];
10331
+ notes?: {
10332
+ preparedByAccountant?: boolean;
10333
+ assuranceLevel?: string;
10334
+ notesIncluded?: boolean;
10335
+ };
10336
+ }
10337
+ interface T2CifAddress {
10338
+ line1?: string;
10339
+ city?: string;
10340
+ province?: string;
10341
+ postalCode?: string;
10342
+ country?: string;
10343
+ }
10344
+ /**
10345
+ * T2 jacket yes/no questionnaire (pages 2–3). The CRA line for each is in the
10346
+ * comment. A complete return serialises every applicable line even when the
10347
+ * answer is "No"; the answers drive which schedules CRA expects, so the host
10348
+ * cross-checks them against the attached schedules.
10349
+ */
10350
+ interface T2CifQuestionnaire {
10351
+ addressChanged?: boolean;
10352
+ firstYear?: boolean;
10353
+ finalReturn?: boolean;
10354
+ amalgamation?: boolean;
10355
+ windUp?: boolean;
10356
+ acquisitionOfControl?: boolean;
10357
+ deemedYearEnd?: boolean;
9107
10358
  /**
9108
- * The proportion of EACH expense that is denied. The statute denies a fraction
9109
- * of every interest and financing expense, so a preparer allocating the denial
9110
- * across expense lines needs this, not just the total.
10359
+ * 080 the form asks "Is the corporation a resident of Canada?", the
10360
+ * OPPOSITE of what the guided editor collects (`identification.nonResident`).
10361
+ * The service inverts it when building this field; there is no separate
10362
+ * "NonResident" jacket line to carry the un-inverted answer.
9111
10363
  */
9112
- deniedProportion: number;
9113
- /** Interest and financing expenses that remain deductible. */
9114
- deductibleAmount: number;
9115
- issues: string[];
10364
+ residentOfCanada?: boolean;
10365
+ professionalCorp?: boolean;
10366
+ inactive?: boolean;
10367
+ associated?: boolean;
10368
+ associatedClaimingExpenditureLimit?: boolean;
10369
+ relatedCorporations?: boolean;
10370
+ charitableDonations?: boolean;
10371
+ dividends?: boolean;
10372
+ claimingLosses?: boolean;
10373
+ provincialCreditOrMultiJurisdiction?: boolean;
10374
+ capitalGains?: boolean;
10375
+ investmentIncome?: boolean;
10376
+ manufacturingOrZetm?: boolean;
10377
+ investmentTaxCredit?: boolean;
10378
+ sredExpenditures?: boolean;
10379
+ foreignTaxCredits?: boolean;
10380
+ foreignAffiliates?: boolean;
10381
+ foreignPropertyOver100k?: boolean;
10382
+ nonArmsLengthNonResidentTransactions?: boolean;
10383
+ }
10384
+ interface T2CifShareholder {
10385
+ name: string;
10386
+ identifier?: string;
10387
+ commonPct?: number;
10388
+ preferredPct?: number;
10389
+ }
10390
+ /** Part I tax build-up (jacket) — reconciles to line 700. */
10391
+ interface T2CifPartI {
10392
+ basicTax: number;
10393
+ abatement: number;
10394
+ smallBusinessDeduction: number;
10395
+ generalRateReduction: number;
10396
+ }
10397
+ interface T2CifData {
10398
+ identity: T2CifIdentity;
10399
+ /** T2 jacket yes/no questionnaire (pages 2–3). */
10400
+ questionnaire?: T2CifQuestionnaire;
10401
+ /** GIFI financial statements (Schedule 100/125/141) — mandatory on a real filing. */
10402
+ gifi?: T2CifGifi;
10403
+ /** Schedule 50 — shareholders holding ≥10% (private corporations). */
10404
+ shareholders?: readonly T2CifShareholder[];
10405
+ schedule1?: T2CifSchedule1;
10406
+ capitalGains?: T2CifCapitalGains;
10407
+ cca?: T2CifCca;
10408
+ losses?: T2CifLosses;
10409
+ donations?: T2CifSchedule2;
10410
+ sbd?: T2CifSbd;
10411
+ zetm?: T2CifZetm;
10412
+ foreignTaxCredit?: T2CifForeignTaxCredit;
10413
+ sredItc?: T2CifSredItc;
10414
+ rdtoh?: T2CifRdtoh;
10415
+ grip?: T2CifGrip;
10416
+ provincial?: T2CifProvincial;
10417
+ taxableIncome: number;
10418
+ partIBuildUp?: T2CifPartI;
10419
+ partITax: number;
10420
+ /**
10421
+ * Part III.1 tax on an excessive eligible dividend designation — jacket 710.
10422
+ * Schedule 55. Included in `totalFederalTax`, so it MUST be disclosed here:
10423
+ * the jacket summary is an addition, and a 770 that exceeds the sum of its
10424
+ * components is an internally inconsistent return.
10425
+ */
10426
+ partIII1Tax?: number;
10427
+ /** Part VI.1 tax on taxable preferred share dividends — jacket 724. Schedule 43. */
10428
+ partVI1Tax?: number;
10429
+ /** Total FEDERAL tax net of credits + dividend refund (Part I + IV − refund − credits). */
10430
+ totalFederalTax?: number;
10431
+ totalTax: number;
10432
+ settlement?: T2CifSettlement;
10433
+ certification?: T2CifCertification;
9116
10434
  }
9117
10435
  /**
9118
- * The ratio of permissible expenses for a year beginning on `taxYearStart`.
9119
- * Returns 0 for a year beginning before the regime applies at all.
10436
+ * Render the T2 return. Pass `{ forFiling: true }` for a real transmission: it
10437
+ * makes the CRA-mandatory sections UNCONDITIONAL a missing GIFI balance sheet
10438
+ * (S100), income statement (S125), notes checklist (S141), head-office address,
10439
+ * or (for a private corporation) Schedule 50 THROWS rather than silently
10440
+ * omitting. A draft/preview (the default) renders whatever is present.
9120
10441
  */
9121
- declare function ratioOfPermissibleExpenses(taxYearStart: string): number;
9122
- declare function computeEifelLimitation(input: EifelLimitationInput): EifelLimitationResult;
10442
+ declare function renderT2DraftReturn(data: T2CifData, opts?: {
10443
+ forFiling?: boolean;
10444
+ }): string;
9123
10445
  //#endregion
9124
- //#region src/t2/schedules/part-vi-1-deduction.d.ts
10446
+ //#region src/t2/jacket/settlement.d.ts
9125
10447
  /**
9126
- * ITA paragraph 110(1)(k) the deduction against taxable income for Part VI.1 tax.
9127
- *
9128
- * Part VI.1 taxes dividends paid on taxable preferred shares (s.191.1(1)), and
9129
- * paragraph 110(1)(k) gives it back as a deduction in computing taxable income —
9130
- * a multiple of the tax, not the tax itself. Omitting it overstates taxable income
9131
- * by several times the Part VI.1 tax, which is why Schedule 43 has been returning
9132
- * `deductionPending` rather than a figure.
9133
- *
9134
- * The provision, verbatim:
9135
- *
9136
- * > the amount determined by multiplying the taxpayer's tax payable under
9137
- * > subsection 191.1(1) for the year by
9138
- * > (i) if the taxation year ends before 2010, 3,
9139
- * > (ii) if the taxation year ends after 2009 and before 2012, 3.2, and
9140
- * > (iii) if the taxation year ends after 2011, 3.5.
9141
- *
9142
- * Two things worth pinning down, because both are easy to get wrong:
10448
+ * T2 jacketbalance owing / refund settlement (the bottom of page 8).
9143
10449
  *
9144
- * The multiple keys off the taxation year **END**, not its beginning, and not
9145
- * the date the dividend was paid.
9146
- * • The bands are not a rate change applied prospectively — a year ending in
9147
- * 2011 uses 3.2 for the whole year.
10450
+ * A complete return must reconcile total tax payable down to what the
10451
+ * corporation actually owes or is refunded:
9148
10452
  *
9149
- * The multiple has stood at 3.5 since 2012. It is modelled as a band table
9150
- * anyway, because prior-year returns and amendments are in scope and a hard-coded
9151
- * 3.5 silently misstates a 2010 amendment by 15%.
10453
+ * balance owing = max(0, total tax payable instalments/payments)
10454
+ * overpayment/refund = max(0, instalments/payments total tax payable)
9152
10455
  *
9153
- * Source: `research/sources/legislation/ITA-section-110-deductions.txt`.
10456
+ * NEITHER figure has its own printed line number. Line 890 is "Total
10457
+ * credits" (Amount B, the SUM of every credit line INCLUDING 840, not the
10458
+ * net balance), and line 894 is a single-digit "Refund code" choosing what
10459
+ * happens to an overpayment — never a dollar amount. `jacket.ts`'s own
10460
+ * FormDefinition documents this explicitly on line 890's field: "the form
10461
+ * prints [the balance] without a numbered box... must never be filed
10462
+ * against 890, which would report it as credits claimed." An earlier
10463
+ * version of this module's own doc comments made exactly that mistake —
10464
+ * fixed here to match.
9154
10465
  *
9155
- * Pure, whole dollars.
10466
+ * `totalTaxPayable` here is the engine's tax figure, already NET of the dividend
10467
+ * refund and refundable credits it folds in (so those are not subtracted again).
10468
+ * `instalmentsPaid` (line 840) is a PAYMENT record supplied by the host — it is
10469
+ * not a computed tax value, so it stays a caller input. Whole dollars.
9156
10470
  */
9157
- /** The s.110(1)(k) multiple, by taxation year end. Ascending. */
9158
- interface PartVI1DeductionBand {
9159
- /** The multiple applies to a year ending on or after this date. */
9160
- readonly from: string;
9161
- readonly multiple: number;
10471
+ interface T2SettlementInput {
10472
+ /** Total tax payable (line 770), net of refundable credits per the engine. */
10473
+ totalTaxPayable: number;
10474
+ /** Tax paid by instalments and other payments during the year (line 840). */
10475
+ instalmentsPaid?: number;
9162
10476
  }
9163
- declare const PART_VI_1_DEDUCTION_BANDS: readonly PartVI1DeductionBand[];
9164
- interface PartVI1DeductionResult {
9165
- /** The Part VI.1 tax the deduction is computed on. */
9166
- partVI1Tax: number;
9167
- /** The statutory multiple that applied. */
9168
- multiple: number;
9169
- /** The paragraph 110(1)(k) deduction against taxable income. */
9170
- deduction: number;
9171
- issues: string[];
10477
+ interface T2SettlementResult {
10478
+ totalTaxPayable: number;
10479
+ instalmentsPaid: number;
10480
+ /** Balance unpaid. No line number — see this module's own doc comment. */
10481
+ balanceOwing: number;
10482
+ /** Overpayment refundable to the corporation. No line number — see this module's own doc comment. */
10483
+ overpaymentRefund: number;
9172
10484
  }
9173
- /** The multiple in force for a taxation year ending on `taxYearEnd`. */
9174
- declare function partVI1DeductionMultiple(taxYearEnd: string, bands?: readonly PartVI1DeductionBand[]): number;
9175
- /**
9176
- * The paragraph 110(1)(k) deduction.
9177
- *
9178
- * An unreadable year end yields nil and says so, rather than defaulting to the
9179
- * current multiple — guessing the year would misstate taxable income, and this
9180
- * deduction is large relative to the tax it follows.
9181
- */
9182
- declare function computePartVI1Deduction(partVI1Tax: number, taxYearEnd: string, bands?: readonly PartVI1DeductionBand[]): PartVI1DeductionResult;
10485
+ declare function computeT2Settlement(input: T2SettlementInput): T2SettlementResult;
9183
10486
  //#endregion
9184
10487
  //#region src/t2/schedules/schedule27-mp.d.ts
9185
10488
  /**
@@ -9289,6 +10592,71 @@ interface MpDeductionResult {
9289
10592
  grossRevenueRatio?: number;
9290
10593
  issues: string[];
9291
10594
  }
10595
+ /** The $200,000 combined-active-business-income ceiling, s.5201 of the Regulations. */
10596
+ declare const SMALL_MANUFACTURER_INCOME_THRESHOLD = 200000;
10597
+ interface SmallManufacturerTestInput {
10598
+ /** Line 100 — this corp's active business income minus active business losses (incl. partnership share). */
10599
+ activeBusinessIncome: number;
10600
+ /** Line 105 — active business income of associated Canadian corporations, for the $200,000 gate only. */
10601
+ associatedActiveBusinessIncome?: number;
10602
+ /** Requirement 1 — activities during the year were PRIMARILY M&P in Canada. */
10603
+ primarilyManufacturing: boolean;
10604
+ /** Requirement 3 — disqualifies outright, same list as `computeMpDeduction`'s `excludedActivity`. */
10605
+ excludedActivity?: (typeof MP_EXCLUDED_ACTIVITIES)[number];
10606
+ /** Requirement 4 — any active business carried on outside Canada during the year. */
10607
+ activeBusinessOutsideCanada?: boolean;
10608
+ }
10609
+ interface SmallManufacturerTestResult {
10610
+ /** All four requirements met. */
10611
+ qualifies: boolean;
10612
+ /** Line 110 — line 100 + line 105, tested against the $200,000 ceiling. */
10613
+ combinedActiveBusinessIncome: number;
10614
+ /** Line 200 (via Part 1): line 100 alone when qualifying, else 0 — use Part 2 instead. */
10615
+ canadianMPProfits: number;
10616
+ issues: string[];
10617
+ }
10618
+ declare function computeSmallManufacturerTest(input: SmallManufacturerTestInput): SmallManufacturerTestResult;
10619
+ interface Part2MPProfitsInput {
10620
+ /** Part 3, line 130 — adjusted business income (already net of the resource-income adjustment, if any). */
10621
+ adjustedBusinessIncome: number;
10622
+ /** Part 4, line 140 — cost of capital (C). */
10623
+ costOfCapital: number;
10624
+ /** Part 5, line 150 — cost of manufacturing and processing capital (MC), already capped at C. */
10625
+ costOfMPCapital: number;
10626
+ /** Part 6, line 160 — cost of labour (L). */
10627
+ costOfLabour: number;
10628
+ /** Part 7, line 170 — cost of manufacturing and processing labour (ML), already capped at L. */
10629
+ costOfMPLabour: number;
10630
+ }
10631
+ interface Part2MPProfitsResult {
10632
+ /** (MC + ML) / (C + L) — the fraction of "capital + labour" devoted to M&P. */
10633
+ ratio: number;
10634
+ /** Line 200 (via Part 2): ADJUBI × ratio, rounded, floored at 0. */
10635
+ canadianMPProfits: number;
10636
+ issues: string[];
10637
+ }
10638
+ declare function computePart2MPProfits(input: Part2MPProfitsInput): Part2MPProfitsResult;
10639
+ interface CanadianMPProfitsInput {
10640
+ /** Test Part 1 eligibility first — omit if the corporation obviously doesn't qualify (large ABI, etc.). */
10641
+ smallManufacturer?: SmallManufacturerTestInput;
10642
+ /** Used when `smallManufacturer` is omitted, or Part 1 doesn't qualify. */
10643
+ part2?: Part2MPProfitsInput;
10644
+ }
10645
+ interface CanadianMPProfitsResult {
10646
+ /** Which Part actually produced `canadianMPProfits` — undefined if neither input was usable. */
10647
+ method?: 'part1' | 'part2';
10648
+ /** Line 200 — feeds `MpDeductionInput.manufacturingAndProcessingProfits`. */
10649
+ canadianMPProfits: number;
10650
+ smallManufacturerTest?: SmallManufacturerTestResult;
10651
+ part2Result?: Part2MPProfitsResult;
10652
+ issues: string[];
10653
+ }
10654
+ /**
10655
+ * "Small manufacturing corporations that meet all requirements in Part 1
10656
+ * should begin with Part 1 ... all other corporations should begin with
10657
+ * Part 2" — the form's own routing (page 1), reproduced here.
10658
+ */
10659
+ declare function computeCanadianMPProfits(input: CanadianMPProfitsInput): CanadianMPProfitsResult;
9292
10660
  declare function computeMpDeduction(input: MpDeductionInput, rates?: MpDeductionRates): MpDeductionResult;
9293
10661
  //#endregion
9294
- export { QuebecTaxResult as $, computeAlbertaSchedule15 as $a, AlbertaSchedule18Result as $c, CcogpeSuccessorFederal as $i, leaseholdPeriods as $l, mealsAndEntertainmentAddBack as $n, computeAlbertaSchedule6 as $o, Schedule12Adjustment as $r, schedule18Values as $s, ItcRecaptureItem as $t, T2CifGifi as A, EdaRegularFederal as Aa, NonCapitalLossByYearOfOriginInput as Ac, At1CriticalFieldMissingError as Ai, Schedule8Entry as Al, Schedule4Input as An, allocateSchedule9ExpenditureLimit as Ao, PartITaxResult as Ar, Schedule3Result as As, computeSchedule55 as At, computeDayWeightedGeneralTax as Au, Co17Certification as B, FedeSuccessorFederal as Ba, computeLimitedPartnershipLossRow as Bc, at1YesNo as Bi, Class141AdditionalAllowanceInput as Bl, computeSchedule2 as Bn, AlbertaSchedule7Result as Bo, CORP_TAX_RATE_BOOK as Br, Schedule10FilingInput as Bs, computeGrip as Bt, latestRateYear as Bu, FOREIGN_TAX_CREDIT_GROSS_UP as C, CfreCountrySuccessorFederal as Ca, computeIegReductionFactor as Cc, formatRsiDate as Ci, AlbertaSchedule13Input as Cl, Schedule5Result as Cn, AlbertaSchedule9Input as Co, computeTaxableIncome as Cr, CapitalInvestmentTaxCreditInput as Cs, computeSchedule101 as Ct, AlbertaCorporationStatus as Cu, computeT2Settlement as D, CmedbFederal as Da, iegT661SourceLine as Dc, renderRsiLineItem as Di, CcaClassInput as Dl, ProvincialAllocationInput as Dn, Schedule9AllocationResult as Do, CcpcActiveBusinessTaxInput as Dr, MaximumAllowableDeductionInput as Ds, normalizeSchedule88 as Dt, AB_GENERAL_RATE_BANDS as Du, T2SettlementResult as E, CfreCountrySuccessorResult as Ea, computeIegEligibleExpenditures as Ec, renderRsiHeader as Ei, computeAlbertaSchedule13 as El, PermanentEstablishment as En, Schedule9AllocationMemberResult as Eo, nonCapitalLossApplied as Er, InvestorTaxCreditResult as Es, Schedule88Result as Et, computeAlbertaSbd as Eu, T2GifiLine as F, EdaSuccessorResult as Fa, computeNonCapitalLossByYearOfOrigin as Fc, albertaBalanceUnpaid as Fi, computeSchedule8$1 as Fl, Part4RdtohResult as Fn, Schedule8Input as Fo, SbdInput as Fr, computeAllocationFactor as Fs, Schedule54Input as Ft, RateBook as Fu, co17Engine as G, SfedeCountryRegularFederal as Ga, DonationMaximumResult as Gc, AlbertaReturnResult as Gi, Class14Result as Gl, Schedule1Result as Gn, computeAlbertaSchedule7 as Go, computeLossSchedule as Gr, Schedule2FilingInput as Gs, LARGE_CORPORATION_THRESHOLD as Gt, Co17ReturnData as H, FedeSuccessorOverride as Ha, AT1_DONATION_GAIN_RATE as Hc, At1ReturnInput as Hi, Class14Input as Hl, Schedule1Line as Hn, RoyaltySupplementalPartnershipResult as Ho, resolveCorpTaxRates as Hr, Schedule1FilingInput as Hs, Schedule43Rates as Ht, renderT2DraftReturn as I, FedeRegularFederal as Ia, computeOtherLossByYearOfOrigin as Ic, assertAt1MandatoryComplete as Ii, CLASS_14_1_MINIMUM_DEDUCTION as Il, REFUNDABLE_PART_I_RATE as In, Schedule8Result as Io, SbdResult as Ir, AT1_SCHEDULES_WITHOUT_BUILDERS as Is, Schedule54Result as It, RateBookEntry as Iu, computeQuebecReturn as J, SfedeCountryRegularResult as Ja, Schedule20Input as Jc, AlbertaSchedule15Result as Ji, MAX_LEASEHOLD_PERIODS as Jl, ccaDeduction as Jn, AlbertaSchedule6Result as Jo, CEC_DEDUCTION_RATE as Jr, schedule12LossDeductions as Js, computeTaxableCapital as Jt, QuebecReturnInput as K, SfedeCountryRegularInput as Ka, computeDonationMaximum as Kc, computeAlbertaReturn as Ki, LeaseholdLayer as Kl, amortizationAddBack as Kn, schedule7Values as Ko, AlbertaSchedule14Input as Kr, at1LineItemId as Ks, TaxableCapitalInput as Kt, T2ReturnInput as L, FedeRegularInput as La, LimitedPartnershipLossRow as Lc, assertAt1TaxPayableReconciles as Li, CLASS_14_1_TRANSITIONAL_RATE as Ll, computePart4Rdtoh as Ln, computeSchedule8 as Lo, computeBusinessLimit as Lr, AT1_SCHEDULES_WITH_BUILDERS as Ls, computeSchedule54 as Lt, earliestRateYear as Lu, T2CifQuestionnaire as M, EdaRegularResult as Ma, OtherLossByYearOfOriginResult as Mc, At1MandatoryFieldMissingError as Mi, UnsupportedCcaClassError as Ml, computeSchedule4Losses as Mn, computeSchedule9MaximumExpenditureLimit as Mo, computePartITax as Mr, schedule3Values as Ms, LRIP_INVESTMENT_INCOME_FACTOR as Mt, AB_TAX_RATE_BOOK as Mu, T2CifSettlement as N, EdaSuccessorFederal as Na, OtherLossVintageEntry as Nc, At1TaxPayableMismatchError as Ni, computeCcaClass as Nl, PART_IV_RATE as Nn, schedule9Values as No, BusinessLimitInput as Nr, AllocationFactorInput as Ns, LripDividendEvent as Nt, AlbertaTaxRates as Nu, T2CifAddress as O, CmedbInput as Oa, LossVintageEntry as Oc, renderAt1NetFile as Oi, CcaClassResult as Ol, ProvincialAllocationResult as On, Schedule9FieldOfScience as Oo, CcpcActiveBusinessTaxResult as Or, MaximumAllowableDeductionResult as Os, Schedule55Input as Ot, DayWeightedRateResult as Ou, T2CifShareholder as P, EdaSuccessorInput as Pa, OtherLossVintageRowResult as Pc, At1TransmitterInfo as Pi, computeCcaSchedule as Pl, Part4RdtohInput as Pn, PoliticalContributionInput as Po, BusinessLimitResult as Pr, SINGLE_JURISDICTION_ALBERTA_FACTOR as Ps, LripEventResult as Pt, resolveAlbertaTaxRates as Pu, QuebecTaxInput as Q, SfedeCountrySuccessorResult as Qa, AlbertaSchedule18Input as Qc, CcogpeRegularResult as Qi, computeClass141AdditionalAllowance as Ql, incomeTaxProvisionAddBack as Qn, RoyaltyTaxCreditShelterAllocationResult as Qo, computeAlbertaSchedule14 as Qr, schedule17Values as Qs, ITC_RECAPTURE_PERIOD_YEARS as Qt, t2Engine as R, FedeRegularOverride as Ra, LimitedPartnershipLossRowResult as Rc, assertCriticalFields as Ri, Class13Input as Rl, Schedule2Input as Rn, schedule8Values as Ro, computeSBD as Rr, At1ScheduleData as Rs, GripInput as Rt, extendRateBook as Ru, AdjustedTaxableIncomeResult as S, CfreCountryRegularResult as Sa, computeIegBaseAmount as Sc, formatRsiAmount as Si, AlbertaSchedule13ClassResult as Sl, Schedule5Input as Sn, ALBERTA_SRED_TAX_CREDIT_RATE as So, charitableDonationsDeduction as Sr, At1ScheduleValueLike$6 as Ss, Schedule101Result as St, computeAlbertaTax as Su, T2SettlementInput as T, CfreCountrySuccessorOverride as Ta, IegEligibleExpendituresResult as Tc, renderAt1Rsi as Ti, FederalCcaClass as Tl, AllocatedProvince as Tn, Schedule9AllocationMember as To, netCapitalLossApplied as Tr, InvestorTaxCreditInput as Ts, Schedule88Input as Tt, AlbertaSbdResult as Tu, renderCo17DraftReturn as U, FedeSuccessorResult as Ua, AT1_DONATION_INCOME_RATE as Uc, at1Engine as Ui, Class14Property as Ul, Schedule1LineDefect as Un, RoyaltySupplementalPriorYearAdjustment as Uo, LossScheduleInput as Ur, Schedule20FilingInput as Us, Schedule43Result as Ut, Co17Identity as V, FedeSuccessorInput as Va, computeLimitedPartnershipLosses as Vc, xmlEscape as Vi, Class141AdditionalAllowanceResult as Vl, Schedule1Input as Vn, RoyaltySupplementalPartnership as Vo, CorpTaxRates as Vr, Schedule12FilingInput as Vs, Schedule43Input as Vt, resolveRates as Vu, Co17ReturnInput as W, Schedule15FilingResult as Wa, DonationMaximumInput as Wc, AlbertaReturnInput as Wi, Class14PropertyResult as Wl, Schedule1NotFileableError as Wn, RoyaltySupplementalPriorYearAdjustmentResult as Wo, LossScheduleResult as Wr, Schedule21FilingInput as Ws, computeSchedule43 as Wt, QuebecEstablishment as X, SfedeCountrySuccessorInput as Xa, computeSchedule20 as Xc, CcogpeRegularInput as Xi, computeClass13 as Xl, deferredIncomeTaxProvisionAddBack as Xn, RoyaltyTaxCreditQuarter as Xo, CecIncomeInclusionDetail as Xr, schedule13Values as Xs, Schedule31Result as Xt, QuebecAllocationResult as Y, SfedeCountrySuccessorFederal as Ya, Schedule20Result as Yc, CcogpeRegularFederal as Yi, MIN_LEASEHOLD_PERIODS as Yl, computeSchedule1 as Yn, RoyaltyTaxCreditLongestAssociatedYear as Yo, CEC_INCLUSION_RATE as Yr, schedule12Values as Ys, Schedule31Input as Yt, computeQuebecAllocationFactor as Z, SfedeCountrySuccessorOverride as Za, AT1_DISPOSITION_CATEGORIES as Zc, CcogpeRegularOverride as Zi, computeClass14 as Zl, findSchedule1LineDefects as Zn, RoyaltyTaxCreditShelterAllocation as Zo, cecScheduleAppliesToTaxYear as Zr, schedule16Values as Zs, computeSchedule31 as Zt, EifelLimitationInput as _, CeeSuccessorOverride as _a, computeIegGroupFigures as _c, RSI_WORD_GAP as _i, AlbertaSchedule16Input as _l, computeSchedule13 as _n, Schedule11Result as _o, isSchedule5Province as _r, AgriProcessingTaxCreditInput as _s, FederalT2Input as _t, LossCarrybackResult as _u, MpDeductionRates as a, CdeRegularOverride as aa, schedule4970Values as ac, albertaCcaDifference as ai, SECTION_34_2_GROSS_UP as al, computeZetm as an, computeCeeSuccessor as ao, EifelResult as ar, At1Schedule5SuccessoredPoolEntry as as, T2_CERTIFICATION_FIXTURES as at, At4970Input as au, ratioOfPermissibleExpenses as b, CfreCountryRegularInput as ba, IegResult as bc, RsiLineItemError as bi, computeAlbertaSchedule16 as bl, Schedule6Result as bn, ALBERTA_SRED_EXPENDITURE_CUTOFF as bo, TaxableIncomeLine as br, AgriProcessingVintageResult as bs, FirstReturnEvent as bt, AlbertaTaxInput as bu, PART_VI_1_DEDUCTION_BANDS as c, CdeSuccessorInput as ca, IegAgreementMemberResult as cc, albertaDispositionAdjustments as ci, AT1_RESERVE_LINES as cl, BusinessLimitAllocationInput as cn, computeCmedb as co, ProvincialRateChange as cr, schedule5Values as cs, ConformanceSummary as ct, At4970ProjectRowResult as cu, computePartVI1Deduction as d, CeeRegularFederal as da, IegGroupMember as dc, albertaTerminalLossDifference as di, AlbertaSchedule17Result as dl, computeBusinessLimitAllocation as dn, computeFedeRegular as do, dayWeightedRate as dr, Schedule4Input$1 as ds, T2LineKey as dt, computeAt4970 as du, CcogpeSuccessorInput as ea, schedule1Values as ec, Schedule12Input as ei, At1AbilEntry as el, ItcRecaptureItemResult as en, computeCcogpeRegular as eo, recaptureAddBack as er, schedule6Values as es, computeQuebecTax as et, CCA_DECLINING_BALANCE_RATES_2024 as eu, partVI1DeductionMultiple as f, CeeRegularInput as fa, IegGroupResult as fc, computeSchedule12 as fi, At1ReserveBalances as fl, Schedule21Input as fn, computeFedeSuccessor as fo, PROVINCE_RATES_2024 as fr, Schedule4Result$1 as fs, T2_LINE_META as ft, LossContinuityInput as fu, EIFEL_TRANSITIONAL_RATIO as g, CeeSuccessorInput as ga, computeIegAgreement as gc, RSI_NEGATIVE_PREFIX as gi, computeAlbertaSchedule17 as gl, ReserveContinuityRow as gn, Schedule11Input as go, ProvincialRate as gr, AgriProcessingCurrentYearInput as gs, runConformanceSuite as gt, LossCarrybackInput as gu, EIFEL_STANDARD_RATIO_FROM as h, CeeSuccessorFederal as ha, allocateIegExpenditureLimit as hc, RSI_DELIMITER as hi, At1ReserveTable as hl, ReserveContinuityResult as hn, schedule15Values as ho, ProvinceRateTable as hr, AgriProcessingCombinedVintageInput as hs, runConformance as ht, LossCarrybackError as hu, MpDeductionInput as i, CdeRegularInput as ia, schedule2Values as ic, albertaCapitalGainDifference as ii, At1DispositionCategory as il, ZetmResult as in, computeCeeRegular as io, EifelInput as ir, At1Schedule5PredecessorTransfer as is, resolveQuebecTaxRates as it, resolveCcaRates as iu, T2CifPartI as j, EdaRegularInput as ja, NonCapitalLossByYearOfOriginResult as jc, At1FilingData as ji, Schedule8Result$1 as jl, Schedule4Result as jn, computeAlbertaSchedule9 as jo, computeCcpcActiveBusinessTax as jr, computeSchedule3 as js, LRIP_INVESTMENT_CORPORATION_MULTIPLE as jt, AB_TAX_2024 as ju, T2CifData as k, CmedbResult as ka, LossVintageRowResult as kc, AT1_CRITICAL_MANDATORY_FIELDS as ki, CcaScheduleResult as kl, computeProvincialAllocation as kn, Schedule9GroupFilingInput as ko, PartITaxInput as kr, Schedule3Input as ks, Schedule55Result as kt, GeneralRateBand as ku, PartVI1DeductionBand as l, CdeSuccessorOverride as la, IegAgreementResult as lc, albertaRecaptureDifference as li, AT1_RESERVE_TOTAL_LINES as ll, BusinessLimitAllocationResult as ln, computeEdaRegular as lo, ProvincialRateChanges as lr, ForeignInvestmentCountryInput as ls, ExpectedSource as lt, At4970Result as lu, EIFEL_STANDARD_RATIO as m, CeeRegularResult as ma, allocateIegEvenly as mc, RSI_COLUMN_GAP as mi, At1ReserveRowResult as ml, computeSchedule21 as mn, computeSfedeCountrySuccessor as mo, ProvinceCode as mr, schedule4Values as ms, formatConformanceReport as mt, computeLossContinuity as mu, MP_GROSS_REVENUE_THRESHOLD as n, CcogpeSuccessorResult as na, schedule21Values as nc, Schedule12Result as ni, At1CategoryResult as nl, computeItcRecapture as nn, computeCdeRegular as no, EIFEL_EFFECTIVE_FROM as nr, AlbertaSchedule5Result as ns, QC_TAX_RATE_BOOK as nt, CcaRateTable as nu, MpDeductionResult as o, CdeRegularResult as oa, IegAgreementInput as oc, albertaCcaScheduleAdjustments as oi, computeAlbertaSchedule18 as ol, AssociatedMemberInput as on, computeCfreRegular as oo, EifelThresholds as or, At1Schedule5SuccessoredPoolEntryResult as os, CertificationFixture as ot, At4970JurisdictionAmount as ou, EIFEL_FIRST_YEAR_START as p, CeeRegularOverride as pa, IegLimitAllocation as pc, reconcileAlbertaNetIncome as pi, At1ReserveKind as pl, Schedule21Result as pn, computeSfedeCountryRegular as po, PROVINCE_RATE_BOOK as pr, computeSchedule4 as ps, foldT2Lines as pt, LossContinuityResult as pu, QuebecReturnResult as q, SfedeCountryRegularOverride as qa, AlbertaGiftCarryforward as qc, AlbertaSchedule15Input as qi, LeaseholdLayerResult as ql, assertSchedule1Fileable as qn, AlbertaSchedule6Input as qo, AlbertaSchedule14Result as qr, schedule10Values as qs, TaxableCapitalResult as qt, MP_RATES_2024 as r, CdeRegularFederal as ra, schedule29Values as rc, albertaAbilDifference as ri, At1CategoryTotals as rl, ZetmInput as rn, computeCdeSuccessor as ro, EifelExemption as rr, At1Schedule5PoolTransfer as rs, QuebecTaxRates as rt, isDecliningBalanceClass as ru, computeMpDeduction as s, CdeSuccessorFederal as sa, IegAgreementMember as sc, albertaCurrentYearLoss as si, AT1_RESERVE_KINDS as sl, AssociatedMemberResult as sn, computeCfreSuccessor as so, assessEifel as sr, computeAlbertaSchedule5 as ss, ConformanceResult as st, At4970ProjectRow as su, MP_EXCLUDED_ACTIVITIES as t, CcogpeSuccessorOverride as ta, schedule20Values as tc, Schedule12Line as ti, At1AbilResult as tl, ItcRecaptureResult as tn, computeCcogpeSuccessor as to, terminalLossDeduction as tr, AlbertaSchedule5Input as ts, QC_TAX_2024 as tt, CCA_RATE_BOOK as tu, PartVI1DeductionResult as u, CdeSuccessorResult as ua, IegAllocationResult as uc, albertaReserveDifference as ui, AlbertaSchedule17Input as ul, allocateEvenly as un, computeEdaSuccessor as uo, blendProvinceRateTable as ur, ForeignInvestmentCountryResult as us, LineCheck as ut, At4970Totals as uu, EifelLimitationResult as v, CeeSuccessorResult as va, IEG_2024 as vc, RsiHeaderInput as vi, AlbertaSchedule16Result as vl, CapitalDisposition as vn, computeSchedule11 as vo, resolveProvinceRates as vr, AgriProcessingTaxCreditResult as vs, FederalT2Result as vt, LossCarrybackYear as vu, computeAdjustedTaxableIncome as w, CfreCountrySuccessorInput as wa, IegEligibleExpendituresInput as wc, formatRsiText as wi, AlbertaSchedule13Result as wl, computeSchedule5 as wn, AlbertaSchedule9Result as wo, dividendsDeductibleS112 as wr, CapitalInvestmentTaxCreditResult as ws, SCHEDULE_88_MAX_URLS as wt, AlbertaSbdInput as wu, AdjustedTaxableIncomeInput as x, CfreCountryRegularOverride as xa, computeIeg as xc, RsiScheduleInput as xi, AlbertaCcaOverride as xl, computeSchedule6 as xn, ALBERTA_SRED_PROGRAM_START as xo, TaxableIncomeResult as xr, At1ScheduleDataLike$6 as xs, Schedule101Input as xt, AlbertaTaxResult as xu, computeEifelLimitation as y, CfreCountryRegularFederal as ya, IegInput as yc, RsiLineItem as yi, assistanceFrom as yl, DispositionResult as yn, schedule11Values as yo, TaxableIncomeInput as yr, AgriProcessingVintageInput as ys, computeFederalT2 as yt, computeLossCarryback as yu, Co17Address as z, FedeRegularResult as za, LimitedPartnershipLossesResult as zc, at1TaxPayableDeductions as zi, Class13Result as zl, Schedule2Result as zn, AlbertaSchedule7Input as zo, CORP_TAX_2024 as zr, At1ScheduleValue as zs, GripResult as zt, hasExactRateYear as zu };
10662
+ export { CertificationFixture as $, RsiScheduleInput as $a, InvestorTaxCreditInput as $c, computeLossCarryback as $d, AdjustedAggregateInvestmentIncomeResult as $i, IegEligibleExpendituresResult as $l, Schedule2Input as $n, CfreCountryRegularOverride as $o, computeBorrowings as $r, Schedule9AllocationMember as $s, AssociatedMemberInput as $t, AlbertaSchedule13ClassResult as $u, T2ReturnInput as A, albertaCurrentYearLoss as Aa, AlbertaSchedule5Result as Ac, computeClass14 as Ad, dayWeightedRate as Ai, schedule21Values$1 as Al, computeForeignExploration as An, CcogpeRegularResult as Ao, BorrowingRow as Ar, SfedeCountrySuccessorResult as As, computeSchedule54 as At, AlbertaSchedule18Result as Au, QuebecReturnResult as B, assertAt1TransmitterValid as Ba, Schedule4Result$1 as Bc, At4970JurisdictionAmount as Bd, TaxableIncomeResult as Bi, IegGroupResult as Bl, AllocatedProvince as Bn, CdeSuccessorInput as Bo, InterestAndFinancingExpensesInput as Br, computeCmedb as Bs, TaxableCapitalResult as Bt, AT1_RESERVE_TOTAL_LINES as Bu, T2CifGifi as C, Schedule12Input as Ca, RoyaltyTaxCreditLongestAssociatedYear as Cc, Class14PropertyResult as Cd, AdjustedTaxableIncomeInput as Ci, schedule12Values as Cl, Schedule12ResourceDeductionsInput as Cn, AlbertaReturnResult as Co, EIFEL_STANDARD_RATIO as Cr, SfedeCountryRegularFederal as Cs, computeSchedule55 as Ct, computeDonationMaximum as Cu, T2CifShareholder as D, albertaCapitalGainDifference as Da, computeAlbertaSchedule6 as Dc, MAX_LEASEHOLD_PERIODS as Dd, ProvincialRateChange as Di, schedule18Values as Dl, computeCogpe as Dn, CcogpeRegularFederal as Do, EifelLimitationResult as Dr, SfedeCountrySuccessorFederal as Ds, LripEventResult as Dt, computeSchedule20 as Du, T2CifSettlement as E, albertaAbilDifference as Ea, RoyaltyTaxCreditShelterAllocationResult as Ec, LeaseholdLayerResult as Ed, computeAdjustedTaxableIncome as Ei, schedule17Values as El, computeCee as En, AlbertaSchedule15Result as Eo, EifelLimitationInput as Er, SfedeCountryRegularResult as Es, LripDividendEvent as Et, Schedule20Result as Eu, Co17ReturnData as F, albertaTerminalLossDifference as Fa, computeAlbertaSchedule5 as Fc, CCA_RATE_BOOK as Fd, ProvincialRate as Fi, IegAgreementMember as Fl, Schedule6Result as Fn, CdeRegularFederal as Fo, Clause95IncludedRow as Fr, computeCdeSuccessor as Fs, Schedule43Rates as Ft, At1DispositionCategory as Fu, QuebecTaxInput as G, toRsiSchedule as Ga, AgriProcessingTaxCreditInput as Gc, computeAt4970 as Gd, nonCapitalLossApplied as Gi, computeIegGroupFigures as Gl, Schedule4Input as Gn, CeeRegularOverride as Go, LoansResult as Gr, computeSfedeCountryRegular as Gs, ITC_RECAPTURE_PERIOD_YEARS as Gt, At1ReserveRowResult as Gu, QuebecAllocationResult as H, toRsiHeader as Ha, schedule4Values as Hc, At4970ProjectRowResult as Hd, computeTaxableIncome as Hi, allocateIegEvenly as Hl, ProvincialAllocationInput as Hn, CdeSuccessorResult as Ho, InterestAndFinancingRevenuesInput as Hr, computeEdaSuccessor as Hs, Schedule31Input as Ht, AlbertaSchedule17Result as Hu, renderCo17DraftReturn as I, computeSchedule12 as Ia, schedule5Values as Ic, CcaRateTable as Id, isSchedule5Province as Ii, IegAgreementMemberResult as Il, computeSchedule6 as In, CdeRegularInput as Io, Clause95Result as Ir, computeCeeRegular as Is, Schedule43Result as It, SECTION_34_2_GROSS_UP as Iu, QC_TAX_2024 as J, RSI_NEGATIVE_PREFIX as Ja, AgriProcessingVintageResult as Jc, computeLossContinuity as Jd, PartITaxInput as Ji, IegResult as Jl, PART_IV_RATE as Jn, CeeSuccessorInput as Jo, PartnershipIfeResult as Jr, ALBERTA_SRED_EXPENDITURE_CUTOFF as Js, ItcRecaptureResult as Jt, AlbertaSchedule16Input as Ju, QuebecTaxResult as K, RSI_COLUMN_GAP as Ka, AgriProcessingTaxCreditResult as Kc, LossContinuityInput as Kd, CcpcActiveBusinessTaxInput as Ki, IEG_2024 as Kl, Schedule4Result as Kn, CeeRegularResult as Ko, LossPortionFromIfeResult as Kr, computeSfedeCountrySuccessor as Ks, ItcRecaptureItem as Kt, At1ReserveTable as Ku, Co17ReturnInput as L, reconcileAlbertaNetIncome as La, ForeignInvestmentCountryInput as Lc, isDecliningBalanceClass as Ld, resolveProvinceRates as Li, IegAgreementResult as Ll, Schedule5Input as Ln, CdeRegularOverride as Lo, EifelCounterpartyRelationship as Lr, computeCeeSuccessor as Ls, computeSchedule43 as Lt, computeAlbertaSchedule18 as Lu, Co17Address as M, albertaRecaptureDifference as Ma, At1Schedule5PredecessorTransfer as Mc, computeClass141RecaptureReduction as Md, PROVINCE_RATE_BOOK as Mi, schedule2Values$1 as Ml, computeSpecifiedForeignExploration as Mn, CcogpeSuccessorInput as Mo, CapitalizedIfeResult as Mr, computeCcogpeRegular as Ms, GripResult as Mt, At1AbilResult as Mu, Co17Certification as N, albertaReserveDifference as Na, At1Schedule5SuccessoredPoolEntry as Nc, leaseholdPeriods as Nd, ProvinceCode as Ni, schedule4970Values as Nl, CapitalDisposition as Nn, CcogpeSuccessorOverride as No, CapitalizedIfeRow as Nr, computeCcogpeSuccessor as Ns, computeGrip as Nt, At1CategoryResult as Nu, T2GifiLine as O, albertaCcaDifference as Oa, schedule6Values as Oc, MIN_LEASEHOLD_PERIODS as Od, ProvincialRateChanges as Oi, schedule1Values$1 as Ol, computeCumulativeForeignResource as On, CcogpeRegularInput as Oo, computeEifelLimitation as Or, SfedeCountrySuccessorInput as Os, Schedule54Input as Ot, AT1_DISPOSITION_CATEGORIES as Ou, Co17Identity as P, albertaResourceDeductionDifference as Pa, At1Schedule5SuccessoredPoolEntryResult as Pc, CCA_DECLINING_BALANCE_RATES_2024 as Pd, ProvinceRateTable as Pi, IegAgreementInput as Pl, DispositionResult as Pn, CcogpeSuccessorResult as Po, Clause95DeniedRow as Pr, computeCdeRegular as Ps, Schedule43Input as Pt, At1CategoryTotals as Pu, T2_CERTIFICATION_FIXTURES as Q, RsiLineItemError as Qa, CapitalInvestmentTaxCreditResult as Qc, LossCarrybackYear as Qd, AdjustedAggregateInvestmentIncomeInput as Qi, IegEligibleExpendituresInput as Ql, computePart4Rdtoh as Qn, CfreCountryRegularInput as Qo, ResourceIfeRow as Qr, AlbertaSchedule9Result as Qs, computeZetm as Qt, AlbertaCcaOverride as Qu, co17Engine as R, At1TransmitterDefect as Ra, ForeignInvestmentCountryResult as Rc, resolveCcaRates as Rd, TaxableIncomeInput as Ri, IegAllocationResult as Rl, Schedule5Result as Rn, CdeRegularResult as Ro, ExemptIfeResult as Rr, computeCfreRegular as Rs, LARGE_CORPORATION_THRESHOLD as Rt, AT1_RESERVE_KINDS as Ru, T2CifData as S, Schedule12Adjustment as Sa, AlbertaSchedule6Result as Sc, Class14Property as Sd, computeRifeUnderSubsection111_8 as Si, schedule12LossDeductions as Sl, ForeignPerCountryResult as Sn, AlbertaReturnInput as So, EIFEL_FIRST_YEAR_START as Sr, Schedule15FilingResult as Ss, Schedule55Result as St, DonationMaximumResult as Su, T2CifQuestionnaire as T, Schedule12Result as Ta, RoyaltyTaxCreditShelterAllocation as Tc, LeaseholdLayer as Td, FOREIGN_TAX_CREDIT_GROSS_UP as Ti, schedule16Values as Tl, computeCde as Tn, AlbertaSchedule15Input as To, EIFEL_TRANSITIONAL_RATIO as Tr, SfedeCountryRegularOverride as Ts, LRIP_INVESTMENT_INCOME_FACTOR as Tt, Schedule20Input as Tu, QuebecEstablishment as U, toRsiJacketSchedules as Ua, AgriProcessingCombinedVintageInput as Uc, At4970Result as Ud, dividendsDeductibleS112 as Ui, allocateIegExpenditureLimit as Ul, ProvincialAllocationResult as Un, CeeRegularFederal as Uo, InterestAndFinancingRevenuesResult as Ur, computeFedeRegular as Us, Schedule31Result as Ut, At1ReserveBalances as Uu, computeQuebecReturn as V, validateAt1Transmitter as Va, computeSchedule4 as Vc, At4970ProjectRow as Vd, charitableDonationsDeduction as Vi, IegLimitAllocation as Vl, PermanentEstablishment as Vn, CdeSuccessorOverride as Vo, InterestAndFinancingExpensesResult as Vr, computeEdaRegular as Vs, computeTaxableCapital as Vt, AlbertaSchedule17Input as Vu, computeQuebecAllocationFactor as W, toRsiLineItems as Wa, AgriProcessingCurrentYearInput as Wc, At4970Totals as Wd, netCapitalLossApplied as Wi, computeIegAgreement as Wl, computeProvincialAllocation as Wn, CeeRegularInput as Wo, LoanRow as Wr, computeFedeSuccessor as Ws, computeSchedule31 as Wt, At1ReserveKind as Wu, QuebecTaxRates as X, RsiHeaderInput as Xa, At1ScheduleValueLike$5 as Xc, LossCarrybackInput as Xd, computeCcpcActiveBusinessTax as Xi, computeIegBaseAmount as Xl, Part4RdtohResult as Xn, CeeSuccessorResult as Xo, ResourceIfePool as Xr, ALBERTA_SRED_TAX_CREDIT_RATE as Xs, ZetmInput as Xt, assistanceFrom as Xu, QC_TAX_RATE_BOOK as Y, RSI_WORD_GAP as Ya, At1ScheduleDataLike$5 as Yc, LossCarrybackError as Yd, PartITaxResult as Yi, computeIeg as Yl, Part4RdtohInput as Yn, CeeSuccessorOverride as Yo, PartnershipIfeRow as Yr, ALBERTA_SRED_PROGRAM_START as Ys, computeItcRecapture as Yt, AlbertaSchedule16Result as Yu, resolveQuebecTaxRates as Z, RsiLineItem as Za, CapitalInvestmentTaxCreditInput as Zc, LossCarrybackResult as Zd, computePartITax as Zi, computeIegReductionFactor as Zl, REFUNDABLE_PART_I_RATE as Zn, CfreCountryRegularFederal as Zo, ResourceIfeResult as Zr, AlbertaSchedule9Input as Zs, ZetmResult as Zt, computeAlbertaSchedule16 as Zu, computeSmallManufacturerTest as _, parseT2LineItemId as _a, RoyaltySupplementalPriorYearAdjustment as _c, Class13Result as _d, earliestRateYear as _f, EifelCapacityInput as _i, Schedule20FilingInput as _l, DepletionInput as _n, at1TaxPayableDeductions as _o, PART_VI_1_DEDUCTION_BANDS as _r, FedeRegularResult as _s, SCHEDULE_88_MAX_URLS as _t, computeLimitedPartnershipLossRow as _u, MP_RATES_2024 as a, SbdResult as aa, computeAlbertaSchedule9 as ac, CcaClassResult as ad, AlbertaSbdResult as af, computeInterestAndFinancingRevenues as ai, computeSchedule3 as al, Schedule21Input as an, renderRsiLineItem as ao, Schedule1NotFileableError as ar, CmedbFederal as as, T2_LINE_META as at, NonCapitalLossByYearOfOriginResult as au, computeT2Settlement as b, LossScheduleResult as ba, schedule7Values$1 as bc, Class141RecaptureReductionInput as bd, latestRateYear as bf, ReceivedCapacityRow as bi, at1LineItemId as bl, ForeignExplorationResult as bn, At1ReturnInput as bo, computePartVI1Deduction as br, FedeSuccessorOverride as bs, normalizeSchedule88 as bt, AT1_DONATION_INCOME_RATE as bu, MpDeductionResult as c, computeBusinessLimit as ca, PoliticalContributionInput as cc, Schedule8Result$1 as cd, DayWeightedRateResult as cf, computePartnershipIfe as ci, SINGLE_JURISDICTION_ALBERTA_FACTOR as cl, ReserveContinuityResult as cn, At1CriticalFieldMissingError as co, assertSchedule1Fileable as cr, EdaRegularFederal as cs, runConformance as ct, OtherLossVintageRowResult as cu, SMALL_MANUFACTURER_INCOME_THRESHOLD as d, CORP_TAX_RATE_BOOK as da, computeSchedule8 as dc, computeCcaSchedule as dd, AB_TAX_2024 as df, EIFEL_EFFECTIVE_FROM as di, AT1_SCHEDULES_WITH_BUILDERS as dl, CdeInput as dn, At1TaxPayableMismatchError as do, deferredIncomeTaxProvisionAddBack as dr, EdaSuccessorFederal as ds, FederalT2Result as dt, RifeContinuityInput as du, AggregateInvestmentIncomeInput as ea, Schedule9AllocationMemberResult as ec, AlbertaSchedule13Input as ed, AlbertaTaxInput as ef, computeCapitalizedIfe as ei, InvestorTaxCreditResult as el, AssociatedMemberResult as en, formatRsiAmount as eo, Schedule2Result as er, CfreCountryRegularResult as es, ConformanceResult as et, computeIegEligibleExpenditures as eu, SmallManufacturerTestInput as f, CorpTaxRates as fa, schedule8Values$1 as fc, computeSchedule8$1 as fd, AB_TAX_RATE_BOOK as ff, EifelExemption as fi, At1ScheduleData as fl, CdeResult as fn, At1TransmitterInfo as fo, findSchedule1LineDefects as fr, EdaSuccessorInput as fs, computeFederalT2 as ft, RifeContinuityResult as fu, computePart2MPProfits as g, federalSchedulePayloads as ga, RoyaltySupplementalPartnershipResult as gc, Class13Input as gd, RateBookEntry as gf, assessEifel as gi, Schedule1FilingInput as gl, CogpeResult as gn, assertCriticalFields as go, terminalLossDeduction as gr, FedeRegularOverride as gs, computeSchedule101 as gt, LimitedPartnershipLossesResult as gu, computeMpDeduction as h, T2ScheduleValue as ha, RoyaltySupplementalPartnership as hc, CLASS_14_1_TRANSITIONAL_RATE as hd, RateBook as hf, EifelThresholds as hi, Schedule12FilingInput as hl, CogpeInput as hn, assertAt1TaxPayableReconciles as ho, recaptureAddBack as hr, FedeRegularInput as hs, Schedule101Result as ht, LimitedPartnershipLossRowResult as hu, MP_GROSS_REVENUE_THRESHOLD as i, SbdInput as ia, allocateSchedule9ExpenditureLimit as ic, CcaClassInput as id, AlbertaSbdInput as if, computeInterestAndFinancingExpenses as ii, Schedule3Result as il, computeBusinessLimitAllocation as in, renderRsiHeader as io, Schedule1LineDefect as ir, CfreCountrySuccessorResult as is, T2LineKey as it, NonCapitalLossByYearOfOriginInput as iu, t2Engine as j, albertaDispositionAdjustments as ja, At1Schedule5PoolTransfer as jc, computeClass141AdditionalAllowance as jd, PROVINCE_RATES_2024 as ji, schedule29Values as jl, computeSchedule12ResourceDeductions as jn, CcogpeSuccessorFederal as jo, BorrowingsResult as jr, computeAlbertaSchedule15 as js, GripInput as jt, At1AbilEntry as ju, renderT2DraftReturn as k, albertaCcaScheduleAdjustments as ka, AlbertaSchedule5Input as kc, computeClass13 as kd, blendProvinceRateTable as ki, schedule20Values as kl, computeDepletion as kn, CcogpeRegularOverride as ko, ratioOfPermissibleExpenses as kr, SfedeCountrySuccessorOverride as ks, Schedule54Result as kt, AlbertaSchedule18Input as ku, Part2MPProfitsInput as l, computeSBD as la, Schedule8Input as lc, UnsupportedCcaClassError as ld, GeneralRateBand as lf, computePartnershipIfeAddBack as li, computeAllocationFactor as ll, ReserveContinuityRow as ln, At1FilingData as lo, ccaDeduction as lr, EdaRegularInput as ls, runConformanceSuite as lt, computeNonCapitalLossByYearOfOrigin as lu, computeCanadianMPProfits as m, T2ScheduleData as ma, AlbertaSchedule7Result as mc, CLASS_14_1_RECAPTURE_REDUCTION_RATE as md, resolveAlbertaTaxRates as mf, EifelResult as mi, Schedule10FilingInput as ml, CeeResult as mn, assertAt1MandatoryComplete as mo, mealsAndEntertainmentAddBack as mr, FedeRegularFederal as ms, Schedule101Input as mt, LimitedPartnershipLossRow as mu, CanadianMPProfitsResult as n, BusinessLimitInput as na, Schedule9FieldOfScience as nc, FederalCcaClass as nd, computeAlbertaTax as nf, computeExcessIfe as ni, MaximumAllowableDeductionResult as nl, BusinessLimitAllocationResult as nn, formatRsiText as no, Schedule1Input as nr, CfreCountrySuccessorInput as ns, ExpectedSource as nt, LossVintageEntry as nu, MpDeductionInput as o, computeAdjustedAggregateInvestmentIncome as oa, computeSchedule9MaximumExpenditureLimit as oc, CcaScheduleResult as od, computeAlbertaSbd as of, computeLoans as oi, schedule3Values as ol, Schedule21Result as on, renderAt1NetFile as oo, Schedule1Result as or, CmedbInput as os, foldT2Lines as ot, OtherLossByYearOfOriginResult as ou, SmallManufacturerTestResult as p, resolveCorpTaxRates as pa, AlbertaSchedule7Input as pc, CLASS_14_1_MINIMUM_DEDUCTION as pd, AlbertaTaxRates as pf, EifelInput as pi, At1ScheduleValue as pl, CeeInput as pn, albertaBalanceUnpaid as po, incomeTaxProvisionAddBack as pr, EdaSuccessorResult as ps, FirstReturnEvent as pt, computeRifeContinuity as pu, computeQuebecTax as q, RSI_DELIMITER as qa, AgriProcessingVintageInput as qc, LossContinuityResult as qd, CcpcActiveBusinessTaxResult as qi, IegInput as ql, computeSchedule4Losses as qn, CeeSuccessorFederal as qo, LossPortionFromIfeRow as qr, schedule15Values as qs, ItcRecaptureItemResult as qt, computeAlbertaSchedule17 as qu, MP_EXCLUDED_ACTIVITIES as r, BusinessLimitResult as ra, Schedule9GroupFilingInput as rc, computeAlbertaSchedule13 as rd, AlbertaCorporationStatus as rf, computeExemptIfe as ri, Schedule3Input as rl, allocateEvenly as rn, renderAt1Rsi as ro, Schedule1Line as rr, CfreCountrySuccessorOverride as rs, LineCheck as rt, LossVintageRowResult as ru, MpDeductionRates as s, computeAggregateInvestmentIncome as sa, schedule9Values as sc, Schedule8Entry as sd, AB_GENERAL_RATE_BANDS as sf, computeLossPortionFromIfe as si, AllocationFactorInput as sl, computeSchedule21 as sn, AT1_CRITICAL_MANDATORY_FIELDS as so, amortizationAddBack as sr, CmedbResult as ss, formatConformanceReport as st, OtherLossVintageEntry as su, CanadianMPProfitsInput as t, AggregateInvestmentIncomeResult as ta, Schedule9AllocationResult as tc, AlbertaSchedule13Result as td, AlbertaTaxResult as tf, computeClause95Amounts as ti, MaximumAllowableDeductionInput as tl, BusinessLimitAllocationInput as tn, formatRsiDate as to, computeSchedule2 as tr, CfreCountrySuccessorFederal as ts, ConformanceSummary as tt, iegT661SourceLine as tu, Part2MPProfitsResult as u, CORP_TAX_2024 as ua, Schedule8Result as uc, computeCcaClass as ud, computeDayWeightedGeneralTax as uf, computeResourceIfe as ui, AT1_SCHEDULES_WITHOUT_BUILDERS as ul, computeSchedule13 as un, At1MandatoryFieldMissingError as uo, computeSchedule1 as ur, EdaRegularResult as us, FederalT2Input as ut, computeOtherLossByYearOfOrigin as uu, T2SettlementInput as v, t2LineItemId as va, RoyaltySupplementalPriorYearAdjustmentResult as vc, Class141AdditionalAllowanceInput as vd, extendRateBook as vf, EifelCapacityResult as vi, Schedule21FilingInput as vl, DepletionResult as vn, at1YesNo as vo, PartVI1DeductionBand as vr, FedeSuccessorFederal as vs, Schedule88Input as vt, computeLimitedPartnershipLosses as vu, T2CifPartI as w, Schedule12Line as wa, RoyaltyTaxCreditQuarter as wc, Class14Result as wd, AdjustedTaxableIncomeResult as wi, schedule13Values as wl, Schedule12ResourceDeductionsResult as wn, computeAlbertaReturn as wo, EIFEL_STANDARD_RATIO_FROM as wr, SfedeCountryRegularInput as ws, LRIP_INVESTMENT_CORPORATION_MULTIPLE as wt, AlbertaGiftCarryforward as wu, T2CifAddress as x, computeLossSchedule as xa, AlbertaSchedule6Input as xc, Class14Input as xd, resolveRates as xf, computeEifelCapacity as xi, schedule10Values as xl, ForeignPerCountryInput as xn, at1Engine as xo, partVI1DeductionMultiple as xr, FedeSuccessorResult as xs, Schedule55Input as xt, DonationMaximumInput as xu, T2SettlementResult as y, LossScheduleInput as ya, computeAlbertaSchedule7 as yc, Class141AdditionalAllowanceResult as yd, hasExactRateYear as yf, ExcessCapacityVintage as yi, Schedule2FilingInput as yl, ForeignExplorationInput as yn, xmlEscape as yo, PartVI1DeductionResult as yr, FedeSuccessorInput as ys, Schedule88Result as yt, AT1_DONATION_GAIN_RATE as yu, QuebecReturnInput as z, At1TransmitterInvalidError as za, Schedule4Input$1 as zc, At4970Input as zd, TaxableIncomeLine as zi, IegGroupMember as zl, computeSchedule5 as zn, CdeSuccessorFederal as zo, ExemptIfeRow as zr, computeCfreSuccessor as zs, TaxableCapitalInput as zt, AT1_RESERVE_LINES as zu };