@classytic/ca-tax 0.0.5 → 0.0.13

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
@@ -312,29 +312,48 @@ declare function computeLossCarryback(input: LossCarrybackInput): LossCarrybackR
312
312
  /**
313
313
  * Loss-pool continuity — the jurisdiction-agnostic running balance of a loss
314
314
  * carryforward pool (non-capital or net-capital), federal T2 Schedule 4 and
315
- * Alberta AT1 Schedule 21 alike:
315
+ * Alberta AT1 Schedule 21 alike.
316
316
  *
317
- * closing balance = opening (c/f from prior year)
318
- * + current-year loss created
319
- * − carried back to prior years
320
- * applied against current-year income
321
- * expired (non-capital losses from 2006+ expire after 20 years)
317
+ * AT1 Schedule 21's own formula (§3.2.3.21, verified against the spec text,
318
+ * non-capital pool numbering — every pool follows the same shape):
319
+ *
320
+ * 033 (balance at beginning of year) = 031 (carried forward) − 032 (expired)
321
+ * 049 (closing) = 033 + 035 (wind-up transfer) + 037 (current-year loss)
322
+ * − 041 (applied against income) − 043 (s.80 adjustment)
323
+ * − 045 (other adjustments) − 047 (carried back)
324
+ *
325
+ * i.e., in this module's field names:
326
+ *
327
+ * balanceAtBeginningOfYear = openingBalance − expired
328
+ * closingBalance = balanceAtBeginningOfYear + windUpTransfer + currentYearLoss
329
+ * − appliedCurrentYear − section80Adjustment − otherAdjustments
330
+ * − carriedBack
322
331
  *
323
332
  * The closing balance is what carries forward to next year — the spine of
324
333
  * multi-year continuity. Pure, integer whole dollars. Lives in the federal/base
325
334
  * layer; AT1 re-exports it so a provincial pool uses the exact same mechanic.
335
+ * `windUpTransfer`/`section80Adjustment`/`otherAdjustments` are AT1-only in
336
+ * practice today (federal Schedule 4 has no equivalent concept and never
337
+ * supplies them) — kept here rather than duplicating the whole formula in the
338
+ * AT1 layer for three extra terms.
326
339
  */
327
340
  interface LossContinuityInput {
328
- /** Balance carried forward from the prior year. */
341
+ /** Balance carried forward from the prior year (031). */
329
342
  openingBalance: number;
330
- /** Loss created in the current year. */
343
+ /** Loss created in the current year (037). */
331
344
  currentYearLoss?: number;
332
- /** Total carried back to prior years (federal S3 / AT1 Schedule 10). */
345
+ /** Total carried back to prior years (federal S3 / AT1 Schedule 10) (047). */
333
346
  carriedBack?: number;
334
- /** Applied against current-year income. */
347
+ /** Applied against current-year income (041). */
335
348
  appliedCurrentYear?: number;
336
- /** Expired this year (20-year limit for non-capital losses from 2006+). */
349
+ /** Expired this year (20-year limit for non-capital losses from 2006+) (032). */
337
350
  expired?: number;
351
+ /** Transfer on a wind-up or amalgamation — ADDS to the pool (035). */
352
+ windUpTransfer?: number;
353
+ /** Adjustment under ITA section 80 — DEDUCTS (043). AT1-only; no federal source. */
354
+ section80Adjustment?: number;
355
+ /** Other adjustments — DEDUCTS (045). AT1-only; no federal source. */
356
+ otherAdjustments?: number;
338
357
  }
339
358
  interface LossContinuityResult {
340
359
  openingBalance: number;
@@ -342,6 +361,11 @@ interface LossContinuityResult {
342
361
  carriedBack: number;
343
362
  appliedCurrentYear: number;
344
363
  expired: number;
364
+ windUpTransfer: number;
365
+ section80Adjustment: number;
366
+ otherAdjustments: number;
367
+ /** 033 — opening balance net of this year's expiry. */
368
+ balanceAtBeginningOfYear: number;
345
369
  /** Available to carry forward — never negative. */
346
370
  closingBalance: number;
347
371
  }
@@ -809,7 +833,7 @@ type Schedule8Entry = {
809
833
  method: 'limited-life';
810
834
  class: Class14Input;
811
835
  };
812
- interface Schedule8Result {
836
+ interface Schedule8Result$1 {
813
837
  decliningBalance: CcaClassResult[];
814
838
  leasehold: Class13Result[];
815
839
  limitedLife: Class14Result[];
@@ -835,9 +859,9 @@ interface Schedule8Result {
835
859
  * proceeds reach its capital cost, and the class caps at its own undepreciated
836
860
  * capital cost — so neither produces a recapture inclusion here.
837
861
  */
838
- declare function computeSchedule8(entries: readonly Schedule8Entry[], rates?: CcaRateTable, /** Short-tax-year proration (days ÷ 365) for the declining-balance rows. */
862
+ declare function computeSchedule8$1(entries: readonly Schedule8Entry[], rates?: CcaRateTable, /** Short-tax-year proration (days ÷ 365) for the declining-balance rows. */
839
863
 
840
- prorationFactor?: number): Schedule8Result;
864
+ prorationFactor?: number): Schedule8Result$1;
841
865
  //#endregion
842
866
  //#region src/t2/at1/schedules/schedule13-cca.d.ts
843
867
  /**
@@ -869,11 +893,40 @@ interface AlbertaCcaOverride {
869
893
  /** The class holds no assets at year-end (drives 013017 terminal loss). */
870
894
  classEmptied?: boolean;
871
895
  }
896
+ /**
897
+ * Class 13 (leasehold interests), a NEW layer added this year — the full
898
+ * Reg 1100(1)(b)/Schedule III mechanic, not the opening-balance-only shortcut
899
+ * `AlbertaCcaOverride` gives the declining-balance classes. Federal and
900
+ * Alberta share the SAME layers/opening UCC (Alberta has no basis to lease a
901
+ * DIFFERENT term on the same property) — only the CLAIM can diverge, same
902
+ * "defaults to federal" semantics as every other AT1 column here.
903
+ */
904
+ interface AlbertaClass13Input {
905
+ layers: readonly LeaseholdLayer[];
906
+ openingUCC: number;
907
+ applyHalfYearRule?: boolean;
908
+ /** Federal's claim (0..max). Omit to claim federal's maximum. */
909
+ federalClaim?: number;
910
+ /** Alberta's claim (0..max). Omit to default to federal's ACTUAL claimed amount, not federal's maximum. */
911
+ albertaClaim?: number;
912
+ }
913
+ /** Class 14 (limited-life intangibles), a NEW property added this year — same sharing rule as {@link AlbertaClass13Input}. */
914
+ interface AlbertaClass14Input {
915
+ properties: readonly Class14Property[];
916
+ openingUCC: number;
917
+ daysInTaxYear?: number;
918
+ federalClaim?: number;
919
+ albertaClaim?: number;
920
+ }
872
921
  interface AlbertaSchedule13Input {
873
922
  /** The federal Schedule 8 rows. Alberta figures default to these. */
874
923
  federalClasses: readonly FederalCcaClass[];
875
924
  /** Alberta overrides, keyed by class. Classes with no override match federal. */
876
925
  albertaOverrides?: readonly AlbertaCcaOverride[];
926
+ /** A Class 13 leasehold layer added THIS year (federal claims nil ⇒ omit `federalClaim`). */
927
+ class13?: AlbertaClass13Input;
928
+ /** A Class 14 property added THIS year. */
929
+ class14?: AlbertaClass14Input;
877
930
  /**
878
931
  * 000060 — is the corporation reporting different Alberta taxable income?
879
932
  * Defaults to false.
@@ -1533,6 +1586,178 @@ interface DonationMaximumResult {
1533
1586
  }
1534
1587
  declare function computeDonationMaximum(input: DonationMaximumInput): DonationMaximumResult;
1535
1588
  //#endregion
1589
+ //#region src/t2/at1/schedules/schedule21-limited-partnership.d.ts
1590
+ /**
1591
+ * AT1 Schedule 21 — Continuity of Limited Partnership Losses.
1592
+ *
1593
+ * A sixth section the schedule's own form has, separate from the five pools
1594
+ * in `schedule21-loss-continuity.ts` — one row PER PARTNERSHIP, not per
1595
+ * jurisdiction. Verified against the spec text (§3.2.3.21):
1596
+ *
1597
+ * 141 (closing) = 133 (preceding-year balance) + 135 (wind-up transfer)
1598
+ * + 137 (current-year LP loss) − 139 (applied)
1599
+ *
1600
+ * 139 (applied) is capped: "cannot exceed 021133 + 021135" — a partnership
1601
+ * cannot apply more than it actually has on hand (its preceding balance
1602
+ * plus whatever was transferred to it this year).
1603
+ *
1604
+ * The TOTAL of column 139 carries forward to Schedule 12 line 072 (stated
1605
+ * on the form itself: "Carry forward the total of column 139 to Schedule 12,
1606
+ * line 072").
1607
+ *
1608
+ * Whole dollars, pure.
1609
+ */
1610
+ interface LimitedPartnershipLossRow {
1611
+ /** 131 — partnership identifier, if known. No amount is filed for occurrence 0. */
1612
+ identifier?: string;
1613
+ /** 133 — limited partnership losses at the end of the preceding taxation year. */
1614
+ precedingYearBalance: number;
1615
+ /** 135 — transferred from an amalgamation or wind-up of a subsidiary. */
1616
+ transferredOnWindUp?: number;
1617
+ /** 137 — the limited partnership loss created this year. */
1618
+ currentYearLoss?: number;
1619
+ /** 139 — applied this year. Capped at 133 + 135; omit for nothing applied. */
1620
+ applied?: number;
1621
+ }
1622
+ interface LimitedPartnershipLossRowResult {
1623
+ identifier?: string;
1624
+ precedingYearBalance: number;
1625
+ transferredOnWindUp: number;
1626
+ currentYearLoss: number;
1627
+ /** 139 — the LESSER of what was requested and 133 + 135. */
1628
+ applied: number;
1629
+ /** 141 — 133 + 135 + 137 − 139. */
1630
+ closingBalance: number;
1631
+ issues: string[];
1632
+ }
1633
+ declare function computeLimitedPartnershipLossRow(row: LimitedPartnershipLossRow): LimitedPartnershipLossRowResult;
1634
+ interface LimitedPartnershipLossesResult {
1635
+ rows: LimitedPartnershipLossRowResult[];
1636
+ /** Σ 139 — carries forward to Schedule 12 line 072. */
1637
+ totalApplied: number;
1638
+ totalClosingBalance: number;
1639
+ issues: string[];
1640
+ }
1641
+ declare function computeLimitedPartnershipLosses(rows: readonly LimitedPartnershipLossRow[]): LimitedPartnershipLossesResult;
1642
+ //#endregion
1643
+ //#region src/t2/at1/schedules/schedule21-year-of-origin.d.ts
1644
+ /**
1645
+ * AT1 Schedule 21 — Analysis of Losses by Year of Origin.
1646
+ *
1647
+ * TWO more sections the live form has (pages 3-4 of
1648
+ * `research/sources/tra-forms/pdf/AT1SCH21-loss-continuity-TRA11741.pdf`),
1649
+ * both entirely separate from the five jurisdiction pools and the limited
1650
+ * partnership grid already modelled elsewhere in this directory:
1651
+ *
1652
+ * ANCL — non-capital losses, one row per vintage year (0 = current, 1-20 =
1653
+ * preceding taxation years — the 20-year expiry limit), SIX columns.
1654
+ * AOL — farm / restricted-farm / listed-personal-property losses, same
1655
+ * 21 rows, but just ONE balance figure per type per year (no
1656
+ * sub-formula) — listed personal property expires after 7 years,
1657
+ * not 20, so it has NO occurrences 8-20.
1658
+ *
1659
+ * Verified against the spec's own field-by-field business rules
1660
+ * (§3.2.3.21). Two constraints matter enough to be load-bearing here:
1661
+ *
1662
+ * - ANCL row 0 (current year) is NOT separately entered: 021157 "must
1663
+ * equal 021021" (the schedule's own top-level current-year loss) and
1664
+ * 021165 "must equal 021047" (the pool's total carried-back). Both are
1665
+ * already computed elsewhere in this module — row 0 is DERIVED, not
1666
+ * asked for twice.
1667
+ * - AOL's `listedPersonalPropertyLosses` is REFUSED for `yearIndex` 8-20
1668
+ * ("There should be no amount for occurrences 8 to 20") — a 7-year
1669
+ * expiry limit, distinct from farm/restricted-farm's 20-year one.
1670
+ *
1671
+ * `Continuity of Restricted Interest and Financing Expenses` (RIFE, page 5
1672
+ * 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.
1678
+ *
1679
+ * Whole dollars, pure.
1680
+ */
1681
+ /** One PRECEDING year's vintage (1-20) — cannot be derived, the caller's own multi-year continuity record. */
1682
+ interface LossVintageEntry {
1683
+ /** 151 — 1 = the immediately preceding taxation year, up to 20. */
1684
+ yearsAgo: number;
1685
+ /** 153 — that year's tax year end, ISO `YYYY-MM-DD`. */
1686
+ taxYearEnd?: string;
1687
+ /** 155 — balance at the beginning of THIS vintage's year. */
1688
+ balanceAtBeginning?: number;
1689
+ /** 159 — adjustments and transfers for this vintage this year. Signed. */
1690
+ adjustments?: number;
1691
+ /** 167 — applied to reduce taxable income this year, from THIS vintage specifically. */
1692
+ applied?: number;
1693
+ }
1694
+ interface LossVintageRowResult {
1695
+ /** 151 — 0 = current year, 1-20 = preceding taxation years. */
1696
+ yearIndex: number;
1697
+ /** 153 */
1698
+ taxYearEnd?: string;
1699
+ /** 155 — nil for the current year (row 0); nothing is "at the beginning" of the year it's created in. */
1700
+ balanceAtBeginning: number;
1701
+ /** 157 — nil for every row except the current year (row 0 only). */
1702
+ lossIncurred: number;
1703
+ /** 159 */
1704
+ adjustments: number;
1705
+ /** 165 — nil for every row except the current year (row 0 only; a loss can only be carried back in its own year). */
1706
+ carriedBack: number;
1707
+ /** 167 — nil for the current year (row 0); nothing has been "applied" yet to a loss not yet closed out. */
1708
+ applied: number;
1709
+ /** 169 — 155 + 157 + 159 − 165 − 167. */
1710
+ balanceAtEnd: number;
1711
+ }
1712
+ interface NonCapitalLossByYearOfOriginInput {
1713
+ /** → row 0's 157. Must equal Schedule 21's own current-year non-capital loss (line 021). */
1714
+ currentYearLoss: number;
1715
+ /** → row 0's 165. Must equal the non-capital pool's total carried back (line 047). */
1716
+ currentYearCarriedBack: number;
1717
+ /** Rows 1-20 — the corporation's own prior-year vintage history. */
1718
+ priorVintages?: readonly LossVintageEntry[];
1719
+ }
1720
+ interface NonCapitalLossByYearOfOriginResult {
1721
+ rows: LossVintageRowResult[];
1722
+ totals: {
1723
+ balanceAtBeginning: number;
1724
+ lossIncurred: number;
1725
+ adjustments: number;
1726
+ carriedBack: number;
1727
+ applied: number;
1728
+ balanceAtEnd: number;
1729
+ };
1730
+ issues: string[];
1731
+ }
1732
+ declare function computeNonCapitalLossByYearOfOrigin(input: NonCapitalLossByYearOfOriginInput): NonCapitalLossByYearOfOriginResult;
1733
+ /** One year's balance across the three simple pools — no sub-formula, a raw figure per pool per vintage. */
1734
+ interface OtherLossVintageEntry {
1735
+ /** 181 — 0 = current year, 1-20 = preceding taxation years. */
1736
+ yearIndex: number;
1737
+ /** 183 */
1738
+ farmLosses?: number;
1739
+ /** 185 */
1740
+ restrictedFarmLosses?: number;
1741
+ /** 187 — REFUSED for yearIndex 8-20 (listed personal property expires after 7 years, not 20). */
1742
+ listedPersonalPropertyLosses?: number;
1743
+ }
1744
+ interface OtherLossVintageRowResult {
1745
+ yearIndex: number;
1746
+ farmLosses: number;
1747
+ restrictedFarmLosses: number;
1748
+ listedPersonalPropertyLosses: number;
1749
+ }
1750
+ interface OtherLossByYearOfOriginResult {
1751
+ rows: OtherLossVintageRowResult[];
1752
+ totals: {
1753
+ farmLosses: number;
1754
+ restrictedFarmLosses: number;
1755
+ listedPersonalPropertyLosses: number;
1756
+ };
1757
+ issues: string[];
1758
+ }
1759
+ declare function computeOtherLossByYearOfOrigin(rows: readonly OtherLossVintageEntry[]): OtherLossByYearOfOriginResult;
1760
+ //#endregion
1536
1761
  //#region src/t2/at1/schedules/schedule29-eligible-expenditures.d.ts
1537
1762
  /**
1538
1763
  * AT1 Schedule 29 page 1 — Eligible Expenditures for IEG Purposes (lines
@@ -1727,11 +1952,10 @@ declare function computeIegReductionFactor(taxableCapital: number, lower?: 10000
1727
1952
  * denominator is the number of prior years (2).
1728
1953
  */
1729
1954
  declare function computeIegBaseAmount(priorYearExpenditures: readonly number[], priorYears?: 2): number;
1730
- interface IegInput {
1955
+ /** Fields every `IegInput` shares, regardless of path. */
1956
+ interface IegInputCommon {
1731
1957
  /** Current-year eligible SR&ED carried out in Alberta. */
1732
1958
  eligibleExpenditures: number;
1733
- /** Base level of spending (average of prior two years, group-aggregated). */
1734
- baseAmount: number;
1735
1959
  /** Allocated eligible-expenditure limit (default $4M; pass the allocated share). */
1736
1960
  expenditureLimit?: number;
1737
1961
  /**
@@ -1749,20 +1973,41 @@ interface IegInput {
1749
1973
  * "confirmed nil".
1750
1974
  */
1751
1975
  recapture?: number;
1976
+ }
1977
+ /**
1978
+ * `IegInput` is a discriminated union on `associatedAllowedAmount`, not one
1979
+ * object with an optional field, because `baseAmount` and
1980
+ * `associatedAllowedAmount` are NOT independent options — the live form has
1981
+ * no "base amount" concept at all on the associated (line 125) path (see
1982
+ * `schedule29-ieg-group.ts`'s own doc comment on `groupBaseAmount`). Making
1983
+ * the two mutually exclusive at the type level means a caller physically
1984
+ * cannot pass a group's aggregated base amount into the associated branch,
1985
+ * where it would have been silently ignored before.
1986
+ */
1987
+ type IegInput = (IegInputCommon & {
1988
+ /** Base level of spending (average of prior two years, group-aggregated). Line 112 (non-associated) only. */baseAmount: number;
1989
+ associatedAllowedAmount?: undefined;
1990
+ }) | (IegInputCommon & {
1991
+ baseAmount?: undefined;
1752
1992
  /**
1753
1993
  * Line 325 — this corporation's allocated allowed amount from a filed
1754
- * Agreement Among Associated Corporations (`computeIegAgreement`). Presence,
1755
- * not truthiness, selects the formula: supplying it (even as 0) switches
1756
- * line 112's "capped spending less base" to line 125's "lesser of the limit
1757
- * and this figure" — the ASSOCIATED path. Omit entirely for a corporation
1758
- * with no such agreement.
1759
- */
1760
- associatedAllowedAmount?: number;
1761
- }
1994
+ * Agreement Among Associated Corporations (`computeIegAgreement`).
1995
+ * Presence, not truthiness, selects line 125's formula: supplying it
1996
+ * (even as 0) switches from line 112's "capped spending less base" to
1997
+ * "lesser of the limit and this figure" — the ASSOCIATED path, which
1998
+ * has no base amount to combine it with.
1999
+ */
2000
+ associatedAllowedAmount: number;
2001
+ });
1762
2002
  interface IegResult {
1763
2003
  cappedExpenditures: number;
1764
- baseAmount: number;
1765
- incrementalExpenditures: number;
2004
+ /**
2005
+ * Line 112 (non-associated) only — `undefined` on the associated path,
2006
+ * where the live form has no base-amount concept at all, matching
2007
+ * `IegInput`'s own discriminated shape.
2008
+ */
2009
+ baseAmount: number | undefined;
2010
+ incrementalExpenditures: number | undefined;
1766
2011
  /** Line 110 — 8% of the capped expenditures. */
1767
2012
  creditAtBaseRate: number;
1768
2013
  /** Line 112 (non-associated) or line 125 (associated) — 12% either way. */
@@ -1779,6 +2024,7 @@ interface IegResult {
1779
2024
  recapture: number;
1780
2025
  /** Line 134 — NET IEG. Carried to AT1 page 2, line 129. */
1781
2026
  ieg: number;
2027
+ issues: string[];
1782
2028
  }
1783
2029
  declare function computeIeg(input: IegInput): IegResult;
1784
2030
  //#endregion
@@ -2278,9 +2524,12 @@ declare function schedule12Values(input: Schedule12FilingInput): At1ScheduleData
2278
2524
  * cross-schedule links are not modelled here — this builder emits Schedule 21's
2279
2525
  * own lines, and the caller supplies Schedule 12's figures directly.
2280
2526
  *
2281
- * Only the lines the engine computes are emitted. The section 80 and
2282
- * other-adjustment lines in between are conditional rather than mandatory, so an
2283
- * absent one is left off rather than zeroed.
2527
+ * Every line the pool's own form entry (`AT1_SCHEDULE_21_POOLS`, the same
2528
+ * table the FORM definition uses imported directly, not re-transcribed, so
2529
+ * the two cannot drift) names is emitted from the matching `LossContinuityResult`
2530
+ * field. A pool that has no line for a given concept (e.g. capital has no
2531
+ * "expired" row) simply has no key there, so nothing is emitted for it — not
2532
+ * a gap, the form genuinely has no box for it.
2284
2533
  */
2285
2534
  interface Schedule21FilingInput {
2286
2535
  /** 021021 — the current year non-capital loss, from the first part. */
@@ -2290,6 +2539,17 @@ interface Schedule21FilingInput {
2290
2539
  farm?: LossContinuityResult;
2291
2540
  restrictedFarm?: LossContinuityResult;
2292
2541
  listedPersonalProperty?: LossContinuityResult;
2542
+ /**
2543
+ * The sixth section the live form has — one occurrence per partnership
2544
+ * (131-141), NOT a sixth jurisdiction pool. Merged into the SAME
2545
+ * `Schedule Number="021"` block as the five pools above, not a separate
2546
+ * schedule object — the payload has one `021` block, not two.
2547
+ */
2548
+ limitedPartnershipLosses?: LimitedPartnershipLossesResult;
2549
+ /** The SEVENTH section — analysis of non-capital losses by year of origin (151-169), 21 occurrences. */
2550
+ nonCapitalByYearOfOrigin?: NonCapitalLossByYearOfOriginResult;
2551
+ /** The EIGHTH section — farm/restricted-farm/LPP by year of origin (181-187), 21 occurrences. */
2552
+ otherLossesByYearOfOrigin?: OtherLossByYearOfOriginResult;
2293
2553
  }
2294
2554
  declare function schedule21Values(input: Schedule21FilingInput): At1ScheduleData;
2295
2555
  /**
@@ -2307,6 +2567,15 @@ declare function schedule21Values(input: Schedule21FilingInput): At1ScheduleData
2307
2567
  * omitted rather than zeroed, since an absent conditional line is not the same as
2308
2568
  * a nil one.
2309
2569
  */
2570
+ /** One member of Area A's Agreement Among Associated Corporations (041/043/045). */
2571
+ interface Schedule1AgreementMember {
2572
+ /** 041 — the associated corp's name. Put the corp filing this return FIRST. */
2573
+ name?: string;
2574
+ /** 043 — Alberta CAN, must match the same corp's fed 023100. */
2575
+ albertaCan?: string;
2576
+ /** 045 — this member's allocated share of the base amount. */
2577
+ allocatedAmount?: number;
2578
+ }
2310
2579
  interface Schedule1FilingInput {
2311
2580
  result: AlbertaSbdResult;
2312
2581
  /** 001001 — associated with one or more CCPCs. */
@@ -2317,6 +2586,8 @@ interface Schedule1FilingInput {
2317
2586
  albertaTaxableIncome?: number;
2318
2587
  /** 001005 / 001011 — royalty tax deduction, where one applies. */
2319
2588
  royaltyTaxDeduction?: number;
2589
+ /** Area A — 041/043/045, one occurrence per associated corp, claimant first. */
2590
+ agreementMembers?: Schedule1AgreementMember[];
2320
2591
  }
2321
2592
  declare function schedule1Values(input: Schedule1FilingInput): At1ScheduleData;
2322
2593
  /**
@@ -2339,13 +2610,27 @@ interface Schedule2FilingInput {
2339
2610
  }
2340
2611
  declare function schedule2Values(input: Schedule2FilingInput): At1ScheduleData;
2341
2612
  /**
2342
- * Two loss types are modelled, each with its own column on the form:
2613
+ * Four loss types are modelled, each with its own column on the form:
2343
2614
  *
2344
- * non-capital 002 available · 004 / 006 / 008 per preceding year · 010 balance
2345
- * capital 042 gross · 044 / 046 / 048 applied ·
2615
+ * non-capital 002 available · 004 / 006 / 008 per preceding year · 010 balance
2616
+ * farm 012 available · 014 / 016 / 018 per preceding year · 020 balance
2617
+ * other loss 023/025 checkbox (restricted farm / listed personal property) ·
2618
+ * 032 available · 034 / 036 / 038 per preceding year · 040 balance
2619
+ * capital 042 gross · 044 / 046 / 048 applied · —
2346
2620
  *
2347
2621
  * The preceding-year rows also carry the year-end DATES on 003 / 005 / 007, which
2348
- * are the caller's to supply.
2622
+ * are the caller's to supply — ONE shared set of three years for every column, not
2623
+ * one per loss type (the printed form has a single row of date boxes with all the
2624
+ * columns' "applied" boxes beside it).
2625
+ *
2626
+ * The "other loss" column is ONE shared column for restricted farm and listed
2627
+ * personal property loss — but, confirmed against the actual TRA Chapter 3
2628
+ * spec (§3.2.3.11, not just the printed PDF), the two checkboxes (023/025)
2629
+ * are NOT mutually exclusive: a corporation may check BOTH, and the column's
2630
+ * current-year-loss figure becomes 021097 + 021117 — the two pools' current-
2631
+ * year losses summed. 023 and 025 are themselves ALWAYS filed once Schedule
2632
+ * 10 is filed at all, each independently 1 (Yes) or 2 (No, not applicable) —
2633
+ * never omitted, per the spec's own "Otherwise, default = 2" language.
2349
2634
  *
2350
2635
  * **The capital column is applied at the inclusion rate**, not gross: the form's
2351
2636
  * two columns are headed "Gross Amount" and "Amount of Loss Applied (Inclusion
@@ -2353,6 +2638,12 @@ declare function schedule2Values(input: Schedule2FilingInput): At1ScheduleData;
2353
2638
  */
2354
2639
  interface Schedule10FilingInput {
2355
2640
  nonCapital?: LossCarrybackResult;
2641
+ farm?: LossCarrybackResult;
2642
+ otherLoss?: {
2643
+ includesRestrictedFarm: boolean;
2644
+ includesListedPersonal: boolean;
2645
+ result: LossCarrybackResult;
2646
+ };
2356
2647
  capital?: LossCarrybackResult;
2357
2648
  /** Year-end dates for the three preceding years, `YYYYMMDD`. */
2358
2649
  precedingYearEnds?: readonly string[];
@@ -2419,6 +2710,2719 @@ interface AllocationFactorInput {
2419
2710
  declare const SINGLE_JURISDICTION_ALBERTA_FACTOR = 1;
2420
2711
  declare function computeAllocationFactor(input: AllocationFactorInput): number;
2421
2712
  //#endregion
2713
+ //#region src/t2/at1/schedules/schedule3-other-deductions-credits.d.ts
2714
+ /**
2715
+ * Alberta AT1 Schedule 3 — Alberta Other Tax Deductions and Credits.
2716
+ *
2717
+ * NOT one calculation. The spec (TRA spec §3.2.3.4, "3B3B3.2.3.4 Schedule 3 -
2718
+ * Alberta Other Tax Deductions and Credits", `AT1-Chapter3-2025.2-full.txt`
2719
+ * lines 4127-4898) groups THREE independent non-refundable investment tax
2720
+ * credit continuities under one shared ceiling:
2721
+ *
2722
+ * ITC Investor Tax Credit (lines 100-108, 120-130)
2723
+ * CITC Capital Investment Tax Credit (lines 200-208, 220-230)
2724
+ * APITC Agri-Processing Investment Tax Credit (lines 300-316, 330-340)
2725
+ * MAD Maximum Allowable Deduction — the shared ceiling (lines 600-604)
2726
+ *
2727
+ * No matching form PDF exists under `research/sources/tra-forms/pdf/` (searched
2728
+ * for `AT1SCH03*` — nothing found, unlike every other schedule this package
2729
+ * models). The specification TEXT is therefore the only source for this
2730
+ * schedule's shape; there is no live-form layout to cross-check it against.
2731
+ *
2732
+ * ── The shared ceiling (lines 600-604) ───────────────────────────────────────
2733
+ *
2734
+ * 600 = 003104 + 003204 + 003312 (ITC + CITC + APITC applied)
2735
+ * 602 = 000068 − (000070+000071+000072+000074) (AT1 page 2 room)
2736
+ * 604 = lesser of 600 and 602 ("Total Deduction")
2737
+ *
2738
+ * `000068`/`000070`/`000071`/`000072`/`000074` are AT1 page-2 jacket lines this
2739
+ * engine does not compute here (out of this module's scope per the task's scope
2740
+ * rule) — they are plain numeric inputs (`MaximumAllowableDeductionInput`).
2741
+ *
2742
+ * ── Three pools, one room, in a STATED precedence ────────────────────────────
2743
+ *
2744
+ * ITC is applied first, capped only by 602 itself:
2745
+ * 104 ≤ 000068 − (000070+000071+000072+000074)
2746
+ *
2747
+ * CITC is gated behind ITC: "If 003108 > 0 [ITC still has an unused carryforward
2748
+ * balance after this year's application], then [204] must equal zero." Only once
2749
+ * the ITC pool is fully drawn down may CITC be claimed, capped at what room ITC
2750
+ * left behind:
2751
+ * 204 ≤ 602 − 104 (when 108 = 0; otherwise 204 = 0)
2752
+ *
2753
+ * APITC draws on what both leave behind, but against a DIFFERENT room formula —
2754
+ * the spec's four "cannot exceed" clauses for 304/306/308/310 all subtract only
2755
+ * `(000070+000072)`, NOT `000071`/`000074` the way 104/204/602 do. That asymmetry
2756
+ * is transcribed exactly as written, not corrected, because it repeats
2757
+ * identically across all five APITC business-rule cells (304, 306, 308, 310, 312)
2758
+ * — consistent enough to be deliberate rather than a transcription slip:
2759
+ * 312 ≤ 000068 − (000070+000072) − (104+204)
2760
+ *
2761
+ * ── APITC: per-vintage percentage caps ───────────────────────────────────────
2762
+ *
2763
+ * The four "cannot exceed" clauses for 304/306/308/310, read together, are
2764
+ * algebraically just ONE combined-total constraint stated four times from four
2765
+ * different partial-sum vantage points (each says "this line ≤ R − the lines
2766
+ * listed", and the lines listed are exactly the OTHER three) — they collapse to
2767
+ * `304+306+308+310 ≤ R`, which is exactly what 312's own business rule states
2768
+ * directly. So the four clauses add nothing beyond that one shared-room ceiling;
2769
+ * what makes each vintage different is its OWN percentage cap from AAPITC
2770
+ * (330-340):
2771
+ *
2772
+ * occurrence 0 (current year, 334/336 occ 0) ≤ 20% of that vintage's receipt
2773
+ * occurrence 1 (1st preceding, occ 1) ≤ 30% of that vintage's receipt
2774
+ * occurrence 2 (2nd preceding, occ 2) ≤ 50% of that vintage's receipt
2775
+ * occurrences 3-10 (3rd-10th preceding) no percentage cap, own balance only
2776
+ *
2777
+ * `computeSchedule3` claims each vintage's OWN cap first, then allocates the
2778
+ * shared room OLDEST-VINTAGE-FIRST when the total requested exceeds it — APITC
2779
+ * is a 10-year-preceding, use-it-or-lose-it credit and the spec states no
2780
+ * application order, so this engine flags that choice in `issues` rather than
2781
+ * silently guessing at NetFile's actual tie-break. Supply `amountApplied` on
2782
+ * each vintage directly for exact filing parity.
2783
+ *
2784
+ * ── What is deliberately NOT modelled ────────────────────────────────────────
2785
+ *
2786
+ * The AITC/ACITC year-of-origin analysis tables (120-130, 220-230) are
2787
+ * supplementary detail TRA requires when a corporation carries ITC or CITC.
2788
+ * Unlike AAPITC, the spec gives them no percentage cap or application order of
2789
+ * their own — every business rule on those lines is a reconciliation back to the
2790
+ * aggregate 104/106/204/206 this module already computes (e.g. "126 … Value must
2791
+ * be less than or equal to 124+125", "130 … calculate 124+125-126-128"). Adding a
2792
+ * per-vintage array for ITC/CITC would only re-derive numbers this module
2793
+ * already produces without a spec-given rule to allocate them across years, so
2794
+ * it is left out; a caller filing the AITC/ACITC detail pages supplies that
2795
+ * per-vintage split itself.
2796
+ *
2797
+ * Whole dollars, pure.
2798
+ */
2799
+ interface MaximumAllowableDeductionInput {
2800
+ /** AT1 page 2, line 068 — Alberta tax payable before this deduction. */
2801
+ taxPayableBeforeDeduction?: number;
2802
+ /** AT1 page 2, line 070. */
2803
+ line070?: number;
2804
+ /** AT1 page 2, line 071. */
2805
+ line071?: number;
2806
+ /** AT1 page 2, line 072. */
2807
+ line072?: number;
2808
+ /** AT1 page 2, line 074. */
2809
+ line074?: number;
2810
+ }
2811
+ interface InvestorTaxCreditInput {
2812
+ /** 003100 — total shown on all ITC certificates issued during the year. */
2813
+ certificatesIssued?: number;
2814
+ /** 003102 — total ITC carried forward from prior year(s) (= prior year's 108). */
2815
+ carryforwardFromPriorYear?: number;
2816
+ /** 003106 — total ITC expired during the year. */
2817
+ expired?: number;
2818
+ /**
2819
+ * 003104 — amount applied to the current taxation year. Omit to claim the
2820
+ * maximum the shared room (602) and the available pool (100+102) both allow.
2821
+ */
2822
+ amountApplied?: number;
2823
+ }
2824
+ interface InvestorTaxCreditResult {
2825
+ certificatesIssued: number;
2826
+ carryforwardFromPriorYear: number;
2827
+ /** 100 + 102 — the pool before this year's claim. */
2828
+ availableBeforeClaim: number;
2829
+ /** 003104 — capped at the pool and at the 602 room (ITC has first call on it). */
2830
+ amountApplied: number;
2831
+ expired: number;
2832
+ /** 003108 = 100 + 102 − 104 − 106. Driving CITC's gate below. */
2833
+ carryforwardToNextYear: number;
2834
+ }
2835
+ interface CapitalInvestmentTaxCreditInput {
2836
+ /** 003200 — total shown on all CITC certificates issued during the year. */
2837
+ certificatesIssued?: number;
2838
+ /** 003202 — total CITC carried forward from prior year(s) (= prior year's 208). */
2839
+ carryforwardFromPriorYear?: number;
2840
+ /** 003206 — total CITC expired during the year. */
2841
+ expired?: number;
2842
+ /**
2843
+ * 003204 — amount applied to the current taxation year. Ignored (forced to
2844
+ * zero) whenever the ITC pool still has an unused carryforward balance —
2845
+ * see the module docstring.
2846
+ */
2847
+ amountApplied?: number;
2848
+ }
2849
+ interface CapitalInvestmentTaxCreditResult {
2850
+ certificatesIssued: number;
2851
+ carryforwardFromPriorYear: number;
2852
+ availableBeforeClaim: number;
2853
+ /** 003204 — zero whenever ITC's 108 > 0, otherwise capped at 602 − 104. */
2854
+ amountApplied: number;
2855
+ expired: number;
2856
+ /** 003208 = 200 + 202 − 204 − 206. */
2857
+ carryforwardToNextYear: number;
2858
+ }
2859
+ interface AgriProcessingCurrentYearInput {
2860
+ /** 003334 occurrence 0 (= 003300) — total on APITC certificates issued this year. */
2861
+ received?: number;
2862
+ /** 003336 occurrence 0 (= 003304) — applied from the current year's receipt, ≤ 20%. */
2863
+ amountApplied?: number;
2864
+ }
2865
+ /**
2866
+ * A single preceding-year vintage (occurrence 1 or 2). `availableAtBeginning`
2867
+ * (003335) is the original receipt LESS whatever was applied in prior years —
2868
+ * multi-year history this pure function does not carry, so the caller supplies
2869
+ * the already-reduced balance directly rather than the original 003334 receipt.
2870
+ */
2871
+ interface AgriProcessingVintageInput {
2872
+ /** 003335 for this occurrence — balance available at the start of this year. */
2873
+ availableAtBeginning?: number;
2874
+ /** 003336 for this occurrence — applied this year, capped at this vintage's own %. */
2875
+ amountApplied?: number;
2876
+ }
2877
+ /** Occurrences 3 through 10, combined — the spec caps this block as one group. */
2878
+ interface AgriProcessingCombinedVintageInput {
2879
+ /** Sum of 003335 across occurrences 3-10. */
2880
+ availableAtBeginning?: number;
2881
+ /** Sum of 003336 across occurrences 3-10 (= 003310). No percentage cap. */
2882
+ amountApplied?: number;
2883
+ }
2884
+ interface AgriProcessingTaxCreditInput {
2885
+ current?: AgriProcessingCurrentYearInput;
2886
+ /** 1st preceding taxation year, occurrence 1 — 30% cap. */
2887
+ firstPreceding?: AgriProcessingVintageInput;
2888
+ /** 2nd preceding taxation year, occurrence 2 — 50% cap. */
2889
+ secondPreceding?: AgriProcessingVintageInput;
2890
+ /** 3rd-10th preceding taxation years, occurrences 3-10 — no % cap. */
2891
+ thirdToTenthPreceding?: AgriProcessingCombinedVintageInput;
2892
+ /** 003314 — total APITC expired during the year (= 003338 occurrence 10). */
2893
+ expiredThisYear?: number;
2894
+ }
2895
+ interface AgriProcessingVintageResult {
2896
+ available: number;
2897
+ /** This vintage's own percentage ceiling (Infinity-free — already in dollars). */
2898
+ ownCap: number;
2899
+ amountApplied: number;
2900
+ }
2901
+ interface AgriProcessingTaxCreditResult {
2902
+ current: AgriProcessingVintageResult;
2903
+ firstPreceding: AgriProcessingVintageResult;
2904
+ secondPreceding: AgriProcessingVintageResult;
2905
+ thirdToTenthPreceding: Omit<AgriProcessingVintageResult, 'ownCap'>;
2906
+ /** 003300 — total received on certificates issued this year (= current.available). */
2907
+ totalReceived: number;
2908
+ /** 003302 — sum of 003335 across occurrences 1-10. */
2909
+ carryforwardFromPriorYear: number;
2910
+ /** 003304+306+308+310 requested, before the shared-room allocation below. */
2911
+ totalRequested: number;
2912
+ /** 003312 = 304+306+308+310, after the shared-room allocation. */
2913
+ totalApplied: number;
2914
+ expired: number;
2915
+ /** 003316 = 300 + 302 − 312 − 314. */
2916
+ availableForCarryforward: number;
2917
+ }
2918
+ interface Schedule3Input {
2919
+ mad?: MaximumAllowableDeductionInput;
2920
+ itc?: InvestorTaxCreditInput;
2921
+ citc?: CapitalInvestmentTaxCreditInput;
2922
+ apitc?: AgriProcessingTaxCreditInput;
2923
+ }
2924
+ interface MaximumAllowableDeductionResult {
2925
+ /** 003600 = 104 + 204 + 312. */
2926
+ creditsApplied: number;
2927
+ /** 003602 = 000068 − (000070+000071+000072+000074). May be negative; not floored. */
2928
+ room: number;
2929
+ }
2930
+ interface Schedule3Result {
2931
+ mad: MaximumAllowableDeductionResult;
2932
+ itc: InvestorTaxCreditResult;
2933
+ citc: CapitalInvestmentTaxCreditResult;
2934
+ apitc: AgriProcessingTaxCreditResult;
2935
+ /** 003604 — lesser of mad.creditsApplied and mad.room, floored at nil. */
2936
+ totalDeduction: number;
2937
+ issues: string[];
2938
+ }
2939
+ declare function computeSchedule3(input: Schedule3Input): Schedule3Result;
2940
+ /**
2941
+ * `scheduleNNValues` for Schedule 3, following the `at1-schedule-line-items.ts`
2942
+ * builder pattern (see `schedule20Values`, `schedule16Values`). Kept in THIS
2943
+ * file rather than the shared filing module per the task instructions — other
2944
+ * agents are editing `at1-schedule-line-items.ts` concurrently.
2945
+ */
2946
+ interface At1ScheduleValueLike$6 {
2947
+ lineItemId: string;
2948
+ value: string | number;
2949
+ }
2950
+ interface At1ScheduleDataLike$6 {
2951
+ scheduleId: string;
2952
+ values: At1ScheduleValueLike$6[];
2953
+ }
2954
+ /**
2955
+ * Field ids per the spec transcription above: 100-108 (ITC), 200-208 (CITC),
2956
+ * 300-316 (APITC), 600-604 (MAD). The by-year-of-origin detail pages
2957
+ * (120-130/220-230/330-340) are NOT emitted — this module does not compute a
2958
+ * per-vintage split for ITC/CITC (see the module docstring), and the APITC
2959
+ * per-vintage figures this DOES compute (304/306/308/310) are filed on the
2960
+ * 300-series rollup, not re-emitted as an AAPITC occurrence table.
2961
+ */
2962
+ declare function schedule3Values(result: Schedule3Result): At1ScheduleDataLike$6;
2963
+ //#endregion
2964
+ //#region src/t2/at1/schedules/schedule4-foreign-investment-tax-credit.d.ts
2965
+ /**
2966
+ * Alberta AT1 Schedule 4 — Alberta Foreign Investment Income Tax Credit.
2967
+ *
2968
+ * One "FIC" occurrence per foreign country in which the corporation earned
2969
+ * foreign non-business income (TRA spec §3.2.3.5, lines 4899-5082). AB form
2970
+ * 004 exists only if federal Schedule 21 (form 021) exists, and the
2971
+ * spec directs the field occurrences be sorted "in the same order as on the
2972
+ * federal form":
2973
+ *
2974
+ * 004002 country = fed 021100
2975
+ * 004004 net foreign investment income = fed 021110
2976
+ * 004006 foreign tax paid, net of the ITA 20(12)/ACTA 8(2.2) deduction
2977
+ * 004008 federal non-business foreign tax credit = fed 021180
2978
+ * 004012 allowable credit = lesser of D or G
2979
+ *
2980
+ * **004006** has a conditional business rule: if the ITA subsection 20(12)
2981
+ * deduction was computed DIFFERENTLY for Alberta (the ACTA 8(2.2) amount),
2982
+ * the value is `fed 021120 − greater(Alberta 8(2.2) amount, fed 021130)`;
2983
+ * otherwise it is `fed 021120 − fed 021130`. Both branches collapse to the
2984
+ * SAME expression: `max(albertaDeduction, fed021130)` equals `fed021130`
2985
+ * exactly when the two amounts don't differ, so this module always computes
2986
+ * the max, with the Alberta figure defaulting to the federal one. No separate
2987
+ * "differs" flag is needed — it falls out of the algebra.
2988
+ *
2989
+ * **004012** is the lesser of two amounts, D and G, transcribed exactly:
2990
+ *
2991
+ * D = 004004 × 000065 × [000068 / ((000062 − 000064) × 000065)]
2992
+ * G = (004006 − 004008) × 000065
2993
+ * 012 = lesser of D or G (calculate to 3 decimal places, rounding up at 5)
2994
+ *
2995
+ * 000062 (Alberta taxable income), 000064 (royalty tax deduction), 000065
2996
+ * (allocation factor) and 000068 (basic Alberta tax payable) are AT1 JACKET
2997
+ * lines this engine computes elsewhere (see `at1-line-items.ts`), not part of
2998
+ * this schedule — they are taken here as plain numeric inputs, named to match
2999
+ * the jacket's own field names (`albertaTaxableIncome`, `royaltyTaxDeduction`,
3000
+ * `allocationFactor`, `basicAlbertaTax`) so a caller can wire the two
3001
+ * together without renaming anything.
3002
+ *
3003
+ * D's ratio is degenerate on paper: 000068 is ITSELF DEFINED, elsewhere on the
3004
+ * jacket (line 068), as `(000062 − 000064) × 000065` — so the bracket
3005
+ * `000068 / ((000062−000064)×000065)` is exactly 1 whenever the two figures
3006
+ * agree, and D collapses to `004004 × 000065`. The spec still writes the
3007
+ * general form (it is not pre-simplified in the source) and this module
3008
+ * reproduces it literally rather than assuming the identity always holds — a
3009
+ * caller's `basicAlbertaTax` may be a filed or overridden figure that does
3010
+ * not exactly match the jacket's own formula. If the denominator is nil, D
3011
+ * cannot be computed; the module falls back to nil for that occurrence and
3012
+ * flags an issue rather than dividing by zero.
3013
+ *
3014
+ * "Calculate to 3 decimal places rounding up at 5" is applied to D and G
3015
+ * before the lesser is taken; the final 004012 amount is then rounded to the
3016
+ * nearest whole dollar, matching this repo's whole-dollar-integer convention
3017
+ * for every other field.
3018
+ *
3019
+ * The jacket total (000072, "Alberta Foreign Investment Income Tax Credit")
3020
+ * is the lesser of the SUM of all 004012 occurrences and
3021
+ * `000068 − (000070 + 000071)` — that comparison lives on the jacket, not
3022
+ * here (000070/000071 are the small business and M&P deductions, schedules
3023
+ * this module doesn't reach). This module sums the occurrences as
3024
+ * `totalAllowableCredit` for a caller to feed into that jacket comparison.
3025
+ *
3026
+ * Whole dollars, pure.
3027
+ */
3028
+ interface ForeignInvestmentCountryInput {
3029
+ /** 004002 — two-character country code. Must equal fed 021100 for the occurrence. */
3030
+ country: string;
3031
+ /** 004004 — net foreign investment income. Must equal fed 021110. */
3032
+ netForeignInvestmentIncome?: number;
3033
+ /** fed 021120 — foreign investment income tax paid, gross (before any 20(12)/8(2.2) deduction). */
3034
+ fedForeignTaxPaid?: number;
3035
+ /** fed 021130 — the ITA subsection 20(12) deduction claimed federally for the occurrence. */
3036
+ fedIta2012Deduction?: number;
3037
+ /**
3038
+ * The Alberta ACTA 8(2.2) deduction, where it was computed DIFFERENTLY than
3039
+ * the federal ITA 20(12) figure. Defaults to `fedIta2012Deduction` — the two
3040
+ * business-rule branches collapse to the same `max()` expression, so no
3041
+ * separate "differs" flag is needed.
3042
+ */
3043
+ albertaActa82Deduction?: number;
3044
+ /** 004008 — federal non-business foreign tax credit. Must equal fed 021180. */
3045
+ fedNonBusinessForeignTaxCredit?: number;
3046
+ }
3047
+ interface ForeignInvestmentCountryResult {
3048
+ country: string;
3049
+ /** 004004. */
3050
+ netForeignInvestmentIncome: number;
3051
+ /** 004006 — foreign tax paid, net of the 20(12)/8(2.2) deduction. */
3052
+ taxPaidNetOfDeduction: number;
3053
+ /** 004008. */
3054
+ federalNonBusinessForeignTaxCredit: number;
3055
+ /** D — see module doc. Rounded to 3 decimal places. */
3056
+ incomeProrationAmount: number;
3057
+ /** G — see module doc. Rounded to 3 decimal places. */
3058
+ taxPaidLessFederalCredit: number;
3059
+ /** 004012 — the lesser of D and G, floored at nil and rounded to the whole dollar. */
3060
+ allowableCredit: number;
3061
+ }
3062
+ interface Schedule4Input$1 {
3063
+ /** One occurrence per country, in the same order as the federal form. */
3064
+ countries: ForeignInvestmentCountryInput[];
3065
+ /** 000062 — AT1 jacket line: Alberta taxable income. */
3066
+ albertaTaxableIncome?: number;
3067
+ /** 000064 — AT1 jacket line: royalty tax deduction (Schedule 5). */
3068
+ royaltyTaxDeduction?: number;
3069
+ /** 000065 — AT1 jacket line: allocation factor. */
3070
+ allocationFactor?: number;
3071
+ /** 000068 — AT1 jacket line: basic Alberta tax payable. */
3072
+ basicAlbertaTax?: number;
3073
+ }
3074
+ interface Schedule4Result$1 {
3075
+ countries: ForeignInvestmentCountryResult[];
3076
+ /** Sum of all 004012 occurrences — feeds jacket line 000072 (capped there, not here). */
3077
+ totalAllowableCredit: number;
3078
+ issues: string[];
3079
+ }
3080
+ declare function computeSchedule4(input: Schedule4Input$1): Schedule4Result$1;
3081
+ /**
3082
+ * Net File line items for AT1 Schedule 4 — one FIC occurrence per country.
3083
+ * Field ids from the spec (§3.2.3.5): 002 country, 004 net foreign investment
3084
+ * income, 006 foreign tax paid net of deduction, 008 federal non-business
3085
+ * foreign tax credit, 012 allowable credit.
3086
+ *
3087
+ * Does NOT emit jacket line 000072 (the sum-vs-remaining-tax comparison) —
3088
+ * that is a jacket line, not a Schedule 4 line, and belongs to whichever
3089
+ * module builds the jacket. Use `result.totalAllowableCredit` for that.
3090
+ */
3091
+ declare function schedule4Values(result: Schedule4Result$1): At1ScheduleData;
3092
+ //#endregion
3093
+ //#region src/t2/at1/schedules/schedule5-royalty-tax-deduction.d.ts
3094
+ /**
3095
+ * Alberta AT1 Schedule 5 — Alberta Royalty Tax Deduction.
3096
+ *
3097
+ * TRA spec §3.2.3.6 (Chapter 3, lines 5083-6291). The Alberta Royalty Tax
3098
+ * Deduction (RTD) shelters "Attributed Canadian Royalty Income" — Crown
3099
+ * charges net of the resource allowance and reimbursements — against Alberta
3100
+ * taxable income. Form 005 (this schedule) is required whenever the
3101
+ * corporation has Attributed Canadian Royalty Income, and **Form 007 (AT1
3102
+ * Schedule 7 — Royalty Tax Credit/Deduction Supplemental Information) must be
3103
+ * completed before Form 005** (line 5133-5138): "IF FORM 007 IS NOT INCLUDED
3104
+ * WITH FORMS 005 AND/OR 006, THEN THE CLIENT'S RTC ENTITLEMENT WILL BE
3105
+ * DISALLOWED."
3106
+ *
3107
+ * ── Structure ────────────────────────────────────────────────────────────
3108
+ *
3109
+ * The schedule has two independent pool systems that both feed AT1 core line
3110
+ * 064 (Royalty Tax Deduction):
3111
+ *
3112
+ * 1. **CRTD** ("Calculation of the Royalty Tax Deduction", 005001-005027) —
3113
+ * the corporation's OWN unsuccessored royalty pool. A single running
3114
+ * pool with a discretionary claim (line 016), capped by what remains
3115
+ * available.
3116
+ * 2. **Successored pools** (Area C/D, 005101-005140) — per-vendor pools
3117
+ * acquired on a change in control or the acquisition of substantially
3118
+ * all Canadian resource properties, split into "second successored"
3119
+ * (SSPI, 005101-005115) and "first successored" (FSPI, 005121-005135)
3120
+ * generations. Unlike the CRTD, each occurrence's claim is MANDATORY
3121
+ * arithmetic (marked "M" in the spec), not discretionary: it is exactly
3122
+ * `min(pool base, property income)`.
3123
+ *
3124
+ * AT1 core line 064 = `005016 + 005140`, capped at AT1 core line 062 (Alberta
3125
+ * Taxable Income before the deduction). This engine cannot see line 062 (it
3126
+ * belongs to the AT1 jacket, not this schedule) so it is accepted as a plain
3127
+ * numeric input, `albertaTaxableIncomeBeforeDeduction`.
3128
+ *
3129
+ * ── Cross-references accepted as plain inputs (NOT re-derived here) ────────
3130
+ *
3131
+ * • **005001** (Crown charges, line 001) is "the amount from [AT1] Schedule
3132
+ * 7, line 061" — a nine-term sum over Schedule 7's own Crown-payment,
3133
+ * partnership-share and prior-year-adjustment sections (007003 + 007005 +
3134
+ * 007007 + 007009 + 007011 + 007013 + 007017 + 007025 + 007029 + Σ007077
3135
+ * + Σ007079 + Σ007081 − 007051). AT1 Schedule 7 is a separate schedule
3136
+ * with its own filing requirement (see above) built independently of this
3137
+ * module. This engine accepts the finished Schedule 7 line 061 figure —
3138
+ * `crownChargesNetOfReimbursements` — and applies only the final "if
3139
+ * negative, default to zero" step that line 001 itself specifies.
3140
+ * • **005005** (resource allowance, line 005): "Value = 012024 if it
3141
+ * exists, otherwise default to fed 001346." AT1 Schedule 12
3142
+ * (income/loss reconciliation) and federal Schedule 1 are both external
3143
+ * to this module; the two candidate figures are accepted as plain inputs
3144
+ * and this schedule applies only the stated precedence.
3145
+ *
3146
+ * ── A literal-spec asymmetry worth flagging (not "fixed") ──────────────────
3147
+ *
3148
+ * Line 013 (the pool available before the current year's claim, used to
3149
+ * build lines 016 and 017) is `005001 − 005005 − 005007 + 005011` — it nets
3150
+ * out **reimbursements (005007)**. Line 025 (the Attributed Royalty Income
3151
+ * carried forward to NEXT year) is defined by the spec as `005001 − 005005 +
3152
+ * 005011 − 000064 − 005023` (or, when `005001 − 005005 < 0`, `005011 − 000064
3153
+ * − 005023`) — with **no 005007 term at all**. That is exactly what TRA's
3154
+ * EFILE business rule states (lines 5379-5386 of the spec); this module
3155
+ * implements it literally rather than assuming the omission is a transcription
3156
+ * error and "fixing" it to match line 013's shape.
3157
+ *
3158
+ * Also note line 025 subtracts **000064**, the COMBINED royalty tax deduction
3159
+ * (CRTD claim + successored total, capped at Alberta taxable income) — not
3160
+ * just the CRTD's own claim (005016). That is likewise the literal EFILE
3161
+ * mapping, not a simplification made here.
3162
+ *
3163
+ * Whole dollars, pure.
3164
+ */
3165
+ /** One predecessor's transfer into the corporation's unsuccessored pool (Area B, 005031-005037). */
3166
+ interface At1Schedule5PredecessorTransfer {
3167
+ /** 005031 — predecessor's legal name. */
3168
+ predecessorName: string;
3169
+ /** 005033 — Alberta Corporate Account Number, if the predecessor was Alberta-registered. */
3170
+ albertaCorporateAccountNumber?: string;
3171
+ /** 005035 — date of the transfer event (ISO `YYYY-MM-DD`), within the corporation's taxation year. */
3172
+ dateOfEvent: string;
3173
+ /** 005037 — carry-forward amount transferred to this corporation. */
3174
+ amountTransferred: number;
3175
+ }
3176
+ /**
3177
+ * One occurrence in a successored-pool section (SSPI 005101-005115 or FSPI
3178
+ * 005121-005135). `poolBroughtForward` and `acquisitionAmount` are mutually
3179
+ * exclusive per the spec ("only one field can exist" for 105/107 and for
3180
+ * 125/127) — supply exactly one.
3181
+ */
3182
+ interface At1Schedule5SuccessoredPoolEntry {
3183
+ /** 005101 / 005121 — legal name of the vendor, predecessor, or the corporation itself on a change in control. */
3184
+ vendorName: string;
3185
+ /** 005103 / 005123 — date of the event (ISO `YYYY-MM-DD`), oldest to newest across occurrences. */
3186
+ dateOfEvent: string;
3187
+ /**
3188
+ * 005105 / 005125 — pool amount available for carry-forward at the end of
3189
+ * the preceding year (continuing an existing successored pool). Mutually
3190
+ * exclusive with `acquisitionAmount` for the same occurrence.
3191
+ */
3192
+ poolBroughtForward?: number;
3193
+ /**
3194
+ * 005107 / 005127 — cost on acquisition of all/substantially all Canadian
3195
+ * resource properties, or on a change in control, under s.20(8) or 20(14)
3196
+ * (a NEW successored pool this year). Mutually exclusive with
3197
+ * `poolBroughtForward` for the same occurrence.
3198
+ */
3199
+ acquisitionAmount?: number;
3200
+ /** 005109 / 005129 — property income under s.20(1)(c). A loss (negative) is treated as nil. */
3201
+ propertyIncome: number;
3202
+ }
3203
+ /** Result for one successored-pool occurrence (005111/005113 or 005131/005133). */
3204
+ interface At1Schedule5SuccessoredPoolEntryResult {
3205
+ vendorName: string;
3206
+ dateOfEvent: string;
3207
+ /** (105 or 107) / (125 or 127) — the pool base for this occurrence. */
3208
+ base: number;
3209
+ /**
3210
+ * Which mutually-exclusive field `base` came from — 105/125 for
3211
+ * `'broughtForward'`, 107/127 for `'acquired'`, or `'unspecified'` when
3212
+ * neither was supplied (base is nil; see the `issues` entry for the
3213
+ * occurrence). Drives which line `schedule5Values` files `base` under.
3214
+ */
3215
+ baseKind: 'broughtForward' | 'acquired' | 'unspecified';
3216
+ /** Property income, floored at zero. */
3217
+ propertyIncome: number;
3218
+ /** 005111 / 005131 — mandatory arithmetic: min(base, propertyIncome). */
3219
+ claim: number;
3220
+ /** 005113 / 005133 — base minus claim. */
3221
+ carryForwardBeforeTransfer: number;
3222
+ }
3223
+ /** 005026/005027 — whether the resource pools were transferred during the year. */
3224
+ interface At1Schedule5PoolTransfer {
3225
+ /**
3226
+ * 005026 — 1: transfer due to disposition of all/substantially all Canadian
3227
+ * resource properties (s.20(8)); 2: transfer due to a change in control or
3228
+ * ceasing to be exempt under s.20(14); 3: no transfer occurred.
3229
+ */
3230
+ type: 1 | 2 | 3;
3231
+ /** 005027 — legal name of the acquiring corporation. Required when `type` is 1 or 2; must be absent when 3. */
3232
+ acquirerName?: string;
3233
+ }
3234
+ interface AlbertaSchedule5Input {
3235
+ /**
3236
+ * 005001 — Crown charges under s.20(6)(a)-(e), with reference to s.20(13):
3237
+ * AT1 Schedule 7, line 061. See the module docstring — this is Schedule 7's
3238
+ * finished output, not re-derived here. Floored at zero per the spec's
3239
+ * final step on line 001.
3240
+ */
3241
+ crownChargesNetOfReimbursements?: number;
3242
+ /**
3243
+ * 005005 — resource allowance claimed under s.20(6)(g). Prefer
3244
+ * `albertaResourceAllowance` (AT1 Schedule 12, line 024); falls back to
3245
+ * `federalResourceAllowance` (federal Schedule 1, line 346) when absent,
3246
+ * per the spec's stated precedence.
3247
+ */
3248
+ albertaResourceAllowance?: number;
3249
+ /** 005005 fallback — federal Schedule 1, line 346. Used only when `albertaResourceAllowance` is not supplied. */
3250
+ federalResourceAllowance?: number;
3251
+ /**
3252
+ * 005007 — reimbursements received under a contract in respect of amounts
3253
+ * on line 001, under s.20(6)(f). Must not already be netted into
3254
+ * `crownChargesNetOfReimbursements`. Excludes ARTC and other government
3255
+ * rebates or credits (per the spec note).
3256
+ */
3257
+ reimbursementsForCrownCharges?: number;
3258
+ /** 005043 — corporation's own unsuccessored pool C/F from the preceding year (normally last year's 005017; enter manually if unavailable). */
3259
+ openingUnsuccessoredPoolBalance?: number;
3260
+ /** 005031-005037 — predecessor transfers into the unsuccessored pool (amalgamation under s.20(10), or wind-up of a wholly-owned subsidiary under s.20(11)). */
3261
+ predecessorTransfers?: readonly At1Schedule5PredecessorTransfer[];
3262
+ /**
3263
+ * 005016 — the CRTD claim actually made against the unsuccessored pool.
3264
+ * Discretionary (spec marks it "X", not "M"): omit to claim the maximum
3265
+ * available (lesser of the pool balance and remaining Alberta taxable
3266
+ * income capacity).
3267
+ */
3268
+ crtdAmountClaimed?: number;
3269
+ /** 005023 — Attributed Royalty Income transferred to another corporation during the year on disposal of substantially all Canadian resource properties. */
3270
+ transferredOnDisposal?: number;
3271
+ /** 005200 — whether the corporation has any successored pools to report. When false, `secondSuccessoredPools`/`firstSuccessoredPools` must be empty (spec: 005101-005140 "must not exist"). */
3272
+ hasSuccessoredPools?: boolean;
3273
+ /** SSPI, 005101-005115 — second successored pool occurrences, oldest date of event first. */
3274
+ secondSuccessoredPools?: readonly At1Schedule5SuccessoredPoolEntry[];
3275
+ /** FSPI, 005121-005135 — first successored pool occurrences, oldest date of event first. */
3276
+ firstSuccessoredPools?: readonly At1Schedule5SuccessoredPoolEntry[];
3277
+ /** 005026/005027 — pool transfer during the year, if any. */
3278
+ poolTransfer?: At1Schedule5PoolTransfer;
3279
+ /**
3280
+ * 005100 — was there a change in control that created the immediately
3281
+ * preceding taxation year end? Informational; cross-checked against the
3282
+ * AT1 core fields below when both are supplied.
3283
+ */
3284
+ changeInControlEndedPrecedingYear?: boolean;
3285
+ /** AT1 core 000038 — tax year end changed since the last return filed. For the 005100 cross-check only. */
3286
+ at1TaxYearEndChanged?: boolean;
3287
+ /** AT1 core 000039 — reason for the tax year end change (2 = change in control). For the 005100 cross-check only. */
3288
+ at1TaxYearEndChangeReason?: 1 | 2 | 3;
3289
+ /**
3290
+ * AT1 core 000062 — Alberta Taxable Income (Loss) before this deduction.
3291
+ * Owned by the AT1 jacket, not this schedule; caps both the CRTD claim
3292
+ * (line 016) and the combined total (line 064).
3293
+ */
3294
+ albertaTaxableIncomeBeforeDeduction?: number;
3295
+ }
3296
+ interface AlbertaSchedule5Result {
3297
+ /** 005001, floored at zero. */
3298
+ crownCharges: number;
3299
+ /** 005005. */
3300
+ resourceAllowance: number;
3301
+ /** 005007. */
3302
+ reimbursements: number;
3303
+ /** Sum of 005037 across predecessor transfers. */
3304
+ predecessorTransfersTotal: number;
3305
+ /** 005011 = 005043 + Σ005037. */
3306
+ attributedRoyaltyIncomeCarryForwardIn: number;
3307
+ /** Line 013 (unlabeled internal subtotal) = 005001 − 005005 − 005007 + 005011. */
3308
+ unsuccessoredPoolAvailable: number;
3309
+ /** The maximum line 016 could claim: max(0, min(unsuccessoredPoolAvailable, 000062 − 005140)). */
3310
+ crtdMaxClaimable: number;
3311
+ /** 005016 — the CRTD claim actually made. */
3312
+ crtdClaim: number;
3313
+ /** 005017 = unsuccessoredPoolAvailable − crtdClaim. */
3314
+ poolAvailableCarryForward: number;
3315
+ /** 005023, passed through. */
3316
+ transferredOnDisposal: number;
3317
+ /** SSPI results, in input order. */
3318
+ secondSuccessoredPools: At1Schedule5SuccessoredPoolEntryResult[];
3319
+ /** FSPI results, in input order. */
3320
+ firstSuccessoredPools: At1Schedule5SuccessoredPoolEntryResult[];
3321
+ /** 005115 = Σ SSPI carryForwardBeforeTransfer. */
3322
+ secondSuccessoredSubtotal: number;
3323
+ /** 005135 = Σ FSPI carryForwardBeforeTransfer. */
3324
+ firstSuccessoredSubtotal: number;
3325
+ /** 005140 = Σ SSPI claims + Σ FSPI claims. */
3326
+ successoredTotal: number;
3327
+ /** AT1 core 000064 = min(005016 + 005140, 000062), floored at zero (see `issues` when this floor binds). */
3328
+ totalRoyaltyTaxDeduction: number;
3329
+ /** 005025, floored at zero. */
3330
+ attributedRoyaltyIncomeCarryForwardOut: number;
3331
+ /** 005026/005027, passed through from input for filing — see `schedule5Values`. */
3332
+ poolTransfer?: At1Schedule5PoolTransfer;
3333
+ /** 005100, passed through from input for filing — see `schedule5Values`. */
3334
+ changeInControlEndedPrecedingYear?: boolean;
3335
+ /** True once there is Attributed Canadian Royalty Income (per the spec, this is when Form 005 must be filed). */
3336
+ formRequired: boolean;
3337
+ issues: string[];
3338
+ }
3339
+ declare function computeAlbertaSchedule5(input: AlbertaSchedule5Input): AlbertaSchedule5Result;
3340
+ /**
3341
+ * `scheduleNNValues` for Schedule 5, following the `at1-schedule-line-items.ts`
3342
+ * builder pattern (see `schedule17Values`, `schedule18Values`, and the sibling
3343
+ * `schedule3Values` in `schedule3-other-deductions-credits.ts`). Kept in THIS
3344
+ * file rather than the shared filing module per the task instructions — other
3345
+ * agents are wiring their own schedules into `at1-schedule-line-items.ts`
3346
+ * concurrently.
3347
+ *
3348
+ * Emits every line `AlbertaSchedule5Result` carries a value for:
3349
+ * 005001, 005005, 005007, 005011, 005016, 005017, 005023, 005025, 005026,
3350
+ * 005027, 005100, and the successored-pool occurrences 005101-005140.
3351
+ *
3352
+ * NOT emitted, because the result does not retain them distinctly:
3353
+ * 005031-005043 (Area B predecessor-transfer detail and the opening pool
3354
+ * balance) — the module aggregates both into 005011
3355
+ * (`attributedRoyaltyIncomeCarryForwardIn`) and does not carry the
3356
+ * per-predecessor breakdown or the raw opening balance forward into the
3357
+ * result; and 005200, which gates whether the successored sections are
3358
+ * processed at all but is not itself a filed dollar/detail line.
3359
+ */
3360
+ interface At1ScheduleValueLike$5 {
3361
+ lineItemId: string;
3362
+ value: string | number;
3363
+ }
3364
+ interface At1ScheduleDataLike$5 {
3365
+ scheduleId: string;
3366
+ values: At1ScheduleValueLike$5[];
3367
+ }
3368
+ declare function schedule5Values(result: AlbertaSchedule5Result): At1ScheduleDataLike$5;
3369
+ //#endregion
3370
+ //#region src/t2/at1/schedules/schedule6-royalty-tax-credit.d.ts
3371
+ /**
3372
+ * Alberta AT1 Schedule 6 — Alberta Royalty Tax Credit.
3373
+ *
3374
+ * TRA spec §3.2.3.7 (Chapter 3, lines 6292-6653). Required "If the corp, for
3375
+ * the taxation year, has incurred Alberta Crown Royalty in respect of a
3376
+ * royalty receivable by or payable to Alberta under a lease or licence
3377
+ * granting petroleum rights, natural gas rights or petroleum and natural gas
3378
+ * rights" (spec lines 6342-6361). Two filing preconditions worth carrying
3379
+ * into any caller, neither of which this pure module can enforce itself:
3380
+ * **AT1 Schedule 7 must be completed before Schedule 6** ("IF FORM 007 IS NOT
3381
+ * INCLUDED WITH FORMS 005 AND/OR 006, THEN THE CLIENT'S RTC ENTITLEMENT WILL
3382
+ * BE DISALLOWED" — spec lines 6710-6715), and the completed form "must be
3383
+ * submitted to Treasury Board and Finance within three years of the taxation
3384
+ * year end in which the Alberta Crown Royalty was incurred" (spec lines
3385
+ * 6354-6360).
3386
+ *
3387
+ * ── The four fields this schedule's own MAPPINGS table actually defines ────
3388
+ *
3389
+ * 006002 ARTC Is the corp associated with one or more corporations that
3390
+ * have incurred Alberta Crown Royalty in the year? 1 = Yes,
3391
+ * default 2 = No. (spec lines 6363-6373)
3392
+ * 006004 Alberta Crown Royalty incurred in the taxation year:
3393
+ * 007003 + Σ007077 − Σ007087 + Σ007089. (spec lines 6375-6384)
3394
+ * 006006 Crown Royalty Shelter — see below. (spec lines 6443-6448)
3395
+ * 006008 Weighted Average Rate — see below. (spec lines 6450-6464)
3396
+ *
3397
+ * plus two sections that exist ONLY when 006002 = 1 (associated):
3398
+ *
3399
+ * ACRS (006022-006028) — the ASSOCIATED corporation with the longest
3400
+ * taxation year: its Corporate Account Number, tax year dates, and
3401
+ * the number of days in that year (max 365). (spec lines 6466-6558)
3402
+ * AACRS (006030-006034) — the $2,000,000 shelter pool, sized by the
3403
+ * longest associated year (006028), ALLOCATED among the associated
3404
+ * group. Sort such that the FIRST occurrence (006030001) is the
3405
+ * corporation filing this return — 006006 (this filer's own
3406
+ * shelter) then equals 006034001 exactly. Each allocation, and the
3407
+ * sum of all allocations, is capped at $2,000,000 ×
3408
+ * (006028 / 365). (spec lines 6559-6652)
3409
+ *
3410
+ * ── 006004 is accepted as a plain input, not re-derived here ───────────────
3411
+ *
3412
+ * Every term of 006004's formula (007003, 007077, 007087, 007089) lives on
3413
+ * AT1 Schedule 7, which this package also implements
3414
+ * (`schedule7-royalty-supplemental.ts`). Rather than re-import Schedule 7's
3415
+ * internals here, `albertaCrownRoyaltyIncurred` is taken as a plain numeric
3416
+ * input — pass `computeAlbertaSchedule7(...).albertaCrownRoyaltyForSchedule6`,
3417
+ * which computes that exact formula. This mirrors how AT1 Schedule 20 takes
3418
+ * its Schedule 12 income ceiling as a plain input rather than importing
3419
+ * Schedule 12: the two schedules stay independently testable, and the wiring
3420
+ * between them is the caller's job (`alberta-return.ts`), not this module's.
3421
+ *
3422
+ * ── 006006 Crown Royalty Shelter — two mutually exclusive paths ────────────
3423
+ *
3424
+ * associated (006002 = 1): 006006 = 006034001 (this filer's own
3425
+ * allocation from the AACRS pool below)
3426
+ * not associated (006002 = 2): 006006 = $2,000,000 × (days in this corp's
3427
+ * own taxation year, max 365) / 365
3428
+ *
3429
+ * ── 006008 Weighted Average Rate — an EXTERNAL rate table, not computed ─────
3430
+ *
3431
+ * "For each calendar quarter that the taxation year spans, enter the sum of
3432
+ * the number of days in the taxation year that fall within the calendar
3433
+ * quarter / total number of days in the taxation year X RTC quarterly rate
3434
+ * ... Note that the rate can be found on website:
3435
+ * http://www.finance.alberta.ca/publications/tax_rebates/rates/rtc1.html"
3436
+ * (spec lines 6450-6464). The RTC quarterly rate itself is a published
3437
+ * external figure this engine has no source for; `quarters` therefore takes
3438
+ * BOTH the day-count weight and the already-looked-up rate per quarter, and
3439
+ * this module only does the weighting arithmetic the spec states, to 4
3440
+ * decimal places (e.g. `.7500`, `.6667`).
3441
+ *
3442
+ * ── CONFIRMED: there is no "credit" dollar amount to compute here ──────────
3443
+ *
3444
+ * The transcribed range for this schedule (spec lines 6292-6653) ends after
3445
+ * 006034 with no field that multiplies the weighted average rate (006008) by
3446
+ * the royalty incurred (006004) or the shelter (006006) into a claimable
3447
+ * credit — and this is not a transcription gap. Traced through the AT1
3448
+ * jacket's own MAPPINGS (spec §3.2.3.1): the balance-owing reconciliation is
3449
+ * `090 = 080 − (081 + 082 + 085 + 086 + 087)`, where 080 is Alberta Tax
3450
+ * Payable, 081 is the SR&ED credit (form 009), 082 is "Instalments and other
3451
+ * payments **and ARTC instalments** credited to income tax account for this
3452
+ * taxation year" — a single, plain, preparer-entered figure — and 086/087 are
3453
+ * the capital gains refund and other credits. No line in that sequence reads
3454
+ * "if form 006 exists, value = ...", unlike every other schedule's credit
3455
+ * (see 072 = form 004, 074 = form 008, 081 = form 009).
3456
+ *
3457
+ * The Alberta Royalty Tax Credit is administered as an INSTALMENT PROGRAM,
3458
+ * not an annual claimed credit: TRA pays or credits ARTC instalments to the
3459
+ * corporation during the year based on estimated entitlement, and the
3460
+ * corporation simply reports what it already received at line 082 (already
3461
+ * collected in this app's shared "Payments & Instalments" schedule) — it
3462
+ * does not compute a fresh credit from Schedule 6/7's own figures on this
3463
+ * return. Schedule 6/7 exist to establish the royalty amount, shelter and
3464
+ * rate TRA uses to determine those instalments (and to support TRA's own
3465
+ * assessment), not to produce a number the corporation deducts here. So this
3466
+ * module correctly stops at the three components (006004, 006006, 006008)
3467
+ * — that is the schedule's whole job.
3468
+ *
3469
+ * Whole dollars, pure.
3470
+ */
3471
+ /** ACRS (006022-006028) — the associated corporation with the longest taxation year. */
3472
+ interface RoyaltyTaxCreditLongestAssociatedYear {
3473
+ /** 006022 — Alberta Corporate Account Number of that corporation. */
3474
+ albertaCan?: string;
3475
+ /** 006024 — that corporation's taxation year beginning, ISO `YYYY-MM-DD`. */
3476
+ taxationYearBeginning?: string;
3477
+ /** 006026 — that corporation's taxation year ending, ISO `YYYY-MM-DD`. */
3478
+ taxationYearEnding?: string;
3479
+ /** 006028 — number of days in that taxation year, capped at 365 on the form. */
3480
+ days: number;
3481
+ }
3482
+ /** One row of the AACRS allocation table (006030-006034). */
3483
+ interface RoyaltyTaxCreditShelterAllocation {
3484
+ /** 006030 — name of the corporation. Sort so the FIRST row is the corporation filing this return. */
3485
+ name: string;
3486
+ /** 006032 — Alberta Corporate Account Number, if this row is not the filer. */
3487
+ albertaCan?: string;
3488
+ /** 006034 — amount of the $2,000,000 shelter pool allocated to this corporation. */
3489
+ allocatedAmount: number;
3490
+ }
3491
+ /** One resolved allocation row, after the per-row and aggregate caps are applied. */
3492
+ interface RoyaltyTaxCreditShelterAllocationResult {
3493
+ name: string;
3494
+ albertaCan?: string;
3495
+ /** 006034, capped at the pool per row. See `AlbertaSchedule6Result.issues` if capping occurred. */
3496
+ allocatedAmount: number;
3497
+ /** What was actually requested before capping, for the audit trail. */
3498
+ requestedAmount: number;
3499
+ }
3500
+ /** One quarter the taxation year spans, for the 006008 weighted-average-rate calculation. */
3501
+ interface RoyaltyTaxCreditQuarter {
3502
+ /** Number of days in the taxation year that fall within this calendar quarter. */
3503
+ days: number;
3504
+ /** The published RTC quarterly rate for this calendar quarter, as a decimal (e.g. 0.0473). */
3505
+ rate: number;
3506
+ }
3507
+ interface AlbertaSchedule6Input {
3508
+ /** 006002 — is the corp associated with one or more corporations that incurred Alberta Crown Royalty in the year? Defaults to No. */
3509
+ associatedWithCrownRoyaltyCorporations?: boolean;
3510
+ /**
3511
+ * 006004 — Alberta Crown Royalty incurred in the taxation year. Pass
3512
+ * `computeAlbertaSchedule7(...).albertaCrownRoyaltyForSchedule6`; see the
3513
+ * module docstring for why this is a plain input rather than re-derived.
3514
+ */
3515
+ albertaCrownRoyaltyIncurred?: number;
3516
+ /**
3517
+ * Days in THIS corporation's own taxation year — used only on the
3518
+ * NOT-associated shelter path (006002 = 2). Defaults to 365 (a full year)
3519
+ * and is capped at 365, per the form's own "(max 365)".
3520
+ */
3521
+ taxationYearDays?: number;
3522
+ /** ACRS — required when `associatedWithCrownRoyaltyCorporations` is true. */
3523
+ longestAssociatedYear?: RoyaltyTaxCreditLongestAssociatedYear;
3524
+ /**
3525
+ * AACRS — required when `associatedWithCrownRoyaltyCorporations` is true.
3526
+ * The FIRST entry must be the corporation filing this return — its
3527
+ * (possibly capped) `allocatedAmount` becomes 006006.
3528
+ */
3529
+ allocations?: readonly RoyaltyTaxCreditShelterAllocation[];
3530
+ /** 006008 — one entry per calendar quarter the taxation year spans. */
3531
+ quarters?: readonly RoyaltyTaxCreditQuarter[];
3532
+ }
3533
+ interface AlbertaSchedule6Result {
3534
+ /** 006002. */
3535
+ associatedWithCrownRoyaltyCorporations: boolean;
3536
+ /** 006004. */
3537
+ albertaCrownRoyaltyIncurred: number;
3538
+ /** 006006. */
3539
+ crownRoyaltyShelter: number;
3540
+ /** 006008, to 4 decimal places. */
3541
+ weightedAverageRate: number;
3542
+ /** ACRS, echoed through with `days` resolved — present only when associated. */
3543
+ longestAssociatedYear?: RoyaltyTaxCreditLongestAssociatedYear;
3544
+ /** The $2,000,000 × (006028 / 365) pool being allocated — present only when associated. */
3545
+ aggregateShelterPool: number;
3546
+ /** AACRS, after per-row and aggregate capping. */
3547
+ allocations: RoyaltyTaxCreditShelterAllocationResult[];
3548
+ /** Σ allocated (post-cap). Cannot exceed `aggregateShelterPool`. */
3549
+ totalAllocated: number;
3550
+ /** Whether Alberta Crown Royalty was incurred at all — the form's own trigger condition (spec lines 6342-6361), evaluated from `albertaCrownRoyaltyIncurred` alone. */
3551
+ formRequired: boolean;
3552
+ issues: string[];
3553
+ }
3554
+ /**
3555
+ * `scheduleNNValues` for Schedule 6, following the `at1-schedule-line-items.ts`
3556
+ * builder pattern (see `schedule3Values` in `schedule3-other-deductions-credits.ts`
3557
+ * for the identical local-type convention). Kept in THIS file rather than the
3558
+ * shared filing module — other agents edit `at1-schedule-line-items.ts`
3559
+ * concurrently.
3560
+ */
3561
+ interface At1ScheduleValueLike$4 {
3562
+ lineItemId: string;
3563
+ value: string | number;
3564
+ }
3565
+ interface At1ScheduleDataLike$4 {
3566
+ scheduleId: string;
3567
+ values: At1ScheduleValueLike$4[];
3568
+ }
3569
+ /**
3570
+ * Emits every field this module's own MAPPINGS transcription actually defines
3571
+ * a number for: 006002/004/006/008, and — only when the corporation is
3572
+ * associated — the ACRS section (006022-028) and the AACRS allocation table
3573
+ * (006030-034, one occurrence per row).
3574
+ *
3575
+ * ── No credit amount is filed here, because none exists on this schedule ────
3576
+ *
3577
+ * See the module docstring's "CONFIRMED: there is no 'credit' dollar amount
3578
+ * to compute here" section — the Alberta Royalty Tax Credit is an instalment
3579
+ * program (AT1 jacket line 000082, the shared "Payments & Instalments"
3580
+ * schedule), not a value Schedule 6 computes and files. This builder emits
3581
+ * exactly the three components the schedule DOES define (006004, 006006,
3582
+ * 006008) plus the ACRS/AACRS detail when associated — matching
3583
+ * `schedule3Values`'s `At1ScheduleDataLike` shape exactly: `{ scheduleId,
3584
+ * values }`.
3585
+ */
3586
+ declare function schedule6Values(result: AlbertaSchedule6Result): At1ScheduleDataLike$4;
3587
+ declare function computeAlbertaSchedule6(input: AlbertaSchedule6Input): AlbertaSchedule6Result;
3588
+ //#endregion
3589
+ //#region src/t2/at1/schedules/schedule7-royalty-supplemental.d.ts
3590
+ /**
3591
+ * Alberta AT1 Schedule 7 — Alberta Royalty Tax Credit/Deduction Supplemental
3592
+ * Information.
3593
+ *
3594
+ * TRA spec §3.2.3.8 (Chapter 3, lines 6654-7251). Schedule 7 is not itself a
3595
+ * claim — it is the disclosure schedule that supports BOTH AT1 Schedule 5
3596
+ * (Royalty Tax Deduction) and AT1 Schedule 6 (Royalty Tax Credit): "If there
3597
+ * is a requirement for forms 005 and/or form 006, then form 007 must be
3598
+ * completed. IF FORM 007 IS NOT INCLUDED WITH FORMS 005 AND/OR 006, THEN THE
3599
+ * CLIENT'S RTC ENTITLEMENT WILL BE DISALLOWED" (spec lines 6704-6715).
3600
+ * Schedule 5 is built independently by another module in this package; this
3601
+ * one only produces the figures Schedule 5 and Schedule 6 each cite as coming
3602
+ * "from Schedule 7".
3603
+ *
3604
+ * ── Structure ────────────────────────────────────────────────────────────
3605
+ *
3606
+ * CPI (Crown Payment Information, 007003-007029) — the corporation's own
3607
+ * crown charges, transcribed line by line from the income statement
3608
+ * (fed form 125) and balance sheet (fed form 100).
3609
+ * PITI (Partnership Income Tax Information, 007071-007081) — one row per
3610
+ * partnership the corporation is a member of, repeating.
3611
+ * ACRA (Adjustments to ACR Reported in the Current year but Relating to
3612
+ * prior taxation years, 007083-007091) — one row per prior-year
3613
+ * correction, repeating.
3614
+ *
3615
+ * ── Two totals with NO defining row of their own in this MAPPINGS table ────
3616
+ *
3617
+ * Both totals below are cited BY NAME from other schedules' own field
3618
+ * definitions elsewhere in the same spec document, but neither has its own
3619
+ * row inside Schedule 7's MAPPINGS block (spec lines 6654-7251, the full
3620
+ * extent of Schedule 7 in this document) — the field numbering jumps
3621
+ * 007051 → 007071 with no 007061 row ever printed, even though line 061 is
3622
+ * referenced as an existing, fully-defined line. Both are modelled here
3623
+ * because their formulas are stated explicitly elsewhere in the spec, not
3624
+ * guessed:
3625
+ *
3626
+ * **007051** ("Total Adjustments to current year Alberta Crown Royalty due
3627
+ * to adjustments from Prior Production Years") DOES have its own row
3628
+ * (spec lines 6939-6947):
3629
+ * 051 = Σ (007087 − 007089 + 007091), default zero if no ACRA rows.
3630
+ *
3631
+ * **007061** has no row in 6654-7251, but AT1 Schedule 5's own field 005001
3632
+ * ("Crown charges") cites it verbatim, formula included in full (spec
3633
+ * lines 5237-5248, inside Schedule 5's own MAPPINGS block, not Schedule
3634
+ * 7's):
3635
+ * "Enter the amount from Schedule 7, line 061.
3636
+ * 007003 + 007005 + 007007 + 007009 + 007011 + 007013 + 007017 +
3637
+ * 007025 + 007029 + (sum of all 007077) + (sum of all 007079) +
3638
+ * (sum of all 007081) − 007051
3639
+ * if negative, default to zero."
3640
+ * The "if negative, default to zero" step is Schedule 5's own 005001 rule
3641
+ * (confirmed against the Schedule 5 module in this package, which applies
3642
+ * that floor itself), so `crownChargesNetOfReimbursements` here is left
3643
+ * SIGNED — un-floored — and the floor is Schedule 5's job, not this
3644
+ * module's.
3645
+ *
3646
+ * ── A sign asymmetry between 007051 and 006004, not resolved here ──────────
3647
+ *
3648
+ * AT1 Schedule 6's own field 006004 ("Alberta Crown Royalty incurred in the
3649
+ * taxation year") is defined, also elsewhere in the spec (Schedule 6's own
3650
+ * block, lines 6375-6384), as:
3651
+ *
3652
+ * 006004 = 007003 + (sum of all 007077) − (sum of all 007087)
3653
+ * + (sum of all 007089)
3654
+ *
3655
+ * That is the OPPOSITE sign treatment of 007087/007089 from 007051 above
3656
+ * (which adds 087 and subtracts 089). Both formulas are transcribed exactly
3657
+ * as printed — this module does not "correct" the apparent inversion, and
3658
+ * `albertaCrownRoyaltyForSchedule6` and `totalAdjustments` are computed
3659
+ * independently, each per its own literal spec text. Flagged for the filer
3660
+ * to confirm against the live form rather than silently normalized.
3661
+ *
3662
+ * ── Cross-reference to Schedule 5 (built independently, out of scope here) ──
3663
+ *
3664
+ * `totalPartnershipShareOtherCrownCharges` (Σ007081, "corporation's share of
3665
+ * other Crown charges eligible for Royalty Tax Deduction") feeds Schedule 5,
3666
+ * not this schedule — it is exposed here purely as data collected on this
3667
+ * form, computed and passed through, never consumed by Schedule 6 or by any
3668
+ * calculation inside this module.
3669
+ *
3670
+ * Whole dollars, pure.
3671
+ */
3672
+ /** One partnership the corporation is a member of (PITI, 007071-007081). */
3673
+ interface RoyaltySupplementalPartnership {
3674
+ /** 007071 — legal name of the partnership. */
3675
+ name: string;
3676
+ /** 007073 — corporation's percentage interest, as a decimal (0.75, not 75). Expressed to 4 decimal places on the form. */
3677
+ interestPercent: number;
3678
+ /** 007075 — partnership fiscal period end, ISO `YYYY-MM-DD`. */
3679
+ fiscalPeriodEnd?: string;
3680
+ /** 007077 — corporation's share of Alberta Crown Royalties eligible for the Royalty Tax Credit. */
3681
+ shareEligibleForCredit?: number;
3682
+ /** 007079 — corporation's share of other royalties paid to Alberta not eligible for the Royalty Tax Credit. */
3683
+ shareOtherRoyaltiesNotEligible?: number;
3684
+ /**
3685
+ * 007081 — corporation's share of other Crown charges eligible for the
3686
+ * Royalty Tax Deduction. Feeds AT1 Schedule 5 (built independently); not
3687
+ * used anywhere in this module's own arithmetic beyond being summed and
3688
+ * passed through.
3689
+ */
3690
+ shareOtherCrownChargesEligibleForDeduction?: number;
3691
+ }
3692
+ /** One resolved partnership row. */
3693
+ interface RoyaltySupplementalPartnershipResult {
3694
+ name: string;
3695
+ interestPercent: number;
3696
+ fiscalPeriodEnd?: string;
3697
+ shareEligibleForCredit: number;
3698
+ shareOtherRoyaltiesNotEligible: number;
3699
+ shareOtherCrownChargesEligibleForDeduction: number;
3700
+ }
3701
+ /**
3702
+ * One prior-year Alberta Crown Royalty adjustment reported in the current
3703
+ * accounting period (ACRA, 007083-007091).
3704
+ */
3705
+ interface RoyaltySupplementalPriorYearAdjustment {
3706
+ /** 007083 — the prior production period (taxation year end) the adjustment relates to, ISO `YYYY-MM-DD`. */
3707
+ priorProductionPeriodEnd?: string;
3708
+ /** 007085 — 1 = Department of Resource Development (formerly Energy), 2 = Operator. */
3709
+ sourceOfAdjustment?: 1 | 2;
3710
+ /** 007087 — amount of INCREASE to eligible crown royalties for that prior year (positive magnitude). */
3711
+ increase?: number;
3712
+ /** 007089 — amount of DECREASE to eligible crown royalties for that prior year (positive magnitude). */
3713
+ decrease?: number;
3714
+ /** 007091 — signed adjustment to the amount NOT eligible for the Royalty Tax Credit for that prior year. */
3715
+ adjustmentNotEligibleForCredit?: number;
3716
+ }
3717
+ /** One resolved prior-year adjustment row. */
3718
+ interface RoyaltySupplementalPriorYearAdjustmentResult {
3719
+ priorProductionPeriodEnd?: string;
3720
+ sourceOfAdjustment?: 1 | 2;
3721
+ increase: number;
3722
+ decrease: number;
3723
+ adjustmentNotEligibleForCredit: number;
3724
+ }
3725
+ interface AlbertaSchedule7Input {
3726
+ /** 007003 — Alberta crown royalty eligible for the Royalty Tax Credit, from the income statement (fed form 125). */
3727
+ eligibleCrownRoyalty?: number;
3728
+ /** 007005 — other royalties paid to Alberta not eligible for the Royalty Tax Credit (fed form 125). */
3729
+ otherRoyaltiesNotEligible?: number;
3730
+ /** 007007 — crown royalty paid to other provincial or federal jurisdictions (fed form 125). */
3731
+ royaltyPaidToOtherJurisdictions?: number;
3732
+ /** 007009 — non-deductible crown lease rentals (fed form 125). */
3733
+ nonDeductibleCrownLeaseRentals?: number;
3734
+ /** 007011 — mineral taxes (fed form 125). */
3735
+ mineralTaxes?: number;
3736
+ /** 007013 — Saskatchewan resources surcharge, non-deductible portion only (fed form 125). */
3737
+ saskatchewanResourcesSurcharge?: number;
3738
+ /** 007014 / 007015 / 007016 — up to three names of other non-deductible crown charge types (fed form 125). */
3739
+ otherNonDeductibleCrownChargeTypes?: readonly string[];
3740
+ /**
3741
+ * 007017 — total dollar amount of the other non-deductible crown charges
3742
+ * named above. The spec sums the underlying source-document amounts for
3743
+ * whichever types are named; those per-type amounts are not themselves
3744
+ * separate transmitted fields, so the total is taken as a pass-through
3745
+ * input. Defaults to zero when no types are named, per spec.
3746
+ */
3747
+ otherNonDeductibleCrownCharges?: number;
3748
+ /** 007025 — crown lease rentals capitalized during the year on non-producing properties, non-deductible portion (balance sheet, fed form 100). */
3749
+ crownLeaseRentalsCapitalized?: number;
3750
+ /** 007027 — name of another balance sheet (fed form 100) eligible deduction. */
3751
+ otherBalanceSheetDeductionName?: string;
3752
+ /** 007029 — dollar amount of the deduction named at 007027. Defaults to zero when no name is given, per spec. */
3753
+ otherBalanceSheetDeduction?: number;
3754
+ /** PITI — one row per partnership the corporation is a member of. */
3755
+ partnerships?: readonly RoyaltySupplementalPartnership[];
3756
+ /** ACRA — one row per prior-year Alberta Crown Royalty adjustment reported in the current year. */
3757
+ priorYearAdjustments?: readonly RoyaltySupplementalPriorYearAdjustment[];
3758
+ }
3759
+ interface AlbertaSchedule7Result {
3760
+ eligibleCrownRoyalty: number;
3761
+ otherRoyaltiesNotEligible: number;
3762
+ royaltyPaidToOtherJurisdictions: number;
3763
+ nonDeductibleCrownLeaseRentals: number;
3764
+ mineralTaxes: number;
3765
+ saskatchewanResourcesSurcharge: number;
3766
+ otherNonDeductibleCrownChargeTypes: string[];
3767
+ /** 007017. */
3768
+ otherNonDeductibleCrownCharges: number;
3769
+ crownLeaseRentalsCapitalized: number;
3770
+ otherBalanceSheetDeductionName?: string;
3771
+ /** 007029. */
3772
+ otherBalanceSheetDeduction: number;
3773
+ partnerships: RoyaltySupplementalPartnershipResult[];
3774
+ /** Σ 007077 across all partnerships. */
3775
+ totalPartnershipShareEligibleForCredit: number;
3776
+ /** Σ 007079 across all partnerships. */
3777
+ totalPartnershipShareOtherRoyaltiesNotEligible: number;
3778
+ /** Σ 007081 across all partnerships — feeds AT1 Schedule 5, not used here. */
3779
+ totalPartnershipShareOtherCrownCharges: number;
3780
+ priorYearAdjustments: RoyaltySupplementalPriorYearAdjustmentResult[];
3781
+ /** 007051 = Σ (087 − 089 + 091). */
3782
+ totalAdjustments: number;
3783
+ /**
3784
+ * 007061 — no defining row in this schedule's own MAPPINGS block; formula
3785
+ * transcribed from AT1 Schedule 5's field 005001 definition, which cites it
3786
+ * as "Schedule 7, line 061" in full. Left SIGNED — Schedule 5 applies its
3787
+ * own floor at zero.
3788
+ */
3789
+ crownChargesNetOfReimbursements: number;
3790
+ /**
3791
+ * AT1 Schedule 6's 006004 ("Alberta Crown Royalty incurred in the taxation
3792
+ * year"): 007003 + Σ077 − Σ087 + Σ089. Pass this into
3793
+ * `computeAlbertaSchedule6`'s `albertaCrownRoyaltyIncurred` input.
3794
+ */
3795
+ albertaCrownRoyaltyForSchedule6: number;
3796
+ issues: string[];
3797
+ }
3798
+ /**
3799
+ * `scheduleNNValues` for Schedule 7, following the `at1-schedule-line-items.ts`
3800
+ * builder pattern (see `schedule3Values` in `schedule3-other-deductions-credits.ts`
3801
+ * for the identical local-type convention this file reuses). Kept in THIS
3802
+ * file rather than the shared filing module — other agents edit
3803
+ * `at1-schedule-line-items.ts` concurrently.
3804
+ */
3805
+ interface At1ScheduleValueLike$3 {
3806
+ lineItemId: string;
3807
+ value: string | number;
3808
+ }
3809
+ interface At1ScheduleDataLike$3 {
3810
+ scheduleId: string;
3811
+ values: At1ScheduleValueLike$3[];
3812
+ }
3813
+ /**
3814
+ * Emits CPI (007003-029), the computed totals 007051 and 007061, and the two
3815
+ * repeating sections — PITI (007071-081, one occurrence per partnership) and
3816
+ * ACRA (007083-091, one occurrence per prior-year adjustment).
3817
+ *
3818
+ * 007061 is filed even though it has no defining row of its own anywhere in
3819
+ * this schedule's MAPPINGS block (spec lines 6654-7251) — see the module
3820
+ * docstring's "Two totals with NO defining row of their own in this MAPPINGS
3821
+ * table" section. It is a real Schedule 7 output line: AT1 Schedule 5's own
3822
+ * field 005001 definition (spec lines 5237-5248) names it explicitly as
3823
+ * "Schedule 7, line 061" and gives its formula in full, so it is filed here
3824
+ * under that citation rather than omitted for lack of a home row.
3825
+ */
3826
+ declare function schedule7Values(result: AlbertaSchedule7Result): At1ScheduleDataLike$3;
3827
+ declare function computeAlbertaSchedule7(input: AlbertaSchedule7Input): AlbertaSchedule7Result;
3828
+ //#endregion
3829
+ //#region src/t2/at1/schedules/schedule8-political-contributions.d.ts
3830
+ /**
3831
+ * Alberta AT1 Schedule 8 — Alberta Political Contributions Tax Credit.
3832
+ *
3833
+ * Schedule 8 itself (TRA spec §3.2.3.9, lines 7252-7450, form "008") is a
3834
+ * detail schedule, not a calculation: it collects one PCD occurrence per
3835
+ * receipted contribution —
3836
+ *
3837
+ * 008002 name of party / constituency association / candidate M
3838
+ * 008004 official receipt number M
3839
+ * 008006 date of donation (the spec: "do not let ... blank") M
3840
+ * 008008 donation amount M
3841
+ *
3842
+ * — plus two APC (Alberta Political Contributions) totals for contributions
3843
+ * made THROUGH A PARTNERSHIP, sourced from federal form T5013 and not
3844
+ * derivable from anything else in this schedule:
3845
+ *
3846
+ * 008012 partnership contributions made in 2003 or earlier (T5013 box 37)
3847
+ * 008013 partnership contributions made in 2004 or later (T5013)
3848
+ *
3849
+ * The actual TIERED CREDIT FORMULA that turns those totals into a dollar
3850
+ * credit is not on Schedule 8's own line map at all — it lives on the AT1
3851
+ * JACKET, line 000074 (§3.2.3.1, "AT1 - Alberta Corporate Income Tax Return"),
3852
+ * which consumes Schedule 8's own totals (008008, 008012, 008013). Because it
3853
+ * is entirely built from Schedule 8's own numbers and the module's name is
3854
+ * "the Alberta Political Contributions Tax Credit", it is reproduced here —
3855
+ * transcribed exactly, three rate periods:
3856
+ *
3857
+ * **All contributions made in 2003 or earlier:**
3858
+ * A = (sum of 008008) + 008012
3859
+ * B = A ≤ $150 → A×.75 | A ≤ $825 → $112.50 + (A−150)×.50 | else $450 + (A−825)×.333
3860
+ * credit = least of B, $750, `000068 − (000070 + 000071 + 000072)`
3861
+ *
3862
+ * **All contributions made in 2004 or later:**
3863
+ * A = (sum of 008008) + 008013
3864
+ * B = A ≤ $200 → A×.75 | A ≤ $900 → $150 + (A−200)×.50 | else $600 + (A−900)×.333
3865
+ * credit = least of B, $1000, `000068 − (000070 + 000071 + 000072)`
3866
+ *
3867
+ * **Contributions made in BOTH 2003 and 2004, AND the tax year itself begins
3868
+ * in 2003 and ends in 2004** (a straddling fiscal year-end, not just mixed
3869
+ * donation dates):
3870
+ * X = (sum of 008008 dated in 2004 only) + 008013
3871
+ * Y = (sum of 008008) + 008012 + 008013
3872
+ * A = min(Y, 150); B = min(X−A, 50); C = min(Y−(A+B), 675)
3873
+ * D = min(X−(A+B+C), 225); E = min(Y−(A+B+C+D), 900); F = min(X−(A+B+C+D+E), 300)
3874
+ * credit = .75A + .75B + .50C + .50D + ⅓E + ⅓F
3875
+ * — the spec states NO $750/$1000/remaining-tax ceiling for this branch,
3876
+ * unlike the other two. Reproduced literally: this module does not invent
3877
+ * one. (Jacket line 080, "Alberta Tax Payable", cannot go negative, and
3878
+ * that reconciliation is enforced elsewhere, e.g. `at1-line-items.ts`'s
3879
+ * `At1TaxPayableMismatchError` — not this module's job.)
3880
+ *
3881
+ * If contributions span both periods WITHOUT the tax year itself straddling
3882
+ * 2003/2004, the spec defines no formula for that combination; this module
3883
+ * computes nothing and raises an issue rather than guessing which branch to
3884
+ * apply.
3885
+ *
3886
+ * `000068 − (000070 + 000071 + 000072)` (basic Alberta tax minus the small
3887
+ * business deduction, M&P profits deduction and foreign investment tax
3888
+ * credit) is an AT1 JACKET figure built from schedules this module doesn't
3889
+ * reach — taken here as a single `remainingBasicTax` input, following the
3890
+ * same fail-closed convention as `schedule20-donations.ts`'s `incomeLimit`:
3891
+ * absent means no claim for the two capped rate periods.
3892
+ *
3893
+ * Whole dollars, pure.
3894
+ */
3895
+ interface PoliticalContributionInput {
3896
+ /** 008002 — name of the party, constituency association or candidate. */
3897
+ name: string;
3898
+ /** 008004 — official receipt number. */
3899
+ receiptNumber: string;
3900
+ /** 008006 — date of the official receipt, ISO `YYYY-MM-DD`. Mandatory per spec. */
3901
+ dateOfDonation: string;
3902
+ /** 008008 — donation amount. */
3903
+ amount: number;
3904
+ }
3905
+ interface Schedule8Input {
3906
+ /** One PCD occurrence per receipted contribution. */
3907
+ contributions: PoliticalContributionInput[];
3908
+ /**
3909
+ * 008012 — Alberta political contributions from a partnership made in 2003
3910
+ * or earlier, sourced from federal T5013 box 37. Defaults to nil.
3911
+ */
3912
+ partnershipContributionsTo2003?: number;
3913
+ /**
3914
+ * 008013 — Alberta political contributions from a partnership made in 2004
3915
+ * or later, sourced from federal T5013. Defaults to nil.
3916
+ */
3917
+ partnershipContributionsFrom2004?: number;
3918
+ /**
3919
+ * The corporation's tax year start/end, ISO `YYYY-MM-DD`. Needed ONLY to
3920
+ * confirm the third (straddling) rate-period formula applies — it
3921
+ * additionally requires the tax year itself to begin in 2003 and end in
3922
+ * 2004, not just that contribution dates span both years.
3923
+ */
3924
+ taxYearBegin?: string;
3925
+ taxYearEnd?: string;
3926
+ /**
3927
+ * `000068 − (000070 + 000071 + 000072)` — remaining basic Alberta tax after
3928
+ * the small business deduction, M&P profits deduction and foreign
3929
+ * investment tax credit. Required for the 2003-or-earlier and
3930
+ * 2004-or-later rate periods, which the spec caps against it; absent means
3931
+ * no claim for those periods (fail closed). NOT applied to the straddling
3932
+ * period, which the spec states no ceiling for.
3933
+ */
3934
+ remainingBasicTax?: number;
3935
+ }
3936
+ interface Schedule8Result {
3937
+ contributions: PoliticalContributionInput[];
3938
+ partnershipContributionsTo2003: number;
3939
+ partnershipContributionsFrom2004: number;
3940
+ /** Which of the three rate-period formulas applied, or 'none'. */
3941
+ period: 'to-2003' | 'from-2004' | 'straddle-2003-2004' | 'none';
3942
+ /** B in the to-2003/from-2004 branches, or the weighted A..F sum in the straddle branch — before any ceiling. */
3943
+ creditBeforeCeiling: number;
3944
+ /** 000074 (jacket) — the Alberta Political Contributions Tax Credit, after whatever ceiling applies. */
3945
+ credit: number;
3946
+ issues: string[];
3947
+ }
3948
+ declare function computeSchedule8(input: Schedule8Input): Schedule8Result;
3949
+ /**
3950
+ * Net File line items for AT1 Schedule 8: one PCD occurrence per contribution
3951
+ * (002 name, 004 receipt number, 006 date, 008 amount), plus the two APC
3952
+ * partnership totals (012, 013).
3953
+ *
3954
+ * Does NOT emit jacket line 000074 (the actual tax credit) — that is a
3955
+ * jacket line, not a Schedule 8 line. Use `result.credit` for that.
3956
+ */
3957
+ declare function schedule8Values(result: Schedule8Result): At1ScheduleData;
3958
+ //#endregion
3959
+ //#region src/t2/at1/schedules/schedule9-sred-tax-credit.d.ts
3960
+ /**
3961
+ * AT1 Schedule 9 — Alberta Scientific Research & Experimental Development Tax
3962
+ * Credit.
3963
+ *
3964
+ * Alberta's OWN investment tax credit on SR&ED spending — not the same thing as
3965
+ * either of the two SR&ED-adjacent modules already in this package:
3966
+ *
3967
+ * • AT1 Schedule 16 (`schedule16-sred.ts`) — the Alberta SR&ED expenditure
3968
+ * **pool**, a deduction against income; and
3969
+ * • federal Schedule 31 (`t2/schedules/schedule31-sred-itc.ts`) — the FEDERAL
3970
+ * investment tax credit, computed under s.127/127.1 at 35%/15%.
3971
+ *
3972
+ * This module is Alberta's PARALLEL investment tax credit, at a flat 10% (line
3973
+ * 120, "lesser of line 009031 and 009108 X 10%") — an entirely separate credit
3974
+ * mechanism from the federal one, not a top-up or a share of it.
3975
+ *
3976
+ * **The credit is WOUND DOWN.** Per the spec's own framing text (TRA spec
3977
+ * §3.2.3.10, page 3-84): "eligible expenditures" are federal-expenditure amounts
3978
+ * "carried out in Alberta before January 1, 2020, [and] the SR&ED Tax Credit may
3979
+ * not be claimed in respect of any such expenditures carried out in Alberta after
3980
+ * that date." This module does not filter expenditures by date itself — the
3981
+ * `albertaPortionOfExpenditures` (005) input must already exclude anything
3982
+ * incurred after 2019-12-31. `taxationYearEnd` is accepted purely to raise a
3983
+ * reminder issue when the return's own year end falls after that cut-off, since
3984
+ * a straddling year is exactly where a preparer is most likely to include an
3985
+ * ineligible period by mistake.
3986
+ *
3987
+ * Line map (TRA spec §3.2.3.10, "Schedule 9 - Alberta Scientific Research &
3988
+ * Experimental Development Tax Credit", pp. 3-84 to 3-90):
3989
+ *
3990
+ * 009003 federal total qualified SR&ED expenditures (fed T661 line 559) M
3991
+ * 009005 portion of 003 incurred in Alberta X
3992
+ * 009007 deduct: federal prescribed proxy amount in the Alberta portion X
3993
+ * 009009 add: Alberta proxy amount X
3994
+ * 009011 add: Alberta SR&ED credit that reduced the federal expense X
3995
+ * on fed T661 line 559 in the taxation year
3996
+ * 009015 federal ITC received in the immediately preceding year X
3997
+ * (fed T661 line 435)
3998
+ * 009017 total Alberta-eligible expenditures for years in which the X
3999
+ * expenditure was incurred (009031 from all relevant years)
4000
+ * 009019 total federal expenditures for those same years (fed T661 X
4001
+ * line 570 from all relevant years)
4002
+ * 009023 deduct: Alberta portion of the prior-year federal ITC X
4003
+ * = 009015 x 009017 / 009019
4004
+ * 009025 add: Alberta portion of any repayment of assistance and X
4005
+ * contract payments relating to amounts in 009005
4006
+ * 009040 primary field of science or technology (1-4) M
4007
+ * 009100 associated with one or more corporations for SR&ED purposes? M
4008
+ * 009102 if associated: allocated amount from line 240 (page 3) X
4009
+ * 009104 if not associated: maximum expenditure limit = $4,000,000 x X
4010
+ * (days in the corporation's tax year / 365, max 365 or 366)
4011
+ * 009106 eligible expenditures for Alberta purposes = 009031 X
4012
+ * 009108 maximum expenditure limit for the year (102 or 104) M
4013
+ * 009112 recapture on disposal of Alberta SR&ED property O
4014
+ * 009116 less: Alberta portion of prior-year federal ITC (Schedule 9 X
4015
+ * Supplemental line 428 — only where the year end is on or
4016
+ * before 2012-03-31)
4017
+ * 009120 NET ALBERTA SR&ED TAX CREDIT (REPAYMENT), to AT1 page 2 line M
4018
+ * 081 = (lesser of 009031 and 009108 x 10%) - 009112 - 009116
4019
+ *
4020
+ * Allocation of the Maximum Expenditure Limit (page 3, required when 100 = 1):
4021
+ * 009200 CAN of the associated corporation with the longest tax year X
4022
+ * 009202 / 009204 that corporation's own tax year begin / end M
4023
+ * 009206 days in the longest year (max 365, or 366 across Feb 29) M
4024
+ * 009220 name of each associated corporation (row 1 = the filer) M
4025
+ * 009230 Alberta Corporate Account Number of each X
4026
+ * 009240 allocated amount — each occurrence AND the sum of all M
4027
+ * occurrences must not exceed $4,000,000 x (009206 / 365)
4028
+ *
4029
+ * ── Line 009031 has no formula in the spec text ─────────────────────────────
4030
+ *
4031
+ * Lines 009003-009025 and 009106/009017 all reference "009031" ("Total eligible
4032
+ * expenditures for Alberta purposes") as the figure they equal or feed into, but
4033
+ * the mapping tables jump straight from 009025 to 009040 — 009027, 009029 and
4034
+ * 009031 themselves are never defined in the spec's MAPPINGS chapter, most
4035
+ * likely because they are calculated-on-paper subtotals that are not, unlike
4036
+ * every field above them, separately transmitted EFILE data elements. Rather
4037
+ * than invent a number, this module DERIVES 031 from the six lines the spec DOES
4038
+ * define and caption unambiguously as "Deduct" or "Add" against the Alberta
4039
+ * expenditure pool (005, 007, 009, 011, 023, 025):
4040
+ *
4041
+ * 031 = 005 − 007 + 009 + 011 − 023 + 025
4042
+ *
4043
+ * That derivation is used only when `eligibleExpenditures` is not supplied
4044
+ * directly, and an issue is always raised when it is, so a preparer with the
4045
+ * authoritative figure (e.g. from the Guide to Claiming the Alberta SR&ED Tax
4046
+ * Credit) knows to override it via `eligibleExpenditures`.
4047
+ *
4048
+ * ── Line 009011 cites a line that does not exist ────────────────────────────
4049
+ *
4050
+ * The spec's own business rule for 011 reads "Value = 009110. See Guide to
4051
+ * Claiming The Alberta SR&ED Tax Credit for calculation" — but no line 009110 is
4052
+ * defined anywhere in this schedule (the lines run ...009108, 009112...). It is
4053
+ * most likely a transposed "009011" (self-reference) or a Guide-only figure with
4054
+ * no corresponding transmitted line at all. Either way its actual calculation is
4055
+ * explicitly deferred to an external guide this package does not model, so
4056
+ * `albertaCreditReducingFederalExpense` is accepted as a plain numeric INPUT.
4057
+ *
4058
+ * ── Line 009116 is a legacy, pre-2012 field ─────────────────────────────────
4059
+ *
4060
+ * "If the taxation year end is on or before March 31, 2012, value = line 428 of
4061
+ * Schedule 9 Supplemental." The Schedule 9 Supplemental and its own line 428 are
4062
+ * not modelled — `priorYearFederalItcAdjustment` is a plain numeric input,
4063
+ * expected to be nil for any current return.
4064
+ *
4065
+ * Whole dollars, pure.
4066
+ */
4067
+ /** Valid codes for line 009040 — "Primary field of science or technology". */
4068
+ type Schedule9FieldOfScience = 1 | 2 | 3 | 4;
4069
+ interface AlbertaSchedule9Input {
4070
+ /** 009003 — federal total qualified SR&ED expenditures. Must equal fed T661 line 559. */
4071
+ federalQualifiedExpenditures?: number;
4072
+ /** 009005 — the portion of 003 incurred in Alberta. Must not exceed 003. */
4073
+ albertaPortionOfExpenditures?: number;
4074
+ /** 009007 — deduct: federal prescribed proxy amount included in the Alberta portion. */
4075
+ federalProxyAmountInAlbertaPortion?: number;
4076
+ /** 009009 — add: Alberta proxy amount. */
4077
+ albertaProxyAmount?: number;
4078
+ /**
4079
+ * 009011 — add: Alberta SR&ED credit that reduced the federal expense on fed
4080
+ * T661 line 559 in the taxation year. Its calculation is deferred by the spec
4081
+ * to the Guide to Claiming the Alberta SR&ED Tax Credit — see the module
4082
+ * docstring. Plain input.
4083
+ */
4084
+ albertaCreditReducingFederalExpense?: number;
4085
+ /** 009015 — federal ITC received in the immediately preceding year (fed T661 line 435). */
4086
+ priorYearFederalItcReceived?: number;
4087
+ /** 009017 — total Alberta-eligible expenditures for years in which incurred (009031, all years). */
4088
+ totalAlbertaExpendituresAllYears?: number;
4089
+ /** 009019 — total federal expenditures for those same years (fed T661 line 570, all years). */
4090
+ totalFederalExpendituresAllYears?: number;
4091
+ /** 009025 — add: Alberta portion of any repayment of assistance relating to 005. */
4092
+ albertaPortionOfRepayments?: number;
4093
+ /**
4094
+ * 009031 / 009106 — "Total eligible expenditures for Alberta purposes."
4095
+ * Overrides the derived figure (005 − 007 + 009 + 011 − 023 + 025) when the
4096
+ * authoritative amount is known. See the module docstring for why this is
4097
+ * derived rather than read directly off the spec.
4098
+ */
4099
+ eligibleExpenditures?: number;
4100
+ /** 009040 — primary field of science or technology. Mandatory on the live form. */
4101
+ fieldOfScience?: Schedule9FieldOfScience;
4102
+ /** 009100 — associated with one or more corporations for SR&ED purposes? Defaults to false (line default = 2/No). */
4103
+ isAssociated?: boolean;
4104
+ /** 009102 — required when associated: this corporation's allocated share of line 240. */
4105
+ allocatedExpenditureLimit?: number;
4106
+ /**
4107
+ * Days in the corporation's own taxation year, for the non-associated 009104
4108
+ * proration. Defaults to 365 (a full year); clamped to [0, 366]. Per the
4109
+ * spec, days before 2009-01-01 (when the Alberta SR&ED program began) must
4110
+ * already be excluded by the caller — day-of-year proration from real
4111
+ * calendar dates is not modelled here, matching this package's convention
4112
+ * elsewhere (e.g. the AT1 Schedule 29 group allocation).
4113
+ */
4114
+ daysInTaxYear?: number;
4115
+ /** 009112 — recapture on disposal (or deemed disposal) of Alberta SR&ED property. */
4116
+ disposalRecapture?: number;
4117
+ /**
4118
+ * 009116 — legacy pre-2012 adjustment from the Schedule 9 Supplemental line
4119
+ * 428. See the module docstring; expected nil for a current return.
4120
+ */
4121
+ priorYearFederalItcAdjustment?: number;
4122
+ /**
4123
+ * The return's taxation year end (ISO `YYYY-MM-DD`), used only to flag a
4124
+ * reminder when it falls after the 2019-12-31 wind-down date — see the
4125
+ * module docstring's "WOUND DOWN" note.
4126
+ */
4127
+ taxationYearEnd?: string;
4128
+ }
4129
+ interface AlbertaSchedule9Result {
4130
+ federalQualifiedExpenditures: number;
4131
+ albertaPortionOfExpenditures: number;
4132
+ federalProxyAmountInAlbertaPortion: number;
4133
+ albertaProxyAmount: number;
4134
+ albertaCreditReducingFederalExpense: number;
4135
+ priorYearFederalItcReceived: number;
4136
+ totalAlbertaExpendituresAllYears: number;
4137
+ totalFederalExpendituresAllYears: number;
4138
+ /** 009023 = 009015 x 009017 / 009019. */
4139
+ priorYearItcAlbertaPortion: number;
4140
+ albertaPortionOfRepayments: number;
4141
+ /**
4142
+ * 009031 / 009106 — the figure actually used at 009108's lesser-of test.
4143
+ * Equal to `eligibleExpenditures` when supplied, otherwise the derived
4144
+ * figure (see `derivedEligibleExpenditures` and the module docstring).
4145
+ */
4146
+ eligibleExpenditures: number;
4147
+ /** The derived cross-check: 005 − 007 + 009 + 011 − 023 + 025, always computed. */
4148
+ derivedEligibleExpenditures: number;
4149
+ fieldOfScience: Schedule9FieldOfScience | undefined;
4150
+ isAssociated: boolean;
4151
+ /** 009104 — the non-associated day-prorated $4,000,000 limit (0 when associated). */
4152
+ nonAssociatedMaximumExpenditureLimit: number;
4153
+ /** 009108 — the maximum expenditure limit actually in effect (102 or 104). */
4154
+ maximumExpenditureLimit: number;
4155
+ disposalRecapture: number;
4156
+ priorYearFederalItcAdjustment: number;
4157
+ /** 009120 — signed; may be negative (a repayment). To AT1 page 2, line 081. */
4158
+ netCredit: number;
4159
+ issues: string[];
4160
+ }
4161
+ /** 009120's flat rate — "lesser of line 009031 and 009108 X 10%". */
4162
+ declare const ALBERTA_SRED_TAX_CREDIT_RATE = 0.1;
4163
+ /** Alberta's SR&ED program did not exist before this date (line 009104's note). */
4164
+ declare const ALBERTA_SRED_PROGRAM_START = "2009-01-01";
4165
+ /** Alberta SR&ED expenditures carried out after this date are not eligible (module docstring). */
4166
+ declare const ALBERTA_SRED_EXPENDITURE_CUTOFF = "2019-12-31";
4167
+ /**
4168
+ * 009104 / 009206's day-prorated $4,000,000 expenditure limit. Days are clamped
4169
+ * to [0, 366] — 366 only for a year genuinely spanning a February 29, per the
4170
+ * spec's own note.
4171
+ */
4172
+ declare function computeSchedule9MaximumExpenditureLimit(daysInTaxYear?: number): number;
4173
+ declare function computeAlbertaSchedule9(input: AlbertaSchedule9Input): AlbertaSchedule9Result;
4174
+ /** One row of the page-3 allocation table. Row 1 must be the filing corporation. */
4175
+ interface Schedule9AllocationMember {
4176
+ /** 009220 — name of the associated corporation. */
4177
+ name: string;
4178
+ /** 009230 — Alberta Corporate Account Number. */
4179
+ albertaCan?: string;
4180
+ /** 009240 — this member's agreed share of the expenditure limit. */
4181
+ allocated: number;
4182
+ }
4183
+ interface Schedule9AllocationMemberResult {
4184
+ name: string;
4185
+ albertaCan?: string;
4186
+ allocated: number;
4187
+ }
4188
+ interface Schedule9AllocationResult {
4189
+ /** 009206 — days in the longest associated taxation year (clamped to [0, 366]). */
4190
+ daysInLongestYear: number;
4191
+ /** The shared $4,000,000-based ceiling every occurrence AND their sum must respect. */
4192
+ maximumExpenditureLimit: number;
4193
+ members: Schedule9AllocationMemberResult[];
4194
+ /** Σ 009240. Must not exceed maximumExpenditureLimit. */
4195
+ totalAllocated: number;
4196
+ /** The filing corporation's own allocated share (row 1) — feeds 009102. */
4197
+ claimantAllocatedAmount: number;
4198
+ unallocated: number;
4199
+ issues: string[];
4200
+ }
4201
+ /**
4202
+ * Allocate the day-prorated $4,000,000 maximum expenditure limit among an
4203
+ * associated group (page 3). Per the spec, EACH occurrence of 009240 and the
4204
+ * SUM of all occurrences are independently capped at the limit — unlike a
4205
+ * running-remainder split, one member requesting more than the limit does not
4206
+ * consume another member's room; it is simply capped and flagged.
4207
+ */
4208
+ declare function allocateSchedule9ExpenditureLimit(daysInLongestYear: number, requested: readonly Schedule9AllocationMember[]): Schedule9AllocationResult;
4209
+ /**
4210
+ * `scheduleNNValues` for Schedule 9, following the `at1-schedule-line-items.ts`
4211
+ * builder pattern (see `schedule3Values` in `schedule3-other-deductions-credits.ts`,
4212
+ * `schedule16Values`, `schedule20Values`). Kept in THIS file rather than the
4213
+ * shared filing module per the task instructions — other agents are editing
4214
+ * `at1-schedule-line-items.ts` concurrently.
4215
+ */
4216
+ interface At1ScheduleValueLike$2 {
4217
+ lineItemId: string;
4218
+ value: string | number;
4219
+ }
4220
+ interface At1ScheduleDataLike$2 {
4221
+ scheduleId: string;
4222
+ values: At1ScheduleValueLike$2[];
4223
+ }
4224
+ /**
4225
+ * The page-3 "Allocation of the Maximum Expenditure Limit" context that has no
4226
+ * home on `AlbertaSchedule9Result` itself — the CAN and tax-year dates of the
4227
+ * associated corporation with the longest year (009200/009202/009204), plus
4228
+ * the `allocateSchedule9ExpenditureLimit` result supplying 009206 and the
4229
+ * per-member 009220/009230/009240 rows. Supplied only when the corporation is
4230
+ * associated and a group was actually entered.
4231
+ */
4232
+ interface Schedule9GroupFilingInput {
4233
+ /** 009200 — Alberta CAN of the associated corporation with the longest tax year. */
4234
+ longestYearCan?: string;
4235
+ /** 009202 — that corporation's own tax year begin, ISO `YYYY-MM-DD`. */
4236
+ longestYearBegin?: string;
4237
+ /** 009204 — that corporation's own tax year end, ISO `YYYY-MM-DD`. */
4238
+ longestYearEnd?: string;
4239
+ /** The result of `allocateSchedule9ExpenditureLimit` — supplies 009206/220/230/240. */
4240
+ allocation: Schedule9AllocationResult;
4241
+ }
4242
+ /**
4243
+ * Field ids per the spec transcription in the module docstring: 003-025 (the
4244
+ * expenditure buildup), 040 (field of science), 100-120 (the credit
4245
+ * calculation), and — when `group` is supplied — 200-240 (page 3's
4246
+ * allocation). Line 031 has no confirmed transmitted status of its own (see
4247
+ * the module docstring's "line 009031 has no formula in the spec text"), but
4248
+ * is filed anyway alongside 106 since both carry the identical "Total
4249
+ * eligible expenditures for Alberta purposes" figure per the spec's own
4250
+ * cross-reference ("106 ... Value must equal 009031").
4251
+ */
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;
4469
+ //#endregion
4470
+ //#region src/t2/at1/schedules/schedule15-resource-related-deductions.d.ts
4471
+ /**
4472
+ * Alberta AT1 Schedule 15 — Alberta Resource Related Deductions.
4473
+ *
4474
+ * Source: `research/sources/tra-spec/AT1-Chapter3-2025.2-full.txt`, lines
4475
+ * 12394-15937 (§3.2.3.16 "Schedule 15 - Alberta Resource Related Deductions").
4476
+ * There is NO standalone AT1SCH15 PDF under `research/sources/tra-forms/pdf/`
4477
+ * (unlike schedules 1, 2, 10, 12, 13, 16, 17, 18, 20, 21, 29, which all have
4478
+ * one) — the NetFile mapping spec above is the ONLY source available for this
4479
+ * schedule, so every field below is cited to that text file alone and cannot
4480
+ * be cross-checked against a rendered form layout.
4481
+ *
4482
+ * Like AT1 Schedule 18 (dispositions) and Schedule 13 (CCA), this is a
4483
+ * RECONCILIATION overlay, not a second engine: for most lines, the Alberta
4484
+ * figure defaults to the corresponding FEDERAL pool figure, and only the
4485
+ * lines where Alberta actually diverges are entered. The form is forbidden
4486
+ * when the return declares no Alberta/federal divergence (000060 AND 000061
4487
+ * both 2) and required when the opening balance or the claim for Alberta
4488
+ * purposes differs from federal (line 015 gating text, source lines
4489
+ * 12444-12456).
4490
+ *
4491
+ * Despite the task brief's expectation of a "resource allowance" pool, THERE
4492
+ * IS NO resource-allowance computation on this schedule — the federal
4493
+ * resource allowance deduction was repealed for taxation years after 1989
4494
+ * (phased out through the mid-1990s) and this schedule is entirely about the
4495
+ * EIGHT resource-expense CONTINUITY pools that survive it:
4496
+ *
4497
+ * EDA — Continuity of Earned Depletion Base (grandfathered; regular +
4498
+ * successor expenses), lines 001-021.
4499
+ * CMEDB — Continuity of Mining Exploration Depletion Base, lines 023-033.
4500
+ * CEE — Cumulative Canadian Exploration Expenses (regular + successor),
4501
+ * lines 041-083.
4502
+ * CDE — Cumulative Canadian Development Expenses (regular + successor),
4503
+ * lines 091-143.
4504
+ * CCOGPE — Cumulative Canadian Oil and Gas Property Expenses (regular +
4505
+ * successor), lines 151-191.
4506
+ * FEDE — Foreign Exploration and Development Expenses (regular +
4507
+ * successor), lines 201-233.
4508
+ * SFEDE — Specified Foreign Exploration and Development Expenses, PER
4509
+ * COUNTRY (regular + successor), lines 241-277.
4510
+ * CFRE — Cumulative Foreign Resource Expenses, PER COUNTRY (regular +
4511
+ * successor), lines 281-317.
4512
+ *
4513
+ * Each pool is modelled as its own `Input`/`Result` pair and its own pure
4514
+ * `computeXxx` function, per this directory's convention (see
4515
+ * `schedule18-dispositions.ts`, `schedule21-year-of-origin.ts`). A single
4516
+ * `computeAlbertaSchedule15` at the bottom composes all eight (accepting the
4517
+ * already-computed CCOGPE results where CDE needs them — see "CCOGPE ↔ CDE
4518
+ * cross-linkage" below) and applies the schedule-level 000060/000061 gate.
4519
+ *
4520
+ * ── Two proration conventions, NOT interchangeable ──────────────────────────
4521
+ *
4522
+ * The current-year-claim caps use TWO different short-tax-year formulas, and
4523
+ * the spec is explicit that they differ:
4524
+ *
4525
+ * - CDE (lines 115, 141) and CCOGPE (lines 169, 189) use a STEP function:
4526
+ * "if days in tax year ≥ 357, cap = rate × pool; if < 357, cap = rate ×
4527
+ * (days/365) × pool" — i.e. the proration is skipped entirely for a
4528
+ * near-full year.
4529
+ * - FEDE (line 209), SFEDE (line 253) and CFRE (lines 293, 313) use a
4530
+ * PLAIN `days/365` multiplier with no 357-day step.
4531
+ *
4532
+ * `stepYearFactor` implements the first; `linearYearFactor` the second. CEE
4533
+ * (lines 061, 081) and EDA/CMEDB have no day-proration at all — CEE is fully
4534
+ * claimable up to the pool balance in one year, no percentage rate applies.
4535
+ *
4536
+ * ── CCOGPE ↔ CDE cross-linkage (FLAGGED, not fully auto-wired) ──────────────
4537
+ *
4538
+ * When a CCOGPE pool's pre-claim subtotal is NEGATIVE, three things in the
4539
+ * spec text interact in a way this module resolves only PARTIALLY:
4540
+ *
4541
+ * 1. CDE line 105 ("Deduct: credit balance in the cumulative Canadian oil
4542
+ * and gas property expense pool", source lines 13604-13622) has its OWN
4543
+ * self-contained formula: `A = 015151+015153+015155+015157-015159-
4544
+ * 015161-015165-015167; if A < 0, value = A; otherwise enter fed
4545
+ * 012330`. This is unconditional — it does not mention the designation
4546
+ * election. This module implements 105 EXACTLY this way, computed from
4547
+ * the already-computed CCOGPE-regular pool subtotal (see
4548
+ * `computeCdeRegular`'s `ccogpeRegular` parameter).
4549
+ * 2. CCOGPE line 169 ("Deduct: current year claim...", source lines
4550
+ * 14281-14370) separately says that when that SAME subtotal A is
4551
+ * negative, it "must be carried forward to 015105" ONLY if the
4552
+ * corporation "has made a designation pursuant to subparagraph
4553
+ * 66.7(4)(a)(iii)" — and to 015133 (CDE SUCCESSOR, not 105) if it has
4554
+ * NOT. This CONTRADICTS (1)'s unconditional reading. Line 189 (source
4555
+ * lines 14646-14661) makes the analogous claim for the CCOGPE-successor
4556
+ * pool: negative → 015133 if designated, or "included in 015167"
4557
+ * (CCOGPE's OWN regular-pool deduction line, not a CDE line) if not.
4558
+ *
4559
+ * This module resolves (1) literally (105 is auto-computed, unconditionally,
4560
+ * from the CCOGPE-regular subtotal) because that is the more specific,
4561
+ * self-contained rule attached directly to line 105 itself. It does NOT
4562
+ * auto-route a negative CCOGPE-successor subtotal into CDE line 133 or back
4563
+ * into CCOGPE-regular line 167, because (a) line 133 has no unconditional
4564
+ * formula of its own — only the ambiguous "value may not exceed amount A"
4565
+ * (source lines 13945-13962), and (b) whether it should land on 133 or 167
4566
+ * hinges on the 66.7(4)(a)(iii) designation, which this schedule has no
4567
+ * source for and no sibling schedule to pull it from. Whenever the CCOGPE-
4568
+ * successor subtotal goes negative, `computeCcogpeSuccessor` raises an issue
4569
+ * naming lines 133/167/189 so a preparer resolves the routing by hand; the
4570
+ * pool's own claim and closing balance are zeroed per the schedule's
4571
+ * unconditional instruction ("enter zero at 015189 and 015191").
4572
+ *
4573
+ * A second, independent anomaly: CCOGPE-successor's own closing balance
4574
+ * formula (line 191, source lines 14731-14740) reads literally as "value =
4575
+ * 015173+015175+015177-015181-015185-015187-015189 **-015167-015169**" when
4576
+ * the pre-subtraction total is positive — i.e. it appears to subtract the
4577
+ * CCOGPE-REGULAR pool's OWN deduction (167) and claim (169) from the
4578
+ * SUCCESSOR pool's closing balance. No other continuity balance on this
4579
+ * schedule mixes fields across the regular/successor split this way, and
4580
+ * nothing else in the 000-series explains why a successor balance would
4581
+ * absorb the regular pool's claim. This module computes 191 with the clean,
4582
+ * schedule-consistent formula (additions − deductions − claim, floored at
4583
+ * zero) and raises an issue quoting the literal spec text whenever 167 or
4584
+ * 169 is non-zero (the only case where the two readings diverge), so a
4585
+ * reviewer can check it against the real form — which, again, has no PDF in
4586
+ * this engine's sources to check against.
4587
+ *
4588
+ * ── Other flagged items ─────────────────────────────────────────────────────
4589
+ *
4590
+ * - CDE line 107 ("Deduct: other deductions or transfers", source lines
4591
+ * 13681-13691) carries a parenthetical "(Note: If 015139 is negative,
4592
+ * include the amount at 015107 as a positive value.)" — there is NO line
4593
+ * 139 anywhere else in this schedule's field list (CDE regular runs
4594
+ * 091-117 with no 108/109/113/114/116/139 gaps that resolve to it, and
4595
+ * no other pool numbers into the 130s except CDE-successor's own 133-137,
4596
+ * which are a different pool entirely). This looks like either an OCR
4597
+ * artifact or a reference to a paper-form-only field outside the NetFile
4598
+ * schema (the same category as Schedule 21's RIFE section). Not modelled;
4599
+ * flagged verbatim whenever the schedule is computed.
4600
+ * - Negative-pool amounts on FEDE, SFEDE and CFRE (claim lines 209, 221,
4601
+ * 253, 273, 293, 313) are, per the spec, "include[d] in 012040" — a
4602
+ * FEDERAL T2 line, entirely outside this schedule and this engine's
4603
+ * stated scope for Schedule 15. This module zeroes the claim/closing per
4604
+ * the schedule's own instruction and raises an issue noting the federal
4605
+ * inclusion is the caller's responsibility elsewhere.
4606
+ * - CFRE line 293's "B" component is capped at "the global foreign
4607
+ * resource limit for the year designated for that country" (source lines
4608
+ * 15703-15711) — a quantity with no definition or source anywhere in
4609
+ * this spec excerpt. Modelled as an optional plain-number INPUT per
4610
+ * country (`globalForeignResourceLimit`); omitting it makes B = 0 (the
4611
+ * conservative, under-claim direction) and raises an issue rather than
4612
+ * inventing a limit.
4613
+ *
4614
+ * Whole dollars, pure functions, no I/O.
4615
+ */
4616
+ interface EdaRegularFederal {
4617
+ /** 012101 — balance at end of preceding taxation year. */
4618
+ openingBalance?: number;
4619
+ /** 012105 — transferred on amalgamation or wind-up of subsidiary. */
4620
+ amalgamationTransfer?: number;
4621
+ /** 012110 — transferred on sale of resource property to successor. */
4622
+ saleTransfer?: number;
4623
+ /** 012115 — claim for the year per federal Regulation 1201. */
4624
+ regulation1201Claim?: number;
4625
+ }
4626
+ interface EdaRegularInput {
4627
+ federal: EdaRegularFederal;
4628
+ /** Entered ONLY where the Alberta figure differs from federal. */
4629
+ albertaOverride?: Partial<EdaRegularFederal>;
4630
+ }
4631
+ interface EdaRegularResult {
4632
+ /** 015001 */
4633
+ openingBalance: number;
4634
+ /** 015003 */
4635
+ amalgamationTransfer: number;
4636
+ /** 015005 */
4637
+ saleTransfer: number;
4638
+ /** Pool before the year's claim: 015001 + 015003 − 015005. */
4639
+ poolBeforeClaim: number;
4640
+ /** 015007 */
4641
+ claim: number;
4642
+ /** 015009 */
4643
+ closingBalance: number;
4644
+ differsFromFederal: boolean;
4645
+ issues: string[];
4646
+ }
4647
+ declare function computeEdaRegular(input: EdaRegularInput): EdaRegularResult;
4648
+ interface EdaSuccessorFederal {
4649
+ /** 012126 */
4650
+ openingBalance?: number;
4651
+ /** 012130 */
4652
+ amalgamationTransfer?: number;
4653
+ /** 012132 — transferred other than on amalgamation or wind-up of subsidiary. */
4654
+ otherTransfer?: number;
4655
+ /** 012135 — transferred on sale of resource property. */
4656
+ saleTransfer?: number;
4657
+ /** 012140 — claim for the year per federal Regulation 1202(2). */
4658
+ regulation1202Claim?: number;
4659
+ }
4660
+ interface EdaSuccessorInput {
4661
+ federal: EdaSuccessorFederal;
4662
+ albertaOverride?: Partial<EdaSuccessorFederal>;
4663
+ }
4664
+ interface EdaSuccessorResult {
4665
+ /** 015011 */
4666
+ openingBalance: number;
4667
+ /** 015013 */
4668
+ amalgamationTransfer: number;
4669
+ /** 015015 */
4670
+ otherTransfer: number;
4671
+ /** 015017 */
4672
+ saleTransfer: number;
4673
+ /** Pool before claim: 015011 + 015013 + 015015 − 015017. */
4674
+ poolBeforeClaim: number;
4675
+ /** 015019 */
4676
+ claim: number;
4677
+ /** 015021 */
4678
+ closingBalance: number;
4679
+ differsFromFederal: boolean;
4680
+ issues: string[];
4681
+ }
4682
+ declare function computeEdaSuccessor(input: EdaSuccessorInput): EdaSuccessorResult;
4683
+ interface CmedbFederal {
4684
+ /** 012150 */
4685
+ openingBalance?: number;
4686
+ /** 012155 */
4687
+ amalgamationTransfer?: number;
4688
+ /** 012160 — transferred other than on amalgamation or wind-up of subsidiary. */
4689
+ otherTransfer?: number;
4690
+ /** 012165 — transferred on disposal of resource property to successor. */
4691
+ disposalTransfer?: number;
4692
+ }
4693
+ interface CmedbInput {
4694
+ federal: CmedbFederal;
4695
+ albertaOverride?: Partial<CmedbFederal>;
4696
+ /**
4697
+ * 015031 — claim for the year per federal Regulation 1203(1). The spec
4698
+ * gives NO federal default line for this field (unlike the EDA claims,
4699
+ * which default to fed 012115/012140) — it is a genuinely discretionary
4700
+ * Alberta claim, capped at the positive pool balance. Omit to claim the
4701
+ * maximum.
4702
+ */
4703
+ claimed?: number;
4704
+ }
4705
+ interface CmedbResult {
4706
+ /** 015023 */
4707
+ openingBalance: number;
4708
+ /** 015025 */
4709
+ amalgamationTransfer: number;
4710
+ /** 015027 */
4711
+ otherTransfer: number;
4712
+ /** 015029 */
4713
+ disposalTransfer: number;
4714
+ /** Pool before claim: 015023 + 015025 + 015027 − 015029. */
4715
+ poolBeforeClaim: number;
4716
+ /** 015031 */
4717
+ claim: number;
4718
+ /** 015033 */
4719
+ closingBalance: number;
4720
+ differsFromFederal: boolean;
4721
+ issues: string[];
4722
+ }
4723
+ declare function computeCmedb(input: CmedbInput): CmedbResult;
4724
+ interface CeeRegularFederal {
4725
+ /** 012200 */
4726
+ openingBalance?: number;
4727
+ /** 012205 — current year expenses excluding look-back. MUST equal federal (no AB override). */
4728
+ currentYearExpenses: number;
4729
+ /** 012206 — current year expenses under the look-back rule, s.66(12.66). MUST equal federal. */
4730
+ lookBackExpenses?: number;
4731
+ /** 012210 — reclassified from CDE, ss.66.1(9)/66.7(9). MUST equal federal. */
4732
+ reclassifiedFromCde?: number;
4733
+ /** 012215 — transferred on amalgamation or wind-up of subsidiary. */
4734
+ amalgamationTransfer?: number;
4735
+ /** 012217 — Canadian renewable and conservation expenses. MUST equal federal. */
4736
+ renewableConservationExpenses?: number;
4737
+ /** 012220 — other additions. */
4738
+ otherAdditions?: number;
4739
+ /** 012225 — government assistance and grants. MUST equal federal. */
4740
+ governmentAssistance?: number;
4741
+ /** 012230 — other deductions or transfers. */
4742
+ otherDeductions?: number;
4743
+ /** 012243 — CEE renounced under a flow-through share agreement. MUST equal federal. */
4744
+ renouncedFlowThrough?: number;
4745
+ /** 012240 — transferred on disposition of resource property to successor. */
4746
+ transferredToSuccessor?: number;
4747
+ /** 012244 — expenses renounced under the look-back rule, s.66(12.66). MUST equal federal. */
4748
+ renouncedLookBack?: number;
4749
+ }
4750
+ /** Only the fields the spec permits an Alberta override for (the rest "must equal" federal). */
4751
+ type CeeRegularOverride = Partial<Pick<CeeRegularFederal, 'openingBalance' | 'amalgamationTransfer' | 'otherAdditions' | 'otherDeductions' | 'transferredToSuccessor'>>;
4752
+ interface CeeRegularInput {
4753
+ federal: CeeRegularFederal;
4754
+ albertaOverride?: CeeRegularOverride;
4755
+ /** 015061 — discretionary claim when the pool subtotal is positive. Omit to claim the maximum. */
4756
+ claimed?: number;
4757
+ }
4758
+ interface CeeRegularResult {
4759
+ openingBalance: number;
4760
+ currentYearExpenses: number;
4761
+ lookBackExpenses: number;
4762
+ reclassifiedFromCde: number;
4763
+ amalgamationTransfer: number;
4764
+ renewableConservationExpenses: number;
4765
+ otherAdditions: number;
4766
+ governmentAssistance: number;
4767
+ otherDeductions: number;
4768
+ renouncedFlowThrough: number;
4769
+ transferredToSuccessor: number;
4770
+ renouncedLookBack: number;
4771
+ /** Pool subtotal before the claim (015041+043+044+045+047+049+051-053-055-058-059-060). */
4772
+ subtotal: number;
4773
+ /** 015061 — claim, or income inclusion if the subtotal is ≤ 0. */
4774
+ claim: number;
4775
+ /** 015063 */
4776
+ closingBalance: number;
4777
+ differsFromFederal: boolean;
4778
+ issues: string[];
4779
+ }
4780
+ declare function computeCeeRegular(input: CeeRegularInput): CeeRegularResult;
4781
+ interface CeeSuccessorFederal {
4782
+ /** 012250 */
4783
+ openingBalance?: number;
4784
+ /** 012255 — reclassified from CDE. MUST equal federal. */
4785
+ reclassifiedFromCde?: number;
4786
+ /** 012260 — transferred on amalgamation or wind-up of subsidiary. */
4787
+ amalgamationTransfer?: number;
4788
+ /** 012265 — transferred other than on amalgamation or wind-up of subsidiary. */
4789
+ otherTransfer?: number;
4790
+ /** 012280 — other deductions or transfers. */
4791
+ otherDeductions?: number;
4792
+ /** 012290 — transferred on disposition of resource property to successor. */
4793
+ transferredToSuccessor?: number;
4794
+ }
4795
+ type CeeSuccessorOverride = Partial<Pick<CeeSuccessorFederal, 'openingBalance' | 'amalgamationTransfer' | 'otherTransfer' | 'otherDeductions' | 'transferredToSuccessor'>>;
4796
+ interface CeeSuccessorInput {
4797
+ federal: CeeSuccessorFederal;
4798
+ albertaOverride?: CeeSuccessorOverride;
4799
+ /** 015081 */
4800
+ claimed?: number;
4801
+ }
4802
+ interface CeeSuccessorResult {
4803
+ openingBalance: number;
4804
+ reclassifiedFromCde: number;
4805
+ amalgamationTransfer: number;
4806
+ otherTransfer: number;
4807
+ otherDeductions: number;
4808
+ transferredToSuccessor: number;
4809
+ /** Subtotal before claim: 015064+065+067+069-077-079. */
4810
+ subtotal: number;
4811
+ /** 015081 */
4812
+ claim: number;
4813
+ /** 015083 */
4814
+ closingBalance: number;
4815
+ differsFromFederal: boolean;
4816
+ issues: string[];
4817
+ }
4818
+ declare function computeCeeSuccessor(input: CeeSuccessorInput): CeeSuccessorResult;
4819
+ interface CdeRegularFederal {
4820
+ /** 012300 */
4821
+ openingBalance?: number;
4822
+ /** 012303 — current year expenses excluding look-back. MUST equal federal. */
4823
+ currentYearExpenses?: number;
4824
+ /** 012304 — current year expenses under the look-back rule. MUST equal federal. */
4825
+ lookBackExpenses?: number;
4826
+ /** 012305 — transferred on amalgamation or wind-up of subsidiary. */
4827
+ amalgamationTransfer?: number;
4828
+ /** 012310 — other additions. */
4829
+ otherAdditions?: number;
4830
+ /** 012315 — reclassified Canadian exploration expenses. MUST equal federal. */
4831
+ reclassifiedFromCee?: number;
4832
+ /** 012320 — government assistance and grants. MUST equal federal. */
4833
+ governmentAssistance?: number;
4834
+ /** 012325 — receivable on disposition of underground oil/gas storage rights or mining property. */
4835
+ receivableOnDisposition?: number;
4836
+ /**
4837
+ * 012335 — other deductions or transfers (015107). The spec's own text for
4838
+ * this field adds "(Note: If 015139 is negative, include the amount at
4839
+ * 015107 as a positive value.)" — line 015139 does not exist anywhere else
4840
+ * in this schedule's field list. NOT modelled; see the module doc comment.
4841
+ * This input is the federal 012335 figure only.
4842
+ */
4843
+ otherDeductions?: number;
4844
+ /** 012343 — renounced under a flow-through share agreement. MUST equal federal. */
4845
+ renouncedFlowThrough?: number;
4846
+ /** 012340 — transferred on disposition of resource property to successor. */
4847
+ transferredToSuccessor?: number;
4848
+ /** 012344 — expenses renounced under the look-back rule. MUST equal federal. */
4849
+ renouncedLookBack?: number;
4850
+ /**
4851
+ * 012330 — the federal default for line 015105 when the CCOGPE-regular
4852
+ * pool subtotal is NOT negative (see `computeCdeRegular`'s `ccogpeRegular`
4853
+ * parameter for the negative-subtotal case, which overrides this).
4854
+ */
4855
+ creditBalanceInCogpePool?: number;
4856
+ }
4857
+ type CdeRegularOverride = Partial<Pick<CdeRegularFederal, 'openingBalance' | 'amalgamationTransfer' | 'otherAdditions' | 'receivableOnDisposition' | 'otherDeductions' | 'transferredToSuccessor' | 'creditBalanceInCogpePool'>>;
4858
+ interface CdeRegularInput {
4859
+ federal: CdeRegularFederal;
4860
+ albertaOverride?: CdeRegularOverride;
4861
+ /** 015115 */
4862
+ claimed?: number;
4863
+ /** Days in the tax year, for the ≥357-day step proration. Default 365. */
4864
+ daysInTaxYear?: number;
4865
+ }
4866
+ interface CdeRegularResult {
4867
+ openingBalance: number;
4868
+ currentYearExpenses: number;
4869
+ lookBackExpenses: number;
4870
+ amalgamationTransfer: number;
4871
+ otherAdditions: number;
4872
+ reclassifiedFromCee: number;
4873
+ governmentAssistance: number;
4874
+ receivableOnDisposition: number;
4875
+ /** 015105 — see module doc comment for the CCOGPE ↔ CDE cross-linkage this implements. */
4876
+ creditBalanceInCogpePool: number;
4877
+ otherDeductions: number;
4878
+ renouncedFlowThrough: number;
4879
+ transferredToSuccessor: number;
4880
+ renouncedLookBack: number;
4881
+ /** Subtotal before claim (additions − deductions, excluding the claim itself). */
4882
+ subtotal: number;
4883
+ /** 015115 */
4884
+ claim: number;
4885
+ /** 015117 */
4886
+ closingBalance: number;
4887
+ differsFromFederal: boolean;
4888
+ issues: string[];
4889
+ }
4890
+ declare function computeCdeRegular(input: CdeRegularInput, /** The already-computed CCOGPE-regular pool, for line 015105's cross-pool formula. */
4891
+
4892
+ ccogpeRegular: {
4893
+ subtotal: number;
4894
+ }): CdeRegularResult;
4895
+ interface CdeSuccessorFederal {
4896
+ /** 012350 */
4897
+ openingBalance?: number;
4898
+ /** 012355 — transferred on amalgamation or wind-up of subsidiary. */
4899
+ amalgamationTransfer?: number;
4900
+ /** 012357 — transferred other than on amalgamation or wind-up of subsidiary. */
4901
+ otherTransfer?: number;
4902
+ /** 012365 — reclassified Canadian exploration expenses. MUST equal federal. */
4903
+ reclassifiedFromCee?: number;
4904
+ /**
4905
+ * 015133 — "Deduct: credit balance in the cumulative Canadian oil and gas
4906
+ * property expense pool". Unlike 015105, the spec gives NO federal default
4907
+ * line for this field, and its own formula text ("value may not exceed
4908
+ * amount A" when A is negative) is ambiguous about whether it means "value
4909
+ * = A" (as 015105 states unconditionally) or something looser. This module
4910
+ * treats it the same way as 015105 — auto-set to the negative CCOGPE-
4911
+ * successor subtotal when negative — and flags the ambiguity. See module
4912
+ * doc comment.
4913
+ */
4914
+ creditBalanceInCogpePool?: number;
4915
+ /** 012385 — other deductions or transfers. */
4916
+ otherDeductions?: number;
4917
+ /** 012390 — transferred on disposition of resource property. */
4918
+ transferredToSuccessor?: number;
4919
+ }
4920
+ type CdeSuccessorOverride = Partial<Pick<CdeSuccessorFederal, 'openingBalance' | 'amalgamationTransfer' | 'otherTransfer' | 'creditBalanceInCogpePool' | 'otherDeductions' | 'transferredToSuccessor'>>;
4921
+ interface CdeSuccessorInput {
4922
+ federal: CdeSuccessorFederal;
4923
+ albertaOverride?: CdeSuccessorOverride;
4924
+ /** 015141 */
4925
+ claimed?: number;
4926
+ /** Days in the tax year, for the ≥357-day step proration. Default 365. */
4927
+ daysInTaxYear?: number;
4928
+ }
4929
+ interface CdeSuccessorResult {
4930
+ openingBalance: number;
4931
+ amalgamationTransfer: number;
4932
+ otherTransfer: number;
4933
+ reclassifiedFromCee: number;
4934
+ /** 015133 — see module doc comment. */
4935
+ creditBalanceInCogpePool: number;
4936
+ otherDeductions: number;
4937
+ transferredToSuccessor: number;
4938
+ subtotal: number;
4939
+ /** 015141 */
4940
+ claim: number;
4941
+ /** 015143 */
4942
+ closingBalance: number;
4943
+ differsFromFederal: boolean;
4944
+ issues: string[];
4945
+ }
4946
+ declare function computeCdeSuccessor(input: CdeSuccessorInput, /** The already-computed CCOGPE-successor pool, for line 015133's cross-pool formula. */
4947
+
4948
+ ccogpeSuccessor: {
4949
+ subtotal: number;
4950
+ }): CdeSuccessorResult;
4951
+ interface CcogpeRegularFederal {
4952
+ /** 012400 */
4953
+ openingBalance?: number;
4954
+ /** 012405 — current year expenses. MUST equal federal. */
4955
+ currentYearExpenses?: number;
4956
+ /** 012410 — transferred on amalgamation or wind-up of subsidiary. */
4957
+ amalgamationTransfer?: number;
4958
+ /** 012415 — other additions. */
4959
+ otherAdditions?: number;
4960
+ /** 012420 — received or receivable on disposition of Canadian oil and gas property. */
4961
+ receivableOnDisposition?: number;
4962
+ /** 012425 — government assistance and grants. MUST equal federal. */
4963
+ governmentAssistance?: number;
4964
+ /** 012435 — transferred on disposition of resource property to successor. */
4965
+ transferredToSuccessor?: number;
4966
+ /**
4967
+ * 012440 — other deductions or transfers (015167). May ALSO receive a
4968
+ * carryover from the CCOGPE-successor pool per line 189(b) when that pool
4969
+ * is negative and no s.66.7(4)(a)(iii) designation was made — NOT
4970
+ * auto-applied here; see module doc comment and `computeCcogpeSuccessor`'s
4971
+ * issues.
4972
+ */
4973
+ otherDeductions?: number;
4974
+ }
4975
+ type CcogpeRegularOverride = Partial<Pick<CcogpeRegularFederal, 'openingBalance' | 'amalgamationTransfer' | 'otherAdditions' | 'receivableOnDisposition' | 'transferredToSuccessor' | 'otherDeductions'>>;
4976
+ interface CcogpeRegularInput {
4977
+ federal: CcogpeRegularFederal;
4978
+ albertaOverride?: CcogpeRegularOverride;
4979
+ /** 015169 */
4980
+ claimed?: number;
4981
+ /** Days in the tax year, for the ≥357-day step proration. Default 365. */
4982
+ daysInTaxYear?: number;
4983
+ }
4984
+ interface CcogpeRegularResult {
4985
+ openingBalance: number;
4986
+ currentYearExpenses: number;
4987
+ amalgamationTransfer: number;
4988
+ otherAdditions: number;
4989
+ receivableOnDisposition: number;
4990
+ governmentAssistance: number;
4991
+ transferredToSuccessor: number;
4992
+ otherDeductions: number;
4993
+ /** Subtotal before claim ("A" at source lines 14281-14283): 015151+153+155+157-159-161-165-167. */
4994
+ subtotal: number;
4995
+ /** 015169 */
4996
+ claim: number;
4997
+ /** 015171 */
4998
+ closingBalance: number;
4999
+ differsFromFederal: boolean;
5000
+ issues: string[];
5001
+ }
5002
+ declare function computeCcogpeRegular(input: CcogpeRegularInput): CcogpeRegularResult;
5003
+ interface CcogpeSuccessorFederal {
5004
+ /** 012450 */
5005
+ openingBalance?: number;
5006
+ /** 012455 — transferred on amalgamation or wind-up of subsidiary. */
5007
+ amalgamationTransfer?: number;
5008
+ /** 012460 — transferred other than on amalgamation or wind-up of subsidiary. */
5009
+ otherTransfer?: number;
5010
+ /** 012470 — received or receivable on disposition of Canadian oil and gas property. */
5011
+ receivableOnDisposition?: number;
5012
+ /** 012485 — transferred on disposition of resource property. */
5013
+ transferredToSuccessor?: number;
5014
+ /** 012490 — other deductions or transfers. */
5015
+ otherDeductions?: number;
5016
+ }
5017
+ type CcogpeSuccessorOverride = Partial<Pick<CcogpeSuccessorFederal, 'openingBalance' | 'amalgamationTransfer' | 'otherTransfer' | 'receivableOnDisposition' | 'transferredToSuccessor' | 'otherDeductions'>>;
5018
+ interface CcogpeSuccessorInput {
5019
+ federal: CcogpeSuccessorFederal;
5020
+ albertaOverride?: CcogpeSuccessorOverride;
5021
+ /** 015189 */
5022
+ claimed?: number;
5023
+ /** Days in the tax year, for the ≥357-day step proration. Default 365. */
5024
+ daysInTaxYear?: number;
5025
+ }
5026
+ interface CcogpeSuccessorResult {
5027
+ openingBalance: number;
5028
+ amalgamationTransfer: number;
5029
+ otherTransfer: number;
5030
+ receivableOnDisposition: number;
5031
+ transferredToSuccessor: number;
5032
+ otherDeductions: number;
5033
+ /** Subtotal before claim ("A" at source lines 14643-14645): 015173+175+177-181-185-187. */
5034
+ subtotal: number;
5035
+ /** 015189 */
5036
+ claim: number;
5037
+ /**
5038
+ * 015191 — computed with the clean additions−deductions−claim formula
5039
+ * (floored at 0), NOT the literal spec text's apparent "−015167−015169"
5040
+ * cross-pool subtraction. See module doc comment ("A second, independent
5041
+ * anomaly").
5042
+ */
5043
+ closingBalance: number;
5044
+ differsFromFederal: boolean;
5045
+ issues: string[];
5046
+ }
5047
+ declare function computeCcogpeSuccessor(input: CcogpeSuccessorInput): CcogpeSuccessorResult;
5048
+ interface FedeRegularFederal {
5049
+ /** 012500 */
5050
+ openingBalance?: number;
5051
+ /** 012510 — transferred on amalgamation or wind-up of subsidiary. */
5052
+ amalgamationTransfer?: number;
5053
+ /**
5054
+ * 012515 — "other deductions or transfers" per the field caption; the
5055
+ * spec's own rule TEXT for this line instead describes "transferred on
5056
+ * disposition of resource property" (source lines 14829-14839), a
5057
+ * caption/rule-text mismatch. The federal line reference (012515) is
5058
+ * unambiguous either way, so this is a minor note, not a computation risk.
5059
+ */
5060
+ otherDeductions?: number;
5061
+ /** 012530 — foreign-source resource income. MUST equal federal. Used as the claim's income cap. */
5062
+ foreignResourceIncome?: number;
5063
+ }
5064
+ type FedeRegularOverride = Partial<Pick<FedeRegularFederal, 'openingBalance' | 'amalgamationTransfer' | 'otherDeductions'>>;
5065
+ interface FedeRegularInput {
5066
+ federal: FedeRegularFederal;
5067
+ albertaOverride?: FedeRegularOverride;
5068
+ /** 015209 */
5069
+ claimed?: number;
5070
+ /** Days in the tax year, for the linear days/365 proration. Default 365. */
5071
+ daysInTaxYear?: number;
5072
+ }
5073
+ interface FedeRegularResult {
5074
+ openingBalance: number;
5075
+ amalgamationTransfer: number;
5076
+ otherDeductions: number;
5077
+ foreignResourceIncome: number;
5078
+ /** Pool: 015201+205-207. */
5079
+ pool: number;
5080
+ /** 015209 */
5081
+ claim: number;
5082
+ /** 015211 */
5083
+ closingBalance: number;
5084
+ differsFromFederal: boolean;
5085
+ issues: string[];
5086
+ }
5087
+ declare function computeFedeRegular(input: FedeRegularInput): FedeRegularResult;
5088
+ interface FedeSuccessorFederal {
5089
+ /** 012550 */
5090
+ openingBalance?: number;
5091
+ /** 012555 — transferred on amalgamation or wind-up of subsidiary. */
5092
+ amalgamationTransfer?: number;
5093
+ /** 012560 — transferred other than on amalgamation or wind-up of subsidiary. */
5094
+ otherTransfer?: number;
5095
+ /** 012565 — other deductions or transfers (same caption/rule-text mismatch as 015207; see FedeRegularFederal.otherDeductions). */
5096
+ otherDeductions?: number;
5097
+ /** 012580 — foreign-source resource income. MUST equal federal. */
5098
+ foreignResourceIncome?: number;
5099
+ }
5100
+ type FedeSuccessorOverride = Partial<Pick<FedeSuccessorFederal, 'openingBalance' | 'amalgamationTransfer' | 'otherTransfer' | 'otherDeductions'>>;
5101
+ interface FedeSuccessorInput {
5102
+ federal: FedeSuccessorFederal;
5103
+ albertaOverride?: FedeSuccessorOverride;
5104
+ /** 015221 */
5105
+ claimed?: number;
5106
+ }
5107
+ interface FedeSuccessorResult {
5108
+ openingBalance: number;
5109
+ amalgamationTransfer: number;
5110
+ otherTransfer: number;
5111
+ otherDeductions: number;
5112
+ foreignResourceIncome: number;
5113
+ /** Pool: 015213+215+217-219. */
5114
+ pool: number;
5115
+ /** 015221 — NO percentage rate, unlike the regular pool: capped only by pool and income. */
5116
+ claim: number;
5117
+ /** 015223 */
5118
+ closingBalance: number;
5119
+ differsFromFederal: boolean;
5120
+ issues: string[];
5121
+ }
5122
+ declare function computeFedeSuccessor(input: FedeSuccessorInput): FedeSuccessorResult;
5123
+ interface SfedeCountryRegularFederal {
5124
+ /** 012601 — 2-letter country code. MUST equal federal. */
5125
+ countryCode: string;
5126
+ /** 012600 */
5127
+ openingBalance?: number;
5128
+ /** 012610 — transferred on amalgamation or wind-up of subsidiary. */
5129
+ amalgamationTransfer?: number;
5130
+ /** 012611 — other additions. */
5131
+ otherAdditions?: number;
5132
+ /** 012615 — other deductions or transfers. */
5133
+ otherDeductions?: number;
5134
+ /** 012630 — foreign resource income for THIS country. MUST equal federal. */
5135
+ foreignResourceIncome?: number;
5136
+ }
5137
+ type SfedeCountryRegularOverride = Partial<Pick<SfedeCountryRegularFederal, 'openingBalance' | 'amalgamationTransfer' | 'otherAdditions' | 'otherDeductions'>>;
5138
+ interface SfedeCountryRegularInput {
5139
+ federal: SfedeCountryRegularFederal;
5140
+ albertaOverride?: SfedeCountryRegularOverride;
5141
+ /** 015253 */
5142
+ claimed?: number;
5143
+ /** Days in the tax year, for the linear days/365 proration. Default 365. */
5144
+ daysInTaxYear?: number;
5145
+ }
5146
+ interface SfedeCountryRegularResult {
5147
+ countryCode: string;
5148
+ openingBalance: number;
5149
+ amalgamationTransfer: number;
5150
+ otherAdditions: number;
5151
+ otherDeductions: number;
5152
+ foreignResourceIncome: number;
5153
+ /** Pool: 015243+247+249-251. */
5154
+ pool: number;
5155
+ /** 015253 */
5156
+ claim: number;
5157
+ /** 015255 */
5158
+ closingBalance: number;
5159
+ differsFromFederal: boolean;
5160
+ issues: string[];
5161
+ }
5162
+ declare function computeSfedeCountryRegular(input: SfedeCountryRegularInput): SfedeCountryRegularResult;
5163
+ interface SfedeCountrySuccessorFederal {
5164
+ /** 012651 — 2-letter country code. MUST equal federal. */
5165
+ countryCode: string;
5166
+ /** 012650 */
5167
+ openingBalance?: number;
5168
+ /** 012655 — transferred on amalgamation or wind-up of subsidiary. */
5169
+ amalgamationTransfer?: number;
5170
+ /** 012660 — transferred other than on amalgamation or wind-up of subsidiary. */
5171
+ otherTransfer?: number;
5172
+ /** 012665 — other deductions or transfers. */
5173
+ otherDeductions?: number;
5174
+ /** 012680 — foreign resource income for THIS country. MUST equal federal. */
5175
+ foreignResourceIncome?: number;
5176
+ }
5177
+ type SfedeCountrySuccessorOverride = Partial<Pick<SfedeCountrySuccessorFederal, 'openingBalance' | 'amalgamationTransfer' | 'otherTransfer' | 'otherDeductions'>>;
5178
+ interface SfedeCountrySuccessorInput {
5179
+ federal: SfedeCountrySuccessorFederal;
5180
+ albertaOverride?: SfedeCountrySuccessorOverride;
5181
+ /** 015273 */
5182
+ claimed?: number;
5183
+ }
5184
+ interface SfedeCountrySuccessorResult {
5185
+ countryCode: string;
5186
+ openingBalance: number;
5187
+ amalgamationTransfer: number;
5188
+ otherTransfer: number;
5189
+ otherDeductions: number;
5190
+ foreignResourceIncome: number;
5191
+ /** Pool: 015263+265+267-269. */
5192
+ pool: number;
5193
+ /** 015273 — NO percentage rate, capped only by pool and this country's income. */
5194
+ claim: number;
5195
+ /** 015275 */
5196
+ closingBalance: number;
5197
+ differsFromFederal: boolean;
5198
+ issues: string[];
5199
+ }
5200
+ declare function computeSfedeCountrySuccessor(input: SfedeCountrySuccessorInput): SfedeCountrySuccessorResult;
5201
+ interface CfreCountryRegularFederal {
5202
+ /** 012701 — 2-letter country code. MUST equal federal. */
5203
+ countryCode: string;
5204
+ /** 012700 */
5205
+ openingBalance?: number;
5206
+ /** 012705 — current year expenses. MUST equal federal. */
5207
+ currentYearExpenses?: number;
5208
+ /** 012710 — transferred on amalgamation or wind-up of subsidiary. */
5209
+ amalgamationTransfer?: number;
5210
+ /** 012711 — other additions. */
5211
+ otherAdditions?: number;
5212
+ /** 012715 — other deductions or transfers. */
5213
+ otherDeductions?: number;
5214
+ /** 012730 — foreign resource income (loss) for THIS country. MUST equal federal. */
5215
+ foreignResourceIncome?: number;
5216
+ }
5217
+ type CfreCountryRegularOverride = Partial<Pick<CfreCountryRegularFederal, 'openingBalance' | 'amalgamationTransfer' | 'otherAdditions' | 'otherDeductions'>>;
5218
+ interface CfreCountryRegularInput {
5219
+ federal: CfreCountryRegularFederal;
5220
+ albertaOverride?: CfreCountryRegularOverride;
5221
+ /** 015293 */
5222
+ claimed?: number;
5223
+ /** Days in the tax year, for the linear days/365 proration. Default 365. */
5224
+ daysInTaxYear?: number;
5225
+ /**
5226
+ * "The global foreign resource limit for the year designated for that
5227
+ * country" (source lines 15703-15711) — an undefined external quantity in
5228
+ * this spec excerpt. Omitting it makes the B-component of the claim zero
5229
+ * (the conservative, under-claim direction) and raises an issue. See
5230
+ * module doc comment.
5231
+ */
5232
+ globalForeignResourceLimit?: number;
5233
+ }
5234
+ interface CfreCountryRegularResult {
5235
+ countryCode: string;
5236
+ openingBalance: number;
5237
+ currentYearExpenses: number;
5238
+ amalgamationTransfer: number;
5239
+ otherAdditions: number;
5240
+ otherDeductions: number;
5241
+ foreignResourceIncome: number;
5242
+ /** Pool: 015283+285+287+289-291. */
5243
+ pool: number;
5244
+ /** 015293 = A + B, see module doc comment. */
5245
+ claim: number;
5246
+ /** 015295 */
5247
+ closingBalance: number;
5248
+ differsFromFederal: boolean;
5249
+ issues: string[];
5250
+ }
5251
+ /**
5252
+ * CFRE regular claims need a second pass across all countries (line 015293's
5253
+ * "A" component caps at "total of all occurrences of 015297"), so this takes
5254
+ * the whole array and the pre-summed `sumForeignResourceIncome` across every
5255
+ * country's own 015297 rather than being called per-entry like the other
5256
+ * per-country pools.
5257
+ */
5258
+ declare function computeCfreRegular(entries: readonly CfreCountryRegularInput[]): {
5259
+ entries: CfreCountryRegularResult[];
5260
+ issues: string[];
5261
+ };
5262
+ interface AlbertaSchedule15Input {
5263
+ eda?: {
5264
+ regular: EdaRegularInput;
5265
+ successor: EdaSuccessorInput;
5266
+ };
5267
+ cmedb?: CmedbInput;
5268
+ cee?: {
5269
+ regular: CeeRegularInput;
5270
+ successor: CeeSuccessorInput;
5271
+ };
5272
+ cde?: {
5273
+ regular: CdeRegularInput;
5274
+ successor: CdeSuccessorInput;
5275
+ };
5276
+ ccogpe?: {
5277
+ regular: CcogpeRegularInput;
5278
+ successor: CcogpeSuccessorInput;
5279
+ };
5280
+ fede?: {
5281
+ regular: FedeRegularInput;
5282
+ successor: FedeSuccessorInput;
5283
+ };
5284
+ sfede?: {
5285
+ regular: readonly SfedeCountryRegularInput[];
5286
+ successor: readonly SfedeCountrySuccessorInput[];
5287
+ };
5288
+ cfre?: {
5289
+ regular: readonly CfreCountryRegularInput[];
5290
+ successor: readonly CfreCountrySuccessorInput[];
5291
+ };
5292
+ /** 000060 — is the corporation reporting different Alberta taxable income? Defaults to false. */
5293
+ reportsDifferentAlbertaIncome?: boolean;
5294
+ /**
5295
+ * 000061 — has the corporation elected different discretionary amounts, or
5296
+ * do opening balances differ? Defaults to false. The spec forces this to
5297
+ * true whenever 000060 is true.
5298
+ */
5299
+ electsDifferentDiscretionaryAmounts?: boolean;
5300
+ }
5301
+ interface AlbertaSchedule15Result {
5302
+ eda?: {
5303
+ regular: EdaRegularResult;
5304
+ successor: EdaSuccessorResult;
5305
+ };
5306
+ cmedb?: CmedbResult;
5307
+ cee?: {
5308
+ regular: CeeRegularResult;
5309
+ successor: CeeSuccessorResult;
5310
+ };
5311
+ cde?: {
5312
+ regular: CdeRegularResult;
5313
+ successor: CdeSuccessorResult;
5314
+ };
5315
+ ccogpe?: {
5316
+ regular: CcogpeRegularResult;
5317
+ successor: CcogpeSuccessorResult;
5318
+ };
5319
+ fede?: {
5320
+ regular: FedeRegularResult;
5321
+ successor: FedeSuccessorResult;
5322
+ };
5323
+ sfede?: {
5324
+ regular: SfedeCountryRegularResult[];
5325
+ successor: SfedeCountrySuccessorResult[];
5326
+ };
5327
+ cfre?: {
5328
+ regular: CfreCountryRegularResult[];
5329
+ successor: CfreCountrySuccessorResult[];
5330
+ };
5331
+ /** Whether the TRA requires form 015 to be filed. */
5332
+ formRequired: boolean;
5333
+ /** Whether form 015 may be filed at all — false when both 000060 and 000061 are 2. */
5334
+ formPermitted: boolean;
5335
+ issues: string[];
5336
+ }
5337
+ declare function computeAlbertaSchedule15(input: AlbertaSchedule15Input): AlbertaSchedule15Result;
5338
+ interface CfreCountrySuccessorFederal {
5339
+ /** 012751 — 2-letter country code. MUST equal federal. */
5340
+ countryCode: string;
5341
+ /** 012750 */
5342
+ openingBalance?: number;
5343
+ /** 012755 — transferred on amalgamation or wind-up of subsidiary. */
5344
+ amalgamationTransfer?: number;
5345
+ /** 012760 — transferred other than on amalgamation or wind-up of subsidiary. */
5346
+ otherTransfer?: number;
5347
+ /** 012765 — other deductions or transfers. */
5348
+ otherDeductions?: number;
5349
+ /** 012780 — foreign resource income (loss) for THIS country. MUST equal federal. */
5350
+ foreignResourceIncome?: number;
5351
+ }
5352
+ type CfreCountrySuccessorOverride = Partial<Pick<CfreCountrySuccessorFederal, 'openingBalance' | 'amalgamationTransfer' | 'otherTransfer' | 'otherDeductions'>>;
5353
+ interface CfreCountrySuccessorInput {
5354
+ federal: CfreCountrySuccessorFederal;
5355
+ albertaOverride?: CfreCountrySuccessorOverride;
5356
+ /** 015313 */
5357
+ claimed?: number;
5358
+ /** Days in the tax year, for the linear days/365 proration. Default 365. */
5359
+ daysInTaxYear?: number;
5360
+ }
5361
+ interface CfreCountrySuccessorResult {
5362
+ countryCode: string;
5363
+ openingBalance: number;
5364
+ amalgamationTransfer: number;
5365
+ otherTransfer: number;
5366
+ otherDeductions: number;
5367
+ foreignResourceIncome: number;
5368
+ /** Pool: 015303+305+307-309. */
5369
+ pool: number;
5370
+ /** 015313, capped at 30%-prorated pool OR the sum of every country's 015317. */
5371
+ claim: number;
5372
+ /** 015315 */
5373
+ closingBalance: number;
5374
+ differsFromFederal: boolean;
5375
+ issues: string[];
5376
+ }
5377
+ /** Line 015313 caps at "total of all occurrence of 015317", so this also processes the whole array. */
5378
+ declare function computeCfreSuccessor(entries: readonly CfreCountrySuccessorInput[]): {
5379
+ entries: CfreCountrySuccessorResult[];
5380
+ issues: string[];
5381
+ };
5382
+ /**
5383
+ * `scheduleNNValues` for Schedule 15, following the `at1-schedule-line-items.ts`
5384
+ * builder pattern (see `schedule3Values` in `schedule3-other-deductions-credits.ts`
5385
+ * for the exact convention this copies). Kept in THIS file rather than the
5386
+ * shared filing module per the task instructions — other agents are editing
5387
+ * `at1-schedule-line-items.ts` concurrently.
5388
+ */
5389
+ interface At1ScheduleValueLike {
5390
+ lineItemId: string;
5391
+ value: string | number;
5392
+ }
5393
+ interface At1ScheduleDataLike {
5394
+ scheduleId: string;
5395
+ values: At1ScheduleValueLike[];
5396
+ }
5397
+ /**
5398
+ * `computeAlbertaSchedule15`'s `issues` documents every ambiguous formula this
5399
+ * module resolved a judgment call on (the 015105/015133/015167 CCOGPE↔CDE
5400
+ * routing, the 015191 anomaly, the unresolved 015139 reference — see the
5401
+ * module doc comment). `schedule15Values` files whatever number the engine
5402
+ * actually resolved each of those lines to — it does NOT drop a line because
5403
+ * its formula was ambiguous — but a `{ scheduleId, values }` pair has nowhere
5404
+ * to carry the ambiguity flags themselves. `Schedule15FilingResult` adds
5405
+ * `issues` alongside the standard shape so a caller (or a reviewer) can see
5406
+ * both the filed numbers and the exact judgment calls behind them in one
5407
+ * place; it remains a valid `At1ScheduleDataLike` wherever only that narrower
5408
+ * shape is expected, since every required field is still present.
5409
+ */
5410
+ interface Schedule15FilingResult extends At1ScheduleDataLike {
5411
+ issues: string[];
5412
+ }
5413
+ /**
5414
+ * Field ids per the spec transcription in the module doc comment:
5415
+ * EDA 001-021 CMEDB 023-033 CEE 041-083 CDE 091-143
5416
+ * CCOGPE 151-191 FEDE 201-233 SFEDE 241-277 (per country)
5417
+ * CFRE 281-317 (per country)
5418
+ * A pool absent from `result` (never supplied to `computeAlbertaSchedule15`)
5419
+ * emits NOTHING — there is no zero-filled line for a pool the corporation
5420
+ * does not carry, matching every other reconciliation-style AT1 schedule
5421
+ * builder in this package (e.g. `schedule18Values` only emits categories that
5422
+ * were actually computed).
5423
+ */
5424
+ declare function schedule15Values(result: AlbertaSchedule15Result): Schedule15FilingResult;
5425
+ //#endregion
2422
5426
  //#region src/t2/at1/engine/alberta-return.d.ts
2423
5427
  interface AlbertaReturnInput {
2424
5428
  /** Federal taxable income (from the T2). */
@@ -2447,10 +5451,28 @@ interface AlbertaReturnInput {
2447
5451
  */
2448
5452
  schedules?: {
2449
5453
  smallBusinessDeduction?: Schedule1FilingInput;
2450
- allocation?: Schedule2FilingInput;
2451
- lossCarryback?: Schedule10FilingInput;
5454
+ allocation?: Schedule2FilingInput; /** Alberta other tax deductions and credits — ITC / CITC / APITC (Sch 3). */
5455
+ otherDeductionsCredits?: Schedule3Result; /** Alberta foreign investment income tax credit (Sch 4). */
5456
+ foreignInvestmentTaxCredit?: Schedule4Result$1; /** Alberta royalty tax deduction — Crown Royalty Tax Deduction pools (Sch 5). */
5457
+ royaltyTaxDeduction?: AlbertaSchedule5Result; /** Alberta royalty tax credit (Sch 6). */
5458
+ royaltyTaxCredit?: AlbertaSchedule6Result; /** Alberta royalty tax credit / deduction supplemental information (Sch 7). */
5459
+ royaltySupplemental?: AlbertaSchedule7Result; /** Alberta political contributions tax credit (Sch 8). */
5460
+ politicalContributions?: Schedule8Result;
5461
+ /**
5462
+ * Alberta SR&ED tax credit — the CREDIT, distinct from Sch 16's deduction
5463
+ * pool (Sch 9). `group` is the page-3 associated-group allocation detail;
5464
+ * supplied only when `AlbertaSchedule9Result` came from an associated
5465
+ * corporation with a group actually entered.
5466
+ */
5467
+ sredTaxCredit?: {
5468
+ result: AlbertaSchedule9Result;
5469
+ group?: Schedule9GroupFilingInput;
5470
+ };
5471
+ lossCarryback?: Schedule10FilingInput; /** Alberta manufacturing and processing profits deduction — historical, pre-2001-04-01 only (Sch 11). */
5472
+ manufacturingProcessing?: Schedule11Result;
2452
5473
  reconciliation?: Schedule12FilingInput;
2453
- cca?: AlbertaSchedule13Result;
5474
+ cca?: AlbertaSchedule13Result; /** Alberta resource related deductions — eight expense-pool continuities (Sch 15). */
5475
+ resourceDeductions?: AlbertaSchedule15Result;
2454
5476
  scientificResearch?: AlbertaSchedule16Result;
2455
5477
  reserves?: AlbertaSchedule17Result;
2456
5478
  dispositions?: AlbertaSchedule18Result;
@@ -2581,8 +5603,36 @@ interface At1TransmitterInfo {
2581
5603
  webServiceVersion: string;
2582
5604
  softwareVersion: string;
2583
5605
  serialNumber: string;
2584
- thirdPartyIndicator: '0' | '1';
5606
+ /**
5607
+ * EDI017001 — §3.3.6.1: "Must be 1 (yes) or 2 (no)." There is no "0"; a
5608
+ * transmitter that is not filing as a third party for the corporation is
5609
+ * '2', not absent and not '0'.
5610
+ */
5611
+ thirdPartyIndicator: '1' | '2';
2585
5612
  legalName: string;
5613
+ /**
5614
+ * EDI023001 — §3.3.6.1: "Mandatory if line 017 = '1'." Rejected with TRA
5615
+ * error 10025 ("missing one or more third party service provider mandatory
5616
+ * line items") when 017 is '1' and this is absent — confirmed live against
5617
+ * TRA's Fall 2026 NetFile test-site endpoint 2026-08-30.
5618
+ */
5619
+ organizationType?: 'CORPORATION' | 'PARTNERSHIP' | 'INDIVIDUAL';
5620
+ /**
5621
+ * EDI051/053/055/057/059/061 — the transmitter's own address. §3.3.6.1:
5622
+ * street (051) / city (055) / province (057) / postal code (059) / country
5623
+ * (061) are ALL mandatory when line 017 = '1' (province and postal code
5624
+ * only checked when country is 'CA' or 'US', per the spec, but this engine
5625
+ * always emits them together — a third-party transmitter has a mailing
5626
+ * address, full stop). `line2` (053) is optional.
5627
+ */
5628
+ address?: {
5629
+ street: string;
5630
+ line2?: string;
5631
+ city: string;
5632
+ province: string;
5633
+ postalCode: string;
5634
+ country: string;
5635
+ };
2586
5636
  contact: {
2587
5637
  firstName: string;
2588
5638
  lastName: string;
@@ -4991,6 +8041,18 @@ interface FederalT2Input {
4991
8041
  schedule1Deductions?: readonly Schedule1Line[];
4992
8042
  /** Schedule 8 CCA class inputs — engine computes the deduction + recapture + terminal loss. */
4993
8043
  ccaClasses?: readonly CcaClassInput[];
8044
+ /**
8045
+ * Class 13 (leasehold interests), the FULL Reg 1100(1)(b)/Schedule III
8046
+ * mechanic — per-layer capital cost and lease term, the 5-to-40-year period
8047
+ * floor, all of it. Separate from `ccaClasses`: a class-13/14 row THERE
8048
+ * only ever represents an EXISTING opening-UCC pool with no current-year
8049
+ * addition (see `schedule8.ts`'s `computeStraightLineOpeningBalanceClass`)
8050
+ * and refuses one. Supply a NEW layer here instead — this is the entry
8051
+ * point that has the lease-term data to amortise it correctly.
8052
+ */
8053
+ class13?: Class13Input;
8054
+ /** Class 14 (limited-life intangibles), the full per-property Reg 1100(1)(c) mechanic. */
8055
+ class14?: Class14Input;
4994
8056
  /**
4995
8057
  * Schedule 6 capital-property dispositions — engine computes the taxable capital
4996
8058
  * gain (added to income) and any current-year net capital loss (→ Schedule 4).
@@ -5224,6 +8286,10 @@ interface FederalT2Result {
5224
8286
  lossCarryback?: LossCarrybackResult;
5225
8287
  /** Schedule 8 — CCA by class + closing UCC to carry forward (when ccaClasses given). */
5226
8288
  cca?: CcaScheduleResult;
8289
+ /** Schedule 8 — Class 13 leasehold layers (when `class13` given). */
8290
+ class13?: Class13Result;
8291
+ /** Schedule 8 — Class 14 limited-life properties (when `class14` given). */
8292
+ class14?: Class14Result;
5227
8293
  /** Schedule 6 — capital dispositions, taxable capital gain, net capital loss (when given). */
5228
8294
  capitalGains?: Schedule6Result;
5229
8295
  /** Schedule 5 — provincial/territorial tax (when a single Schedule-5 province is set). */
@@ -6225,4 +9291,4 @@ interface MpDeductionResult {
6225
9291
  }
6226
9292
  declare function computeMpDeduction(input: MpDeductionInput, rates?: MpDeductionRates): MpDeductionResult;
6227
9293
  //#endregion
6228
- export { QuebecTaxResult as $, AlbertaSchedule18Result as $a, At1ScheduleValue as $i, mealsAndEntertainmentAddBack as $n, leaseholdPeriods as $o, Schedule12Adjustment as $r, ItcRecaptureItem as $t, T2CifGifi as A, computeIegAgreement as Aa, At1CriticalFieldMissingError as Ai, Schedule4Input as An, Schedule8Entry as Ao, PartITaxResult as Ar, computeDayWeightedGeneralTax as As, computeSchedule55 as At, Co17Certification as B, computeIegEligibleExpenditures as Ba, at1YesNo as Bi, computeSchedule2 as Bn, Class141AdditionalAllowanceInput as Bo, CORP_TAX_RATE_BOOK as Br, latestRateYear as Bs, computeGrip as Bt, FOREIGN_TAX_CREDIT_GROSS_UP as C, IegAgreementResult as Ca, formatRsiDate as Ci, Schedule5Result as Cn, AlbertaSchedule13Input as Co, computeTaxableIncome as Cr, AlbertaCorporationStatus as Cs, computeSchedule101 as Ct, computeT2Settlement as D, IegLimitAllocation as Da, renderRsiLineItem as Di, ProvincialAllocationInput as Dn, CcaClassInput as Do, CcpcActiveBusinessTaxInput as Dr, AB_GENERAL_RATE_BANDS as Ds, normalizeSchedule88 as Dt, T2SettlementResult as E, IegGroupResult as Ea, renderRsiHeader as Ei, PermanentEstablishment as En, computeAlbertaSchedule13 as Eo, nonCapitalLossApplied as Er, computeAlbertaSbd as Es, Schedule88Result as Et, T2GifiLine as F, computeIeg as Fa, albertaBalanceUnpaid as Fi, Part4RdtohResult as Fn, computeSchedule8 as Fo, SbdInput as Fr, RateBook as Fs, Schedule54Input as Ft, co17Engine as G, DonationMaximumResult as Ga, AlbertaReturnResult as Gi, Schedule1Result as Gn, Class14Result as Go, computeLossSchedule as Gr, LARGE_CORPORATION_THRESHOLD as Gt, Co17ReturnData as H, AT1_DONATION_GAIN_RATE as Ha, At1ReturnInput as Hi, Schedule1Line as Hn, Class14Input as Ho, resolveCorpTaxRates as Hr, Schedule43Rates as Ht, renderT2DraftReturn as I, computeIegBaseAmount as Ia, assertAt1MandatoryComplete as Ii, REFUNDABLE_PART_I_RATE as In, CLASS_14_1_MINIMUM_DEDUCTION as Io, SbdResult as Ir, RateBookEntry as Is, Schedule54Result as It, computeQuebecReturn as J, Schedule20Input as Ja, SINGLE_JURISDICTION_ALBERTA_FACTOR as Ji, ccaDeduction as Jn, MAX_LEASEHOLD_PERIODS as Jo, CEC_DEDUCTION_RATE as Jr, computeTaxableCapital as Jt, QuebecReturnInput as K, computeDonationMaximum as Ka, computeAlbertaReturn as Ki, amortizationAddBack as Kn, LeaseholdLayer as Ko, AlbertaSchedule14Input as Kr, TaxableCapitalInput as Kt, T2ReturnInput as L, computeIegReductionFactor as La, assertAt1TaxPayableReconciles as Li, computePart4Rdtoh as Ln, CLASS_14_1_TRANSITIONAL_RATE as Lo, computeBusinessLimit as Lr, earliestRateYear as Ls, computeSchedule54 as Lt, T2CifQuestionnaire as M, IEG_2024 as Ma, At1MandatoryFieldMissingError as Mi, computeSchedule4Losses as Mn, UnsupportedCcaClassError as Mo, computePartITax as Mr, AB_TAX_RATE_BOOK as Ms, LRIP_INVESTMENT_INCOME_FACTOR as Mt, T2CifSettlement as N, IegInput as Na, At1TaxPayableMismatchError as Ni, PART_IV_RATE as Nn, computeCcaClass as No, BusinessLimitInput as Nr, AlbertaTaxRates as Ns, LripDividendEvent as Nt, T2CifAddress as O, allocateIegEvenly as Oa, renderAt1NetFile as Oi, ProvincialAllocationResult as On, CcaClassResult as Oo, CcpcActiveBusinessTaxResult as Or, DayWeightedRateResult as Os, Schedule55Input as Ot, T2CifShareholder as P, IegResult as Pa, At1TransmitterInfo as Pi, Part4RdtohInput as Pn, computeCcaSchedule as Po, BusinessLimitResult as Pr, resolveAlbertaTaxRates as Ps, LripEventResult as Pt, QuebecTaxInput as Q, AlbertaSchedule18Input as Qa, At1ScheduleData as Qi, incomeTaxProvisionAddBack as Qn, computeClass141AdditionalAllowance as Qo, computeAlbertaSchedule14 as Qr, ITC_RECAPTURE_PERIOD_YEARS as Qt, t2Engine as R, IegEligibleExpendituresInput as Ra, assertCriticalFields as Ri, Schedule2Input as Rn, Class13Input as Ro, computeSBD as Rr, extendRateBook as Rs, GripInput as Rt, AdjustedTaxableIncomeResult as S, IegAgreementMemberResult as Sa, formatRsiAmount as Si, Schedule5Input as Sn, AlbertaSchedule13ClassResult as So, charitableDonationsDeduction as Sr, computeAlbertaTax as Ss, Schedule101Result as St, T2SettlementInput as T, IegGroupMember as Ta, renderAt1Rsi as Ti, AllocatedProvince as Tn, FederalCcaClass as To, netCapitalLossApplied as Tr, AlbertaSbdResult as Ts, Schedule88Input as Tt, renderCo17DraftReturn as U, AT1_DONATION_INCOME_RATE as Ua, at1Engine as Ui, Schedule1LineDefect as Un, Class14Property as Uo, LossScheduleInput as Ur, Schedule43Result as Ut, Co17Identity as V, iegT661SourceLine as Va, xmlEscape as Vi, Schedule1Input as Vn, Class141AdditionalAllowanceResult as Vo, CorpTaxRates as Vr, resolveRates as Vs, Schedule43Input as Vt, Co17ReturnInput as W, DonationMaximumInput as Wa, AlbertaReturnInput as Wi, Schedule1NotFileableError as Wn, Class14PropertyResult as Wo, LossScheduleResult as Wr, computeSchedule43 as Wt, QuebecEstablishment as X, computeSchedule20 as Xa, AT1_SCHEDULES_WITHOUT_BUILDERS as Xi, deferredIncomeTaxProvisionAddBack as Xn, computeClass13 as Xo, CecIncomeInclusionDetail as Xr, Schedule31Result as Xt, QuebecAllocationResult as Y, Schedule20Result as Ya, computeAllocationFactor as Yi, computeSchedule1 as Yn, MIN_LEASEHOLD_PERIODS as Yo, CEC_INCLUSION_RATE as Yr, Schedule31Input as Yt, computeQuebecAllocationFactor as Z, AT1_DISPOSITION_CATEGORIES as Za, AT1_SCHEDULES_WITH_BUILDERS as Zi, findSchedule1LineDefects as Zn, computeClass14 as Zo, cecScheduleAppliesToTaxYear as Zr, computeSchedule31 as Zt, EifelLimitationInput as _, schedule29Values as _a, RSI_WORD_GAP as _i, computeSchedule13 as _n, AlbertaSchedule16Input as _o, isSchedule5Province as _r, LossCarrybackResult as _s, FederalT2Input as _t, MpDeductionRates as a, Schedule2FilingInput as aa, albertaCcaDifference as ai, computeZetm as an, SECTION_34_2_GROSS_UP as ao, EifelResult as ar, At4970Input as as, T2_CERTIFICATION_FIXTURES as at, ratioOfPermissibleExpenses as b, IegAgreementInput as ba, RsiLineItemError as bi, Schedule6Result as bn, computeAlbertaSchedule16 as bo, TaxableIncomeLine as br, AlbertaTaxInput as bs, FirstReturnEvent as bt, PART_VI_1_DEDUCTION_BANDS as c, schedule12LossDeductions as ca, albertaDispositionAdjustments as ci, BusinessLimitAllocationInput as cn, AT1_RESERVE_LINES as co, ProvincialRateChange as cr, At4970ProjectRowResult as cs, ConformanceSummary as ct, computePartVI1Deduction as d, schedule16Values as da, albertaTerminalLossDifference as di, computeBusinessLimitAllocation as dn, AlbertaSchedule17Result as do, dayWeightedRate as dr, computeAt4970 as ds, T2LineKey as dt, Schedule10FilingInput as ea, Schedule12Input as ei, ItcRecaptureItemResult as en, At1AbilEntry as eo, recaptureAddBack as er, CCA_DECLINING_BALANCE_RATES_2024 as es, computeQuebecTax as et, partVI1DeductionMultiple as f, schedule17Values as fa, computeSchedule12 as fi, Schedule21Input as fn, At1ReserveBalances as fo, PROVINCE_RATES_2024 as fr, LossContinuityInput as fs, T2_LINE_META as ft, EIFEL_TRANSITIONAL_RATIO as g, schedule21Values as ga, RSI_NEGATIVE_PREFIX as gi, ReserveContinuityRow as gn, computeAlbertaSchedule17 as go, ProvincialRate as gr, LossCarrybackInput as gs, runConformanceSuite as gt, EIFEL_STANDARD_RATIO_FROM as h, schedule20Values as ha, RSI_DELIMITER as hi, ReserveContinuityResult as hn, At1ReserveTable as ho, ProvinceRateTable as hr, LossCarrybackError as hs, runConformance as ht, MpDeductionInput as i, Schedule21FilingInput as ia, albertaCapitalGainDifference as ii, ZetmResult as in, At1DispositionCategory as io, EifelInput as ir, resolveCcaRates as is, resolveQuebecTaxRates as it, T2CifPartI as j, computeIegGroupFigures as ja, At1FilingData as ji, Schedule4Result as jn, Schedule8Result as jo, computeCcpcActiveBusinessTax as jr, AB_TAX_2024 as js, LRIP_INVESTMENT_CORPORATION_MULTIPLE as jt, T2CifData as k, allocateIegExpenditureLimit as ka, AT1_CRITICAL_MANDATORY_FIELDS as ki, computeProvincialAllocation as kn, CcaScheduleResult as ko, PartITaxInput as kr, GeneralRateBand as ks, Schedule55Result as kt, PartVI1DeductionBand as l, schedule12Values as la, albertaRecaptureDifference as li, BusinessLimitAllocationResult as ln, AT1_RESERVE_TOTAL_LINES as lo, ProvincialRateChanges as lr, At4970Result as ls, ExpectedSource as lt, EIFEL_STANDARD_RATIO as m, schedule1Values as ma, RSI_COLUMN_GAP as mi, computeSchedule21 as mn, At1ReserveRowResult as mo, ProvinceCode as mr, computeLossContinuity as ms, formatConformanceReport as mt, MP_GROSS_REVENUE_THRESHOLD as n, Schedule1FilingInput as na, Schedule12Result as ni, computeItcRecapture as nn, At1CategoryResult as no, EIFEL_EFFECTIVE_FROM as nr, CcaRateTable as ns, QC_TAX_RATE_BOOK as nt, MpDeductionResult as o, at1LineItemId as oa, albertaCcaScheduleAdjustments as oi, AssociatedMemberInput as on, computeAlbertaSchedule18 as oo, EifelThresholds as or, At4970JurisdictionAmount as os, CertificationFixture as ot, EIFEL_FIRST_YEAR_START as p, schedule18Values as pa, reconcileAlbertaNetIncome as pi, Schedule21Result as pn, At1ReserveKind as po, PROVINCE_RATE_BOOK as pr, LossContinuityResult as ps, foldT2Lines as pt, QuebecReturnResult as q, AlbertaGiftCarryforward as qa, AllocationFactorInput as qi, assertSchedule1Fileable as qn, LeaseholdLayerResult as qo, AlbertaSchedule14Result as qr, TaxableCapitalResult as qt, MP_RATES_2024 as r, Schedule20FilingInput as ra, albertaAbilDifference as ri, ZetmInput as rn, At1CategoryTotals as ro, EifelExemption as rr, isDecliningBalanceClass as rs, QuebecTaxRates as rt, computeMpDeduction as s, schedule10Values as sa, albertaCurrentYearLoss as si, AssociatedMemberResult as sn, AT1_RESERVE_KINDS as so, assessEifel as sr, At4970ProjectRow as ss, ConformanceResult as st, MP_EXCLUDED_ACTIVITIES as t, Schedule12FilingInput as ta, Schedule12Line as ti, ItcRecaptureResult as tn, At1AbilResult as to, terminalLossDeduction as tr, CCA_RATE_BOOK as ts, QC_TAX_2024 as tt, PartVI1DeductionResult as u, schedule13Values as ua, albertaReserveDifference as ui, allocateEvenly as un, AlbertaSchedule17Input as uo, blendProvinceRateTable as ur, At4970Totals as us, LineCheck as ut, EifelLimitationResult as v, schedule2Values as va, RsiHeaderInput as vi, CapitalDisposition as vn, AlbertaSchedule16Result as vo, resolveProvinceRates as vr, LossCarrybackYear as vs, FederalT2Result as vt, computeAdjustedTaxableIncome as w, IegAllocationResult as wa, formatRsiText as wi, computeSchedule5 as wn, AlbertaSchedule13Result as wo, dividendsDeductibleS112 as wr, AlbertaSbdInput as ws, SCHEDULE_88_MAX_URLS as wt, AdjustedTaxableIncomeInput as x, IegAgreementMember as xa, RsiScheduleInput as xi, computeSchedule6 as xn, AlbertaCcaOverride as xo, TaxableIncomeResult as xr, AlbertaTaxResult as xs, Schedule101Input as xt, computeEifelLimitation as y, schedule4970Values as ya, RsiLineItem as yi, DispositionResult as yn, assistanceFrom as yo, TaxableIncomeInput as yr, computeLossCarryback as ys, computeFederalT2 as yt, Co17Address as z, IegEligibleExpendituresResult as za, at1TaxPayableDeductions as zi, Schedule2Result as zn, Class13Result as zo, CORP_TAX_2024 as zr, hasExactRateYear as zs, GripResult as zt };
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 };