@classytic/ca-tax 0.0.2 → 0.0.12
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/CHANGELOG.md +331 -0
- package/dist/forms/index.d.mts +2 -2
- package/dist/forms/index.mjs +2 -2
- package/dist/forms.mjs +522 -72
- package/dist/index.d.mts +6 -1
- package/dist/index.mjs +3 -3
- package/dist/index3.d.mts +3569 -244
- package/dist/index4.d.mts +3 -3
- package/dist/t2/index.d.mts +3 -3
- package/dist/t2/index.mjs +3 -3
- package/dist/t2.mjs +3041 -187
- package/package.json +8 -6
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
|
-
*
|
|
318
|
-
*
|
|
319
|
-
*
|
|
320
|
-
*
|
|
321
|
-
*
|
|
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,11 +361,132 @@ 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
|
}
|
|
348
372
|
declare function computeLossContinuity(input: LossContinuityInput): LossContinuityResult;
|
|
349
373
|
//#endregion
|
|
374
|
+
//#region src/t2/at1/schedules/at4970-ieg-projects.d.ts
|
|
375
|
+
/**
|
|
376
|
+
* AT4970 — Listing of Innovation Employment Grant Projects Carried Out in
|
|
377
|
+
* Alberta. A separate attachment, not part of Schedule 29 itself (AuraTax's
|
|
378
|
+
* own schedule-manager lists it as attachment `4970`, distinct from `029`) —
|
|
379
|
+
* required whenever the IEG is claimed, and never built or even known about
|
|
380
|
+
* before this: the first pass at Schedule 29 skipped page 1 of the live
|
|
381
|
+
* form entirely, so nothing referenced this attachment at all. See
|
|
382
|
+
* `research/knowledge-base/at1-schedule-29-ieg-mechanics.md`.
|
|
383
|
+
*
|
|
384
|
+
* ── What it is ───────────────────────────────────────────────────────────
|
|
385
|
+
*
|
|
386
|
+
* One row per Alberta SR&ED project:
|
|
387
|
+
*
|
|
388
|
+
* 101 project title (same as federal T661 Part 2 line 200)
|
|
389
|
+
* 103 project code (federal T661 line 206)
|
|
390
|
+
* 105 portion of federal T661 line 559/557 incurred in Alberta for this
|
|
391
|
+
* project, BEFORE IEG, for the taxation year
|
|
392
|
+
* 107 portion of federal T661 line 559/557 NOT carried out in Alberta,
|
|
393
|
+
* for this project
|
|
394
|
+
* 109 total salaries and wages paid re SR&ED carried out in Alberta for
|
|
395
|
+
* this project (excluding bonuses, remuneration based on profits,
|
|
396
|
+
* and taxable benefits)
|
|
397
|
+
* 111 total prescribed proxy amount included in the Alberta portion of
|
|
398
|
+
* federal line 559/557, for this project (if claimed federally)
|
|
399
|
+
* 113 Alberta proxy amount for this project (if 111 applies)
|
|
400
|
+
*
|
|
401
|
+
* plus a TOTAL row, and a jurisdiction breakdown (135–161, one line per
|
|
402
|
+
* province/territory, "Other" at 161) with a grand total at 170.
|
|
403
|
+
*
|
|
404
|
+
* ── How it feeds Schedule 29 page 1 ─────────────────────────────────────
|
|
405
|
+
*
|
|
406
|
+
* The TOTAL row's 105/111/113 are what a preparer transcribes onto Schedule
|
|
407
|
+
* 29 page 1's own 005/007/009 (verified exactly against TRA's Example 3:
|
|
408
|
+
* AT4970 total 105=400,000 → Sch29 005=400,000; 111=55,000 → Sch29 007=
|
|
409
|
+
* 55,000; 113=55,000 → Sch29 009=55,000). `totals` below is that transcribed
|
|
410
|
+
* row; feed `totals.albertaPortion` / `totals.federalProxyAmount` /
|
|
411
|
+
* `totals.albertaProxyAmount` straight into
|
|
412
|
+
* `schedule29-eligible-expenditures.ts`'s `IegEligibleExpendituresInput` as
|
|
413
|
+
* `albertaPortion` / `federalProxyAmount` / `albertaProxyAmount`.
|
|
414
|
+
*
|
|
415
|
+
* ── The jurisdiction table is a DIFFERENT figure from the project rows ──────
|
|
416
|
+
*
|
|
417
|
+
* TRA's own Example 3 shows the jurisdiction table's Alberta line (368,750)
|
|
418
|
+
* NOT equal to the project rows' own Alberta total (400,000) — the
|
|
419
|
+
* difference (31,250) is exactly that example's own computed IEG. The
|
|
420
|
+
* jurisdiction table appears to report the FINAL, post-513-netting federal
|
|
421
|
+
* figures (reconciling against the corporation's actually-filed T661), not
|
|
422
|
+
* the pre-deduction figures the project rows and Schedule 29 page 1 use.
|
|
423
|
+
* Reproducing that netting here would require the same Step 1 → Step 2
|
|
424
|
+
* circularity Schedule 29 page 1 already resolves by using pre-deduction
|
|
425
|
+
* figures throughout (see `schedule29-eligible-expenditures.ts`) — and none
|
|
426
|
+
* of TRA's Fall 2026 test cases give a jurisdiction breakdown to reconcile
|
|
427
|
+
* against. So the jurisdiction table here is a plain, direct-entry total:
|
|
428
|
+
* informational, filed as given, and NOT used to derive `totals` or
|
|
429
|
+
* validated against it. If a real filing needs that reconciliation, it is a
|
|
430
|
+
* gap to close with a real fact pattern in hand, not guessed at here.
|
|
431
|
+
*
|
|
432
|
+
* Whole dollars, pure.
|
|
433
|
+
*/
|
|
434
|
+
interface At4970ProjectRow {
|
|
435
|
+
/** Line 101 — project title (same as federal T661 Part 2 line 200). */
|
|
436
|
+
title: string;
|
|
437
|
+
/** Line 103 — project code (federal T661 line 206). */
|
|
438
|
+
projectCode?: string;
|
|
439
|
+
/** Line 105 — portion of federal T661 559/557 incurred in Alberta, this project, before IEG. */
|
|
440
|
+
albertaPortion: number;
|
|
441
|
+
/** Line 107 — portion of federal T661 559/557 NOT carried out in Alberta, this project. */
|
|
442
|
+
otherPortion: number;
|
|
443
|
+
/** Line 109 — salaries and wages re SR&ED carried out in Alberta, this project. */
|
|
444
|
+
salariesAndWages?: number;
|
|
445
|
+
/** Line 111 — federal prescribed proxy amount included in the Alberta portion, this project. */
|
|
446
|
+
federalProxyAmount?: number;
|
|
447
|
+
/** Line 113 — Alberta proxy amount for this project. */
|
|
448
|
+
albertaProxyAmount?: number;
|
|
449
|
+
}
|
|
450
|
+
/** One row of the jurisdiction-breakdown table (135–161). Direct entry — see the module note above. */
|
|
451
|
+
interface At4970JurisdictionAmount {
|
|
452
|
+
/** One of the 13 named provinces/territories, or `'other'`. */
|
|
453
|
+
jurisdiction: string;
|
|
454
|
+
amountIncurred: number;
|
|
455
|
+
}
|
|
456
|
+
interface At4970Input {
|
|
457
|
+
/** One row per Alberta SR&ED project. An empty list is a corporation with no Alberta SR&ED to list. */
|
|
458
|
+
projects: readonly At4970ProjectRow[];
|
|
459
|
+
/** The jurisdiction-breakdown table. See the module note on why this is entered directly, not derived. */
|
|
460
|
+
jurisdictions?: readonly At4970JurisdictionAmount[];
|
|
461
|
+
}
|
|
462
|
+
interface At4970ProjectRowResult extends At4970ProjectRow {
|
|
463
|
+
otherPortion: number;
|
|
464
|
+
salariesAndWages: number;
|
|
465
|
+
federalProxyAmount: number;
|
|
466
|
+
albertaProxyAmount: number;
|
|
467
|
+
}
|
|
468
|
+
interface At4970Totals {
|
|
469
|
+
/** Line 105 total — feeds Schedule 29 page 1 line 005. */
|
|
470
|
+
albertaPortion: number;
|
|
471
|
+
/** Line 107 total. */
|
|
472
|
+
otherPortion: number;
|
|
473
|
+
/** Line 109 total. */
|
|
474
|
+
salariesAndWages: number;
|
|
475
|
+
/** Line 111 total — feeds Schedule 29 page 1 line 007. */
|
|
476
|
+
federalProxyAmount: number;
|
|
477
|
+
/** Line 113 total — feeds Schedule 29 page 1 line 009. */
|
|
478
|
+
albertaProxyAmount: number;
|
|
479
|
+
}
|
|
480
|
+
interface At4970Result {
|
|
481
|
+
projects: At4970ProjectRowResult[];
|
|
482
|
+
/** The TOTAL row (101-113 columns) — what transcribes onto Schedule 29 page 1. */
|
|
483
|
+
totals: At4970Totals;
|
|
484
|
+
jurisdictions: At4970JurisdictionAmount[];
|
|
485
|
+
/** Line 170 — Σ every jurisdiction amount. Informational; see the module note. */
|
|
486
|
+
jurisdictionTotal: number;
|
|
487
|
+
}
|
|
488
|
+
declare function computeAt4970(input: At4970Input): At4970Result;
|
|
489
|
+
//#endregion
|
|
350
490
|
//#region src/t2/rates/cca-rates.d.ts
|
|
351
491
|
type CcaRateTable = Readonly<Record<string, number>>;
|
|
352
492
|
declare const CCA_DECLINING_BALANCE_RATES_2024: CcaRateTable;
|
|
@@ -657,7 +797,7 @@ interface CcaClassResult {
|
|
|
657
797
|
}
|
|
658
798
|
declare class UnsupportedCcaClassError extends Error {
|
|
659
799
|
readonly ccaClass: string;
|
|
660
|
-
constructor(ccaClass: string);
|
|
800
|
+
constructor(ccaClass: string, reason?: string);
|
|
661
801
|
}
|
|
662
802
|
declare function computeCcaClass(input: CcaClassInput, rates?: CcaRateTable,
|
|
663
803
|
/**
|
|
@@ -693,7 +833,7 @@ type Schedule8Entry = {
|
|
|
693
833
|
method: 'limited-life';
|
|
694
834
|
class: Class14Input;
|
|
695
835
|
};
|
|
696
|
-
interface Schedule8Result {
|
|
836
|
+
interface Schedule8Result$1 {
|
|
697
837
|
decliningBalance: CcaClassResult[];
|
|
698
838
|
leasehold: Class13Result[];
|
|
699
839
|
limitedLife: Class14Result[];
|
|
@@ -719,9 +859,9 @@ interface Schedule8Result {
|
|
|
719
859
|
* proceeds reach its capital cost, and the class caps at its own undepreciated
|
|
720
860
|
* capital cost — so neither produces a recapture inclusion here.
|
|
721
861
|
*/
|
|
722
|
-
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. */
|
|
723
863
|
|
|
724
|
-
prorationFactor?: number): Schedule8Result;
|
|
864
|
+
prorationFactor?: number): Schedule8Result$1;
|
|
725
865
|
//#endregion
|
|
726
866
|
//#region src/t2/at1/schedules/schedule13-cca.d.ts
|
|
727
867
|
/**
|
|
@@ -753,11 +893,40 @@ interface AlbertaCcaOverride {
|
|
|
753
893
|
/** The class holds no assets at year-end (drives 013017 terminal loss). */
|
|
754
894
|
classEmptied?: boolean;
|
|
755
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
|
+
}
|
|
756
921
|
interface AlbertaSchedule13Input {
|
|
757
922
|
/** The federal Schedule 8 rows. Alberta figures default to these. */
|
|
758
923
|
federalClasses: readonly FederalCcaClass[];
|
|
759
924
|
/** Alberta overrides, keyed by class. Classes with no override match federal. */
|
|
760
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;
|
|
761
930
|
/**
|
|
762
931
|
* 000060 — is the corporation reporting different Alberta taxable income?
|
|
763
932
|
* Defaults to false.
|
|
@@ -1417,6 +1586,288 @@ interface DonationMaximumResult {
|
|
|
1417
1586
|
}
|
|
1418
1587
|
declare function computeDonationMaximum(input: DonationMaximumInput): DonationMaximumResult;
|
|
1419
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
|
|
1761
|
+
//#region src/t2/at1/schedules/schedule29-eligible-expenditures.d.ts
|
|
1762
|
+
/**
|
|
1763
|
+
* AT1 Schedule 29 page 1 — Eligible Expenditures for IEG Purposes (lines
|
|
1764
|
+
* 001–040). AT29's own worksheet for deriving the "eligible expenditures"
|
|
1765
|
+
* figure (line 031) that everything else on this schedule — the base amount,
|
|
1766
|
+
* the increment, the Agreement's per-member 245/250/260 — is built from.
|
|
1767
|
+
*
|
|
1768
|
+
* ── Why this module exists separately from `schedule29-ieg.ts` ─────────────
|
|
1769
|
+
*
|
|
1770
|
+
* `computeIeg` took `eligibleExpenditures` as a bare number input. It is not
|
|
1771
|
+
* one — it is DERIVED, by a six-line formula off federal T661, and a prior
|
|
1772
|
+
* version of this package never modelled that derivation at all: it skipped
|
|
1773
|
+
* page 1 of the live form entirely (only pages 2 and 3 were ever rendered),
|
|
1774
|
+
* so every caller had to compute line 031 by hand outside the engine, with
|
|
1775
|
+
* nothing here to check the arithmetic. Confirmed missing by rendering the
|
|
1776
|
+
* live, TRA-certified form (`research/sources/tra-forms/pdf/AT1SCH29-*.pdf`,
|
|
1777
|
+
* page 1) and independently re-verified against two of TRA's own published
|
|
1778
|
+
* worked examples (`research/sources/tra-guides/tra-guide-claiming-the-
|
|
1779
|
+
* innovation-employment-grant.pdf`, Examples 3 and 4) — see
|
|
1780
|
+
* `research/knowledge-base/at1-schedule-29-ieg-mechanics.md`.
|
|
1781
|
+
*
|
|
1782
|
+
* ── The formula ──────────────────────────────────────────────────────────
|
|
1783
|
+
*
|
|
1784
|
+
* 003 federal amount of qualified/current SR&ED expenditures, T661 line
|
|
1785
|
+
* 559 or 557 (see below)
|
|
1786
|
+
* 005 portion of 003 carried out in Alberta — normally the sum of every
|
|
1787
|
+
* AT4970 project row's own 105 column (`at4970-ieg-projects.ts`)
|
|
1788
|
+
* 007 deduct: federal prescribed proxy amount included in the Alberta
|
|
1789
|
+
* portion of 003 — normally Σ AT4970's 111 column
|
|
1790
|
+
* 009 add: Alberta proxy amount — normally Σ AT4970's 113 column
|
|
1791
|
+
* 011 add: IEG that reduced the federal expenditure IN THE TAXATION YEAR
|
|
1792
|
+
* — zero for a first-time current-year claim reported on the
|
|
1793
|
+
* pre-deduction federal figures (see the Step 1 / Step 2 note below)
|
|
1794
|
+
* 025 add: the Alberta portion of a repayment of government assistance
|
|
1795
|
+
* (other than an IEG) OR A CONTRACT PAYMENT, relating to amounts in
|
|
1796
|
+
* 005 from the current year or ANY PRECEDING taxation year — two
|
|
1797
|
+
* independent triggers, not one
|
|
1798
|
+
* 031 TOTAL = 005 − 007 + 009 + 011 + 025
|
|
1799
|
+
*
|
|
1800
|
+
* 031 is what `computeIeg` calls `eligibleExpenditures` and what an
|
|
1801
|
+
* Agreement member's own `currentYearExpenditures` (line 245) is — the same
|
|
1802
|
+
* formula, computed once per corporation per year, whether or not that
|
|
1803
|
+
* corporation is associated.
|
|
1804
|
+
*
|
|
1805
|
+
* ── The federal T661 line 557 vs 559 split (Fall 2026 re-certification) ────
|
|
1806
|
+
*
|
|
1807
|
+
* TRA's own certification correspondence and the live form agree: for a
|
|
1808
|
+
* taxation year ending ON OR BEFORE 2024-12-15, line 003 comes from federal
|
|
1809
|
+
* T661 line 559 (qualified SR&ED expenditures); for a taxation year ending
|
|
1810
|
+
* ON OR AFTER 2024-12-16, it comes from T661 line 557 (CURRENT SR&ED
|
|
1811
|
+
* expenditures) instead — a different federal figure, not a renumbering.
|
|
1812
|
+
* `iegT661SourceLine` below is purely informational (which federal line a
|
|
1813
|
+
* preparer should be told to copy from); it does not change the Alberta
|
|
1814
|
+
* arithmetic itself, which is identical either way.
|
|
1815
|
+
*
|
|
1816
|
+
* ── The "Step 1 / Step 2" columns in TRA's Guide are not two form fields ────
|
|
1817
|
+
*
|
|
1818
|
+
* The Guide illustrates every page-1 line twice — once using the federal
|
|
1819
|
+
* figures BEFORE the current year's own IEG is netted against them as
|
|
1820
|
+
* government assistance (T661 line 513), once AFTER, with line 011 adding
|
|
1821
|
+
* the IEG back. Both worked examples land on the IDENTICAL line 031 either
|
|
1822
|
+
* way (011 exists specifically to undo the 513 netting for ALBERTA's own
|
|
1823
|
+
* base, so it cannot shrink itself). Only ONE set of figures is filed. Every
|
|
1824
|
+
* TRA test case gives the pre-deduction ("Step 1") federal figures — use
|
|
1825
|
+
* those directly, with 011 = 0 for a first-time current-year claim. Do not
|
|
1826
|
+
* build a literal two-pass loop; there is nothing for it to converge on that
|
|
1827
|
+
* isn't already true of the Step 1 figures alone.
|
|
1828
|
+
*
|
|
1829
|
+
* Whole dollars, pure.
|
|
1830
|
+
*/
|
|
1831
|
+
/** Which federal T661 line line 003 sources from, given a taxation year end. */
|
|
1832
|
+
declare function iegT661SourceLine(taxationYearEnd: string): '557' | '559';
|
|
1833
|
+
interface IegEligibleExpendituresInput {
|
|
1834
|
+
/** Line 003 — federal qualified/current SR&ED expenditures (T661 line 559 or 557). */
|
|
1835
|
+
federalAmount: number;
|
|
1836
|
+
/** Line 005 — the portion of 003 carried out in Alberta. */
|
|
1837
|
+
albertaPortion: number;
|
|
1838
|
+
/** Line 007 — federal prescribed proxy amount included in the Alberta portion of 003. */
|
|
1839
|
+
federalProxyAmount?: number;
|
|
1840
|
+
/** Line 009 — Alberta proxy amount. */
|
|
1841
|
+
albertaProxyAmount?: number;
|
|
1842
|
+
/**
|
|
1843
|
+
* Line 011 — IEG that reduced the federal expenditure at 003 IN THE
|
|
1844
|
+
* TAXATION YEAR. Zero for a first-time current-year claim reported on the
|
|
1845
|
+
* pre-deduction federal figures (see the Step 1 / Step 2 note above) —
|
|
1846
|
+
* only non-zero when the federal figure supplied at 003 was ALREADY net
|
|
1847
|
+
* of this year's own IEG.
|
|
1848
|
+
*/
|
|
1849
|
+
iegReducingFederalExpenditure?: number;
|
|
1850
|
+
/**
|
|
1851
|
+
* Line 025 — the Alberta portion of a repayment of government assistance
|
|
1852
|
+
* (other than an IEG) OR a contract payment, relating to amounts in 005
|
|
1853
|
+
* from the current year or any preceding taxation year. Two independent
|
|
1854
|
+
* triggers, both rolled into one line by the form itself.
|
|
1855
|
+
*/
|
|
1856
|
+
repaymentOrContractPayment?: number;
|
|
1857
|
+
}
|
|
1858
|
+
interface IegEligibleExpendituresResult {
|
|
1859
|
+
federalAmount: number;
|
|
1860
|
+
albertaPortion: number;
|
|
1861
|
+
federalProxyAmount: number;
|
|
1862
|
+
albertaProxyAmount: number;
|
|
1863
|
+
iegReducingFederalExpenditure: number;
|
|
1864
|
+
repaymentOrContractPayment: number;
|
|
1865
|
+
/** Line 031 — TOTAL: Eligible Expenditures for Alberta Purposes. */
|
|
1866
|
+
totalEligibleExpenditures: number;
|
|
1867
|
+
}
|
|
1868
|
+
/** Line 031 = 005 − 007 + 009 + 011 + 025. Every term but 005 defaults to nil. */
|
|
1869
|
+
declare function computeIegEligibleExpenditures(input: IegEligibleExpendituresInput): IegEligibleExpendituresResult;
|
|
1870
|
+
//#endregion
|
|
1420
1871
|
//#region src/t2/at1/schedules/schedule29-ieg.d.ts
|
|
1421
1872
|
/**
|
|
1422
1873
|
* AT1 Schedule 29 — Alberta Innovation Employment Grant (IEG). AT1 line 129.
|
|
@@ -1651,17 +2102,31 @@ declare function allocateIegEvenly(groupExpenditureLimit: number, names: readonl
|
|
|
1651
2102
|
*
|
|
1652
2103
|
* The form states it as "the least of: line 240, line 267, and the lesser of
|
|
1653
2104
|
* [(4,000,000 × days in tax year/365 or 366) or line 031] less base amount" —
|
|
1654
|
-
* three independent caps, taken literally:
|
|
2105
|
+
* three independent caps, taken literally, THEN floored at nil:
|
|
1655
2106
|
*
|
|
1656
2107
|
* (240) this member's own agreed share of the expenditure limit
|
|
1657
2108
|
* (267) this member's own current-year expenditures less its own base
|
|
1658
|
-
* (average of its prior two years) — floored
|
|
1659
|
-
*
|
|
2109
|
+
* (average of its prior two years) — NOT floored itself; the live
|
|
2110
|
+
* form prints a negative 267 as-is (e.g. "(50,000)", confirmed
|
|
2111
|
+
* against TRA's own Example 4). Only the outer 268 is floored, per
|
|
2112
|
+
* the form's own note ("if a calculated amount is negative, that
|
|
2113
|
+
* particular corporation will have a nil allowed amount on 268").
|
|
2114
|
+
* An earlier version of this module floored 267 itself — wrong: a
|
|
2115
|
+
* floored 267 and a floored 268 give the same answer only when 267
|
|
2116
|
+
* is the binding constraint, which is not guaranteed.
|
|
1660
2117
|
* (C) this member's own day-prorated $4M share (up to 366 days — NOT
|
|
1661
2118
|
* capped at 365 the way Schedule 13's proration is; this form's own
|
|
1662
2119
|
* note says so explicitly), capped by this member's own current-year
|
|
1663
2120
|
* expenditures, less this member's own base
|
|
1664
2121
|
*
|
|
2122
|
+
* A FOURTH condition gates all of the above: a member with no permanent
|
|
2123
|
+
* establishment in Alberta gets 268 = 0 outright, regardless of what the
|
|
2124
|
+
* three-way least-of would otherwise give — confirmed against TRA's own
|
|
2125
|
+
* Example 4, where a member with a POSITIVE 267 (60,000) still receives
|
|
2126
|
+
* 268 = 0 because it lacks an Alberta PE. See `IegAgreementMember.
|
|
2127
|
+
* hasAlbertaPermanentEstablishment`. That member's raw 245/250/260/265
|
|
2128
|
+
* still flow into the group totals below — only its OWN 268 is zeroed.
|
|
2129
|
+
*
|
|
1665
2130
|
* ── The group Allowed Amount (line 310) ──────────────────────────────────────
|
|
1666
2131
|
*
|
|
1667
2132
|
* X (275) = Σ every member's current-year eligible expenditures (245)
|
|
@@ -1700,6 +2165,24 @@ interface IegAgreementMember {
|
|
|
1700
2165
|
* omitted, matching every other day-proration default in this package.
|
|
1701
2166
|
*/
|
|
1702
2167
|
daysInTaxYear?: number;
|
|
2168
|
+
/**
|
|
2169
|
+
* Whether this member has a permanent establishment in Alberta. A member
|
|
2170
|
+
* WITHOUT one is categorically ineligible for the IEG — line 268 is 0
|
|
2171
|
+
* regardless of what the formula alone would give, even when 267 is
|
|
2172
|
+
* positive — but its raw 245/250/260/265 STILL count toward the group
|
|
2173
|
+
* totals (270/275/280/290/300/310). Confirmed against TRA's own published
|
|
2174
|
+
* Example 4: a member with 267 = 60,000 gets 268 = 0 solely because it has
|
|
2175
|
+
* no Alberta PE ("Allocated amount ... is 0 as corporation does not have a
|
|
2176
|
+
* permanent establishment in Alberta and is therefore not eligible for the
|
|
2177
|
+
* IEG. However, ... its eligible expenditures are still included in the
|
|
2178
|
+
* calculation of line 310."). The claimant (row 1) defaults to `true` — it
|
|
2179
|
+
* is filing an Alberta return claiming an Alberta grant, so it has Alberta
|
|
2180
|
+
* nexus by construction. Every OTHER member defaults to `false` (fail
|
|
2181
|
+
* closed: the worst a missing answer can do is UNDERSTATE the grant, not
|
|
2182
|
+
* overstate it) and raises an issue so the omission is visible rather than
|
|
2183
|
+
* silently assumed either way.
|
|
2184
|
+
*/
|
|
2185
|
+
hasAlbertaPermanentEstablishment?: boolean;
|
|
1703
2186
|
}
|
|
1704
2187
|
interface IegAgreementMemberResult {
|
|
1705
2188
|
name: string;
|
|
@@ -1711,9 +2194,18 @@ interface IegAgreementMemberResult {
|
|
|
1711
2194
|
priorYear1: number;
|
|
1712
2195
|
priorYear2: number;
|
|
1713
2196
|
taxableCapitalPriorYear: number;
|
|
1714
|
-
|
|
2197
|
+
hasAlbertaPermanentEstablishment: boolean;
|
|
2198
|
+
/**
|
|
2199
|
+
* 267 — line 245 − [(line 250 + line 260) / 2]. NOT floored — the live
|
|
2200
|
+
* form prints this negative (e.g. "(50,000)") when spending fell below
|
|
2201
|
+
* the average of the prior two years. Only 268 is floored at nil.
|
|
2202
|
+
*/
|
|
1715
2203
|
individualMaximumAllowedAmount: number;
|
|
1716
|
-
/**
|
|
2204
|
+
/**
|
|
2205
|
+
* 268 — least of 240, 267, and the day-prorated-and-capped-less-base
|
|
2206
|
+
* figure, floored at nil, AND forced to nil for a member with no Alberta
|
|
2207
|
+
* permanent establishment regardless of what that least-of would give.
|
|
2208
|
+
*/
|
|
1717
2209
|
allocatedAllowedAmount: number;
|
|
1718
2210
|
}
|
|
1719
2211
|
interface IegAgreementInput {
|
|
@@ -1817,6 +2309,15 @@ declare function schedule18Values(result: AlbertaSchedule18Result): At1ScheduleD
|
|
|
1817
2309
|
* Field ids read off the live, TRA-certified form
|
|
1818
2310
|
* (`research/sources/tra-forms/pdf/AT1SCH29-*.pdf`, Rev. 2026-06):
|
|
1819
2311
|
*
|
|
2312
|
+
* Page 1 — Eligible Expenditures, filed only when the caller supplies
|
|
2313
|
+
* `eligible` (from `computeIegEligibleExpenditures` in
|
|
2314
|
+
* `schedule29-eligible-expenditures.ts`):
|
|
2315
|
+
* 003 federal amount of qualified/current SR&ED expenditures (T661 line
|
|
2316
|
+
* 559 or 557 — see `iegT661SourceLine`)
|
|
2317
|
+
* 005/007/009/011/025 the five adjustments; 031 = 005 − 007 + 009 + 011 + 025
|
|
2318
|
+
* 040 primary field of science or technology (1–4), when the caller
|
|
2319
|
+
* supplies `primaryFieldCode`
|
|
2320
|
+
*
|
|
1820
2321
|
* Page 1/2 — the grant itself:
|
|
1821
2322
|
* 110 8% of the capped expenditures
|
|
1822
2323
|
* 112 12% of the increment above base — the non-associated path. Filed
|
|
@@ -1859,7 +2360,24 @@ declare function schedule18Values(result: AlbertaSchedule18Result): At1ScheduleD
|
|
|
1859
2360
|
* band. See `schedule29-ieg.ts` for why 128 exists and the one unresolved
|
|
1860
2361
|
* discrepancy in how 130 is meant to be computed.
|
|
1861
2362
|
*/
|
|
1862
|
-
declare function schedule29Values(result: IegResult, agreement?: IegAgreementResult): At1ScheduleData;
|
|
2363
|
+
declare function schedule29Values(result: IegResult, agreement?: IegAgreementResult, eligible?: IegEligibleExpendituresResult, primaryFieldCode?: 1 | 2 | 3 | 4): At1ScheduleData;
|
|
2364
|
+
/**
|
|
2365
|
+
* A separate attachment from Schedule 29 itself, one occurrence per Alberta
|
|
2366
|
+
* SR&ED project (101/103/105/107/109/111/113), a TOTAL row (repeats the same
|
|
2367
|
+
* field ids at a fixed trailing occurrence — see below), and the jurisdiction
|
|
2368
|
+
* table (135–170, occurrence 1, no per-jurisdiction row structure since each
|
|
2369
|
+
* jurisdiction has its own field id already).
|
|
2370
|
+
*
|
|
2371
|
+
* ⚠ The schedule id (`'4970'`) and line-item id scheme used here are a
|
|
2372
|
+
* PLACEHOLDER — TRA's own published Guide confirms the field NUMBERS
|
|
2373
|
+
* (verified twice, independently) but not the NetFile wire-format encoding
|
|
2374
|
+
* for this attachment. See `at4970-ieg-projects.ts` and `forms/at4970.ts`
|
|
2375
|
+
* for the same caveat. Verify before relying on this for live filing.
|
|
2376
|
+
*
|
|
2377
|
+
* The TOTAL row is filed at occurrence `projects.length + 1` — one past the
|
|
2378
|
+
* last project row — so a real project can never collide with it.
|
|
2379
|
+
*/
|
|
2380
|
+
declare function schedule4970Values(result: At4970Result): At1ScheduleData;
|
|
1863
2381
|
/**
|
|
1864
2382
|
* Schedule 12 takes **both** figures side by side, not a difference.
|
|
1865
2383
|
*
|
|
@@ -1889,242 +2407,2969 @@ interface Schedule12FilingInput {
|
|
|
1889
2407
|
alberta: number;
|
|
1890
2408
|
federal: number;
|
|
1891
2409
|
};
|
|
1892
|
-
/** 012008 / 012009 — terminal loss. */
|
|
1893
|
-
terminalLoss?: {
|
|
1894
|
-
alberta: number;
|
|
1895
|
-
federal: number;
|
|
2410
|
+
/** 012008 / 012009 — terminal loss. */
|
|
2411
|
+
terminalLoss?: {
|
|
2412
|
+
alberta: number;
|
|
2413
|
+
federal: number;
|
|
2414
|
+
};
|
|
2415
|
+
/** 012036 / 012037 — tax reserves deducted in the prior year. */
|
|
2416
|
+
reservesDeductedPriorYear?: {
|
|
2417
|
+
alberta: number;
|
|
2418
|
+
federal: number;
|
|
2419
|
+
};
|
|
2420
|
+
/** 012038 / 012039 — tax reserves claimed in the current year. */
|
|
2421
|
+
reservesClaimedCurrentYear?: {
|
|
2422
|
+
alberta: number;
|
|
2423
|
+
federal: number;
|
|
2424
|
+
};
|
|
2425
|
+
/**
|
|
2426
|
+
* Area B — losses of preceding taxation years, deducted in arriving at Alberta
|
|
2427
|
+
* taxable income. Same federal/Alberta pairing and the same
|
|
2428
|
+
* omit-when-they-agree rule.
|
|
2429
|
+
*
|
|
2430
|
+
* Build these with `schedule12LossDeductions` rather than by hand: the capital
|
|
2431
|
+
* one is NOT the raw amount applied.
|
|
2432
|
+
*/
|
|
2433
|
+
lossDeductions?: {
|
|
2434
|
+
/** 012064 / 012065 — non-capital losses of preceding years. */nonCapital?: {
|
|
2435
|
+
alberta: number;
|
|
2436
|
+
federal: number;
|
|
2437
|
+
}; /** 012066 / 012067 — net-capital losses of preceding years. */
|
|
2438
|
+
netCapital?: {
|
|
2439
|
+
alberta: number;
|
|
2440
|
+
federal: number;
|
|
2441
|
+
}; /** 012068 / 012069 — restricted farm losses of preceding years. */
|
|
2442
|
+
restrictedFarm?: {
|
|
2443
|
+
alberta: number;
|
|
2444
|
+
federal: number;
|
|
2445
|
+
}; /** 012070 / 012071 — farm losses of preceding years. */
|
|
2446
|
+
farm?: {
|
|
2447
|
+
alberta: number;
|
|
2448
|
+
federal: number;
|
|
2449
|
+
};
|
|
2450
|
+
};
|
|
2451
|
+
}
|
|
2452
|
+
/**
|
|
2453
|
+
* The Schedule 21 → Schedule 12 carry-forwards, as the form states them beside
|
|
2454
|
+
* each line:
|
|
2455
|
+
*
|
|
2456
|
+
* S21 041 non-capital applied against taxable income → S12 064
|
|
2457
|
+
* S21 061 capital applied against current year gain → S12 066 **× the
|
|
2458
|
+
* inclusion rate**
|
|
2459
|
+
* S21 099 restricted farm applied against farming income → S12 068
|
|
2460
|
+
* S21 079 farm applied against taxable income → S12 070
|
|
2461
|
+
*
|
|
2462
|
+
* **The capital one is the trap.** Schedule 21 tracks capital losses at their
|
|
2463
|
+
* FULL amount; Schedule 12 deducts the ALLOWABLE portion. The form says so —
|
|
2464
|
+
* *"Carry forward this amount X Inclusion Rate to Schedule 12, lines 066"* — and
|
|
2465
|
+
* carrying the raw figure across would over-deduct by a factor of two at the
|
|
2466
|
+
* current rate. Every other pool carries at face value.
|
|
2467
|
+
*
|
|
2468
|
+
* Restricted farm losses carry from the *applied against farming income* line,
|
|
2469
|
+
* not from an applied-against-taxable-income line, because that is the only
|
|
2470
|
+
* income they may offset.
|
|
2471
|
+
*/
|
|
2472
|
+
declare function schedule12LossDeductions(alberta: {
|
|
2473
|
+
nonCapital?: LossContinuityResult;
|
|
2474
|
+
capital?: LossContinuityResult;
|
|
2475
|
+
restrictedFarm?: LossContinuityResult;
|
|
2476
|
+
farm?: LossContinuityResult;
|
|
2477
|
+
}, federal?: {
|
|
2478
|
+
nonCapital?: LossContinuityResult;
|
|
2479
|
+
capital?: LossContinuityResult;
|
|
2480
|
+
restrictedFarm?: LossContinuityResult;
|
|
2481
|
+
farm?: LossContinuityResult;
|
|
2482
|
+
}, inclusionRate?: number): NonNullable<Schedule12FilingInput['lossDeductions']>;
|
|
2483
|
+
declare function schedule12Values(input: Schedule12FilingInput): At1ScheduleData;
|
|
2484
|
+
/**
|
|
2485
|
+
* FIVE independent loss continuities on one schedule, each with its own opening,
|
|
2486
|
+
* additions, deductions and closing. Verified line by line against the live form:
|
|
2487
|
+
*
|
|
2488
|
+
* pool opening current carry-back closing
|
|
2489
|
+
* non-capital 031 037 047 049
|
|
2490
|
+
* capital 051 057 067 069
|
|
2491
|
+
* farm 071 077 085 087
|
|
2492
|
+
* restricted farm 091 097 105 107
|
|
2493
|
+
* listed personal property 111 117 123 125
|
|
2494
|
+
*
|
|
2495
|
+
* The first part of the schedule computes the current-year non-capital loss and
|
|
2496
|
+
* puts it on **021**, starting from *"Net Income (loss) per AB Sched. 12 line
|
|
2497
|
+
* 054"* — the Schedule 12 → Schedule 21 chain, stated on the form itself.
|
|
2498
|
+
*
|
|
2499
|
+
* Several closing figures carry BACK to Schedule 12 as deductions, which the form
|
|
2500
|
+
* also states beside each line: the non-capital amount applied against taxable
|
|
2501
|
+
* income goes to Schedule 12 line **064**, the capital amount (× the inclusion
|
|
2502
|
+
* rate) to **066**, farm to **070**, restricted farm to **068**. Those
|
|
2503
|
+
* cross-schedule links are not modelled here — this builder emits Schedule 21's
|
|
2504
|
+
* own lines, and the caller supplies Schedule 12's figures directly.
|
|
2505
|
+
*
|
|
2506
|
+
* Every line the pool's own form entry (`AT1_SCHEDULE_21_POOLS`, the same
|
|
2507
|
+
* table the FORM definition uses — imported directly, not re-transcribed, so
|
|
2508
|
+
* the two cannot drift) names is emitted from the matching `LossContinuityResult`
|
|
2509
|
+
* field. A pool that has no line for a given concept (e.g. capital has no
|
|
2510
|
+
* "expired" row) simply has no key there, so nothing is emitted for it — not
|
|
2511
|
+
* a gap, the form genuinely has no box for it.
|
|
2512
|
+
*/
|
|
2513
|
+
interface Schedule21FilingInput {
|
|
2514
|
+
/** 021021 — the current year non-capital loss, from the first part. */
|
|
2515
|
+
currentYearNonCapitalLoss?: number;
|
|
2516
|
+
nonCapital?: LossContinuityResult;
|
|
2517
|
+
capital?: LossContinuityResult;
|
|
2518
|
+
farm?: LossContinuityResult;
|
|
2519
|
+
restrictedFarm?: LossContinuityResult;
|
|
2520
|
+
listedPersonalProperty?: LossContinuityResult;
|
|
2521
|
+
/**
|
|
2522
|
+
* The sixth section the live form has — one occurrence per partnership
|
|
2523
|
+
* (131-141), NOT a sixth jurisdiction pool. Merged into the SAME
|
|
2524
|
+
* `Schedule Number="021"` block as the five pools above, not a separate
|
|
2525
|
+
* schedule object — the payload has one `021` block, not two.
|
|
2526
|
+
*/
|
|
2527
|
+
limitedPartnershipLosses?: LimitedPartnershipLossesResult;
|
|
2528
|
+
/** The SEVENTH section — analysis of non-capital losses by year of origin (151-169), 21 occurrences. */
|
|
2529
|
+
nonCapitalByYearOfOrigin?: NonCapitalLossByYearOfOriginResult;
|
|
2530
|
+
/** The EIGHTH section — farm/restricted-farm/LPP by year of origin (181-187), 21 occurrences. */
|
|
2531
|
+
otherLossesByYearOfOrigin?: OtherLossByYearOfOriginResult;
|
|
2532
|
+
}
|
|
2533
|
+
declare function schedule21Values(input: Schedule21FilingInput): At1ScheduleData;
|
|
2534
|
+
/**
|
|
2535
|
+
* Field ids read off the live form:
|
|
2536
|
+
*
|
|
2537
|
+
* 001 associated with one or more CCPCs? Y/N
|
|
2538
|
+
* 003 income from active businesses (T2 line 400 / Sch 12 line 106)
|
|
2539
|
+
* 005 deduct: royalty tax deduction (Sch 5 line 021)
|
|
2540
|
+
* 007 balance = 003 − 005, floored at nil
|
|
2541
|
+
* 009 taxable income, adjusted per the Guide
|
|
2542
|
+
* 011 deduct: royalty tax deduction
|
|
2543
|
+
* 013 balance = 009 − 011, floored at nil
|
|
2544
|
+
*
|
|
2545
|
+
* The royalty deduction lines are oil-and-gas and left to the caller; they are
|
|
2546
|
+
* omitted rather than zeroed, since an absent conditional line is not the same as
|
|
2547
|
+
* a nil one.
|
|
2548
|
+
*/
|
|
2549
|
+
interface Schedule1FilingInput {
|
|
2550
|
+
result: AlbertaSbdResult;
|
|
2551
|
+
/** 001001 — associated with one or more CCPCs. */
|
|
2552
|
+
isAssociated?: boolean;
|
|
2553
|
+
/** 001003 — active business income. */
|
|
2554
|
+
activeBusinessIncome?: number;
|
|
2555
|
+
/** 001009 — Alberta taxable income, adjusted. */
|
|
2556
|
+
albertaTaxableIncome?: number;
|
|
2557
|
+
/** 001005 / 001011 — royalty tax deduction, where one applies. */
|
|
2558
|
+
royaltyTaxDeduction?: number;
|
|
2559
|
+
}
|
|
2560
|
+
declare function schedule1Values(input: Schedule1FilingInput): At1ScheduleData;
|
|
2561
|
+
/**
|
|
2562
|
+
* Area A, the general allocation formula (ITA Reg 402). Four inputs, all taken
|
|
2563
|
+
* from the federal Schedule 5:
|
|
2564
|
+
*
|
|
2565
|
+
* 002 salaries and wages paid in Alberta (A)
|
|
2566
|
+
* 004 total salaries and wages, all jurisdictions (B)
|
|
2567
|
+
* 006 gross revenue in Alberta (C)
|
|
2568
|
+
* 008 gross revenue, all jurisdictions (D)
|
|
2569
|
+
*
|
|
2570
|
+
* The factor itself — `(A/B + C/D) × ½` — is a computed column with no line of its
|
|
2571
|
+
* own on the schedule; it is reported on the jacket at 000065.
|
|
2572
|
+
*/
|
|
2573
|
+
interface Schedule2FilingInput {
|
|
2574
|
+
albertaSalaries?: number;
|
|
2575
|
+
totalSalaries?: number;
|
|
2576
|
+
albertaRevenue?: number;
|
|
2577
|
+
totalRevenue?: number;
|
|
2578
|
+
}
|
|
2579
|
+
declare function schedule2Values(input: Schedule2FilingInput): At1ScheduleData;
|
|
2580
|
+
/**
|
|
2581
|
+
* Two loss types are modelled, each with its own column on the form:
|
|
2582
|
+
*
|
|
2583
|
+
* non-capital 002 available · 004 / 006 / 008 per preceding year · 010 balance
|
|
2584
|
+
* capital 042 gross · 044 / 046 / 048 applied · —
|
|
2585
|
+
*
|
|
2586
|
+
* The preceding-year rows also carry the year-end DATES on 003 / 005 / 007, which
|
|
2587
|
+
* are the caller's to supply.
|
|
2588
|
+
*
|
|
2589
|
+
* **The capital column is applied at the inclusion rate**, not gross: the form's
|
|
2590
|
+
* two columns are headed "Gross Amount" and "Amount of Loss Applied (Inclusion
|
|
2591
|
+
* Rate X Capital Loss)". Same trap as the Schedule 21 → 12 carry-forward.
|
|
2592
|
+
*/
|
|
2593
|
+
interface Schedule10FilingInput {
|
|
2594
|
+
nonCapital?: LossCarrybackResult;
|
|
2595
|
+
capital?: LossCarrybackResult;
|
|
2596
|
+
/** Year-end dates for the three preceding years, `YYYYMMDD`. */
|
|
2597
|
+
precedingYearEnds?: readonly string[];
|
|
2598
|
+
/** Capital losses are applied at this rate. Defaults to ½. */
|
|
2599
|
+
inclusionRate?: number;
|
|
2600
|
+
}
|
|
2601
|
+
declare function schedule10Values(input: Schedule10FilingInput): At1ScheduleData;
|
|
2602
|
+
/**
|
|
2603
|
+
* TWO continuities and a ceiling, all on one schedule:
|
|
2604
|
+
*
|
|
2605
|
+
* Area A charitable donations 002 · 004 · 006 · 008 · 010 · 012 ·
|
|
2606
|
+
* 013 · 014 · 016 · 018
|
|
2607
|
+
* Area B maximum deduction calculation 030 … 048
|
|
2608
|
+
* gifts Canada/province, cultural, 062 · 064 · 066 · 068 · 070 · 072 ·
|
|
2609
|
+
* ecologically sensitive land 073 · 074 · 076 · 078
|
|
2610
|
+
*
|
|
2611
|
+
* The two continuities have the same shape, so one `Schedule20Result` describes
|
|
2612
|
+
* either — pass whichever the return has.
|
|
2613
|
+
*/
|
|
2614
|
+
interface Schedule20FilingInput {
|
|
2615
|
+
/** Area A — charitable donations. */
|
|
2616
|
+
charitable?: Schedule20Result;
|
|
2617
|
+
/** The gifts continuity (Canada/province, cultural property, ecological land). */
|
|
2618
|
+
gifts?: Schedule20Result;
|
|
2619
|
+
/** Area B — the maximum deduction calculation. */
|
|
2620
|
+
maximum?: DonationMaximumResult;
|
|
2621
|
+
}
|
|
2622
|
+
declare function schedule20Values(input: Schedule20FilingInput): At1ScheduleData;
|
|
2623
|
+
/**
|
|
2624
|
+
* The SR&ED expenditure POOL — a deduction against income, not the investment tax
|
|
2625
|
+
* credit and not the innovation grant.
|
|
2626
|
+
*
|
|
2627
|
+
* Line numbers and the subtotal formula verified against the live form, which
|
|
2628
|
+
* states it exactly as transcribed:
|
|
2629
|
+
*
|
|
2630
|
+
* 016 = 002 − (004 + 006 + 008) + 010 + 012 + 014 + 015
|
|
2631
|
+
*
|
|
2632
|
+
* and closes the year-over-year chain in as many words: line 022 is *"the carry
|
|
2633
|
+
* forward amount for next year, line 012"*.
|
|
2634
|
+
*/
|
|
2635
|
+
declare function schedule16Values(result: AlbertaSchedule16Result): At1ScheduleData;
|
|
2636
|
+
//#endregion
|
|
2637
|
+
//#region src/t2/at1/schedules/schedule2.d.ts
|
|
2638
|
+
/**
|
|
2639
|
+
* Alberta AT1 Schedule 2 — Alberta income allocation factor.
|
|
2640
|
+
*
|
|
2641
|
+
* The share of taxable income earned in Alberta (Reg. 402). For a corporation
|
|
2642
|
+
* with a permanent establishment in Alberta and nowhere else, the factor is 1.
|
|
2643
|
+
* For multi-jurisdiction corporations, Reg. 402(3): the equally-weighted average
|
|
2644
|
+
* of the gross-revenue ratio and the salaries-&-wages ratio — with the special
|
|
2645
|
+
* cases where one base is nil (Reg. 402(4)/(5)) handled, not naively averaged to
|
|
2646
|
+
* a wrong number.
|
|
2647
|
+
*
|
|
2648
|
+
* AT1 emits the factor to six decimals (Line-Item-ID 000065001), so the result is
|
|
2649
|
+
* rounded to 6 dp to match the return.
|
|
2650
|
+
*/
|
|
2651
|
+
interface AllocationFactorInput {
|
|
2652
|
+
albertaGrossRevenue: number;
|
|
2653
|
+
totalGrossRevenue: number;
|
|
2654
|
+
albertaSalaries: number;
|
|
2655
|
+
totalSalaries: number;
|
|
2656
|
+
}
|
|
2657
|
+
/** Single Alberta PE, none elsewhere → all income is Alberta income. */
|
|
2658
|
+
declare const SINGLE_JURISDICTION_ALBERTA_FACTOR = 1;
|
|
2659
|
+
declare function computeAllocationFactor(input: AllocationFactorInput): number;
|
|
2660
|
+
//#endregion
|
|
2661
|
+
//#region src/t2/at1/schedules/schedule3-other-deductions-credits.d.ts
|
|
2662
|
+
/**
|
|
2663
|
+
* Alberta AT1 Schedule 3 — Alberta Other Tax Deductions and Credits.
|
|
2664
|
+
*
|
|
2665
|
+
* NOT one calculation. The spec (TRA spec §3.2.3.4, "3B3B3.2.3.4 Schedule 3 -
|
|
2666
|
+
* Alberta Other Tax Deductions and Credits", `AT1-Chapter3-2025.2-full.txt`
|
|
2667
|
+
* lines 4127-4898) groups THREE independent non-refundable investment tax
|
|
2668
|
+
* credit continuities under one shared ceiling:
|
|
2669
|
+
*
|
|
2670
|
+
* ITC Investor Tax Credit (lines 100-108, 120-130)
|
|
2671
|
+
* CITC Capital Investment Tax Credit (lines 200-208, 220-230)
|
|
2672
|
+
* APITC Agri-Processing Investment Tax Credit (lines 300-316, 330-340)
|
|
2673
|
+
* MAD Maximum Allowable Deduction — the shared ceiling (lines 600-604)
|
|
2674
|
+
*
|
|
2675
|
+
* No matching form PDF exists under `research/sources/tra-forms/pdf/` (searched
|
|
2676
|
+
* for `AT1SCH03*` — nothing found, unlike every other schedule this package
|
|
2677
|
+
* models). The specification TEXT is therefore the only source for this
|
|
2678
|
+
* schedule's shape; there is no live-form layout to cross-check it against.
|
|
2679
|
+
*
|
|
2680
|
+
* ── The shared ceiling (lines 600-604) ───────────────────────────────────────
|
|
2681
|
+
*
|
|
2682
|
+
* 600 = 003104 + 003204 + 003312 (ITC + CITC + APITC applied)
|
|
2683
|
+
* 602 = 000068 − (000070+000071+000072+000074) (AT1 page 2 room)
|
|
2684
|
+
* 604 = lesser of 600 and 602 ("Total Deduction")
|
|
2685
|
+
*
|
|
2686
|
+
* `000068`/`000070`/`000071`/`000072`/`000074` are AT1 page-2 jacket lines this
|
|
2687
|
+
* engine does not compute here (out of this module's scope per the task's scope
|
|
2688
|
+
* rule) — they are plain numeric inputs (`MaximumAllowableDeductionInput`).
|
|
2689
|
+
*
|
|
2690
|
+
* ── Three pools, one room, in a STATED precedence ────────────────────────────
|
|
2691
|
+
*
|
|
2692
|
+
* ITC is applied first, capped only by 602 itself:
|
|
2693
|
+
* 104 ≤ 000068 − (000070+000071+000072+000074)
|
|
2694
|
+
*
|
|
2695
|
+
* CITC is gated behind ITC: "If 003108 > 0 [ITC still has an unused carryforward
|
|
2696
|
+
* balance after this year's application], then [204] must equal zero." Only once
|
|
2697
|
+
* the ITC pool is fully drawn down may CITC be claimed, capped at what room ITC
|
|
2698
|
+
* left behind:
|
|
2699
|
+
* 204 ≤ 602 − 104 (when 108 = 0; otherwise 204 = 0)
|
|
2700
|
+
*
|
|
2701
|
+
* APITC draws on what both leave behind, but against a DIFFERENT room formula —
|
|
2702
|
+
* the spec's four "cannot exceed" clauses for 304/306/308/310 all subtract only
|
|
2703
|
+
* `(000070+000072)`, NOT `000071`/`000074` the way 104/204/602 do. That asymmetry
|
|
2704
|
+
* is transcribed exactly as written, not corrected, because it repeats
|
|
2705
|
+
* identically across all five APITC business-rule cells (304, 306, 308, 310, 312)
|
|
2706
|
+
* — consistent enough to be deliberate rather than a transcription slip:
|
|
2707
|
+
* 312 ≤ 000068 − (000070+000072) − (104+204)
|
|
2708
|
+
*
|
|
2709
|
+
* ── APITC: per-vintage percentage caps ───────────────────────────────────────
|
|
2710
|
+
*
|
|
2711
|
+
* The four "cannot exceed" clauses for 304/306/308/310, read together, are
|
|
2712
|
+
* algebraically just ONE combined-total constraint stated four times from four
|
|
2713
|
+
* different partial-sum vantage points (each says "this line ≤ R − the lines
|
|
2714
|
+
* listed", and the lines listed are exactly the OTHER three) — they collapse to
|
|
2715
|
+
* `304+306+308+310 ≤ R`, which is exactly what 312's own business rule states
|
|
2716
|
+
* directly. So the four clauses add nothing beyond that one shared-room ceiling;
|
|
2717
|
+
* what makes each vintage different is its OWN percentage cap from AAPITC
|
|
2718
|
+
* (330-340):
|
|
2719
|
+
*
|
|
2720
|
+
* occurrence 0 (current year, 334/336 occ 0) ≤ 20% of that vintage's receipt
|
|
2721
|
+
* occurrence 1 (1st preceding, occ 1) ≤ 30% of that vintage's receipt
|
|
2722
|
+
* occurrence 2 (2nd preceding, occ 2) ≤ 50% of that vintage's receipt
|
|
2723
|
+
* occurrences 3-10 (3rd-10th preceding) no percentage cap, own balance only
|
|
2724
|
+
*
|
|
2725
|
+
* `computeSchedule3` claims each vintage's OWN cap first, then allocates the
|
|
2726
|
+
* shared room OLDEST-VINTAGE-FIRST when the total requested exceeds it — APITC
|
|
2727
|
+
* is a 10-year-preceding, use-it-or-lose-it credit and the spec states no
|
|
2728
|
+
* application order, so this engine flags that choice in `issues` rather than
|
|
2729
|
+
* silently guessing at NetFile's actual tie-break. Supply `amountApplied` on
|
|
2730
|
+
* each vintage directly for exact filing parity.
|
|
2731
|
+
*
|
|
2732
|
+
* ── What is deliberately NOT modelled ────────────────────────────────────────
|
|
2733
|
+
*
|
|
2734
|
+
* The AITC/ACITC year-of-origin analysis tables (120-130, 220-230) are
|
|
2735
|
+
* supplementary detail TRA requires when a corporation carries ITC or CITC.
|
|
2736
|
+
* Unlike AAPITC, the spec gives them no percentage cap or application order of
|
|
2737
|
+
* their own — every business rule on those lines is a reconciliation back to the
|
|
2738
|
+
* aggregate 104/106/204/206 this module already computes (e.g. "126 … Value must
|
|
2739
|
+
* be less than or equal to 124+125", "130 … calculate 124+125-126-128"). Adding a
|
|
2740
|
+
* per-vintage array for ITC/CITC would only re-derive numbers this module
|
|
2741
|
+
* already produces without a spec-given rule to allocate them across years, so
|
|
2742
|
+
* it is left out; a caller filing the AITC/ACITC detail pages supplies that
|
|
2743
|
+
* per-vintage split itself.
|
|
2744
|
+
*
|
|
2745
|
+
* Whole dollars, pure.
|
|
2746
|
+
*/
|
|
2747
|
+
interface MaximumAllowableDeductionInput {
|
|
2748
|
+
/** AT1 page 2, line 068 — Alberta tax payable before this deduction. */
|
|
2749
|
+
taxPayableBeforeDeduction?: number;
|
|
2750
|
+
/** AT1 page 2, line 070. */
|
|
2751
|
+
line070?: number;
|
|
2752
|
+
/** AT1 page 2, line 071. */
|
|
2753
|
+
line071?: number;
|
|
2754
|
+
/** AT1 page 2, line 072. */
|
|
2755
|
+
line072?: number;
|
|
2756
|
+
/** AT1 page 2, line 074. */
|
|
2757
|
+
line074?: number;
|
|
2758
|
+
}
|
|
2759
|
+
interface InvestorTaxCreditInput {
|
|
2760
|
+
/** 003100 — total shown on all ITC certificates issued during the year. */
|
|
2761
|
+
certificatesIssued?: number;
|
|
2762
|
+
/** 003102 — total ITC carried forward from prior year(s) (= prior year's 108). */
|
|
2763
|
+
carryforwardFromPriorYear?: number;
|
|
2764
|
+
/** 003106 — total ITC expired during the year. */
|
|
2765
|
+
expired?: number;
|
|
2766
|
+
/**
|
|
2767
|
+
* 003104 — amount applied to the current taxation year. Omit to claim the
|
|
2768
|
+
* maximum the shared room (602) and the available pool (100+102) both allow.
|
|
2769
|
+
*/
|
|
2770
|
+
amountApplied?: number;
|
|
2771
|
+
}
|
|
2772
|
+
interface InvestorTaxCreditResult {
|
|
2773
|
+
certificatesIssued: number;
|
|
2774
|
+
carryforwardFromPriorYear: number;
|
|
2775
|
+
/** 100 + 102 — the pool before this year's claim. */
|
|
2776
|
+
availableBeforeClaim: number;
|
|
2777
|
+
/** 003104 — capped at the pool and at the 602 room (ITC has first call on it). */
|
|
2778
|
+
amountApplied: number;
|
|
2779
|
+
expired: number;
|
|
2780
|
+
/** 003108 = 100 + 102 − 104 − 106. Driving CITC's gate below. */
|
|
2781
|
+
carryforwardToNextYear: number;
|
|
2782
|
+
}
|
|
2783
|
+
interface CapitalInvestmentTaxCreditInput {
|
|
2784
|
+
/** 003200 — total shown on all CITC certificates issued during the year. */
|
|
2785
|
+
certificatesIssued?: number;
|
|
2786
|
+
/** 003202 — total CITC carried forward from prior year(s) (= prior year's 208). */
|
|
2787
|
+
carryforwardFromPriorYear?: number;
|
|
2788
|
+
/** 003206 — total CITC expired during the year. */
|
|
2789
|
+
expired?: number;
|
|
2790
|
+
/**
|
|
2791
|
+
* 003204 — amount applied to the current taxation year. Ignored (forced to
|
|
2792
|
+
* zero) whenever the ITC pool still has an unused carryforward balance —
|
|
2793
|
+
* see the module docstring.
|
|
2794
|
+
*/
|
|
2795
|
+
amountApplied?: number;
|
|
2796
|
+
}
|
|
2797
|
+
interface CapitalInvestmentTaxCreditResult {
|
|
2798
|
+
certificatesIssued: number;
|
|
2799
|
+
carryforwardFromPriorYear: number;
|
|
2800
|
+
availableBeforeClaim: number;
|
|
2801
|
+
/** 003204 — zero whenever ITC's 108 > 0, otherwise capped at 602 − 104. */
|
|
2802
|
+
amountApplied: number;
|
|
2803
|
+
expired: number;
|
|
2804
|
+
/** 003208 = 200 + 202 − 204 − 206. */
|
|
2805
|
+
carryforwardToNextYear: number;
|
|
2806
|
+
}
|
|
2807
|
+
interface AgriProcessingCurrentYearInput {
|
|
2808
|
+
/** 003334 occurrence 0 (= 003300) — total on APITC certificates issued this year. */
|
|
2809
|
+
received?: number;
|
|
2810
|
+
/** 003336 occurrence 0 (= 003304) — applied from the current year's receipt, ≤ 20%. */
|
|
2811
|
+
amountApplied?: number;
|
|
2812
|
+
}
|
|
2813
|
+
/**
|
|
2814
|
+
* A single preceding-year vintage (occurrence 1 or 2). `availableAtBeginning`
|
|
2815
|
+
* (003335) is the original receipt LESS whatever was applied in prior years —
|
|
2816
|
+
* multi-year history this pure function does not carry, so the caller supplies
|
|
2817
|
+
* the already-reduced balance directly rather than the original 003334 receipt.
|
|
2818
|
+
*/
|
|
2819
|
+
interface AgriProcessingVintageInput {
|
|
2820
|
+
/** 003335 for this occurrence — balance available at the start of this year. */
|
|
2821
|
+
availableAtBeginning?: number;
|
|
2822
|
+
/** 003336 for this occurrence — applied this year, capped at this vintage's own %. */
|
|
2823
|
+
amountApplied?: number;
|
|
2824
|
+
}
|
|
2825
|
+
/** Occurrences 3 through 10, combined — the spec caps this block as one group. */
|
|
2826
|
+
interface AgriProcessingCombinedVintageInput {
|
|
2827
|
+
/** Sum of 003335 across occurrences 3-10. */
|
|
2828
|
+
availableAtBeginning?: number;
|
|
2829
|
+
/** Sum of 003336 across occurrences 3-10 (= 003310). No percentage cap. */
|
|
2830
|
+
amountApplied?: number;
|
|
2831
|
+
}
|
|
2832
|
+
interface AgriProcessingTaxCreditInput {
|
|
2833
|
+
current?: AgriProcessingCurrentYearInput;
|
|
2834
|
+
/** 1st preceding taxation year, occurrence 1 — 30% cap. */
|
|
2835
|
+
firstPreceding?: AgriProcessingVintageInput;
|
|
2836
|
+
/** 2nd preceding taxation year, occurrence 2 — 50% cap. */
|
|
2837
|
+
secondPreceding?: AgriProcessingVintageInput;
|
|
2838
|
+
/** 3rd-10th preceding taxation years, occurrences 3-10 — no % cap. */
|
|
2839
|
+
thirdToTenthPreceding?: AgriProcessingCombinedVintageInput;
|
|
2840
|
+
/** 003314 — total APITC expired during the year (= 003338 occurrence 10). */
|
|
2841
|
+
expiredThisYear?: number;
|
|
2842
|
+
}
|
|
2843
|
+
interface AgriProcessingVintageResult {
|
|
2844
|
+
available: number;
|
|
2845
|
+
/** This vintage's own percentage ceiling (Infinity-free — already in dollars). */
|
|
2846
|
+
ownCap: number;
|
|
2847
|
+
amountApplied: number;
|
|
2848
|
+
}
|
|
2849
|
+
interface AgriProcessingTaxCreditResult {
|
|
2850
|
+
current: AgriProcessingVintageResult;
|
|
2851
|
+
firstPreceding: AgriProcessingVintageResult;
|
|
2852
|
+
secondPreceding: AgriProcessingVintageResult;
|
|
2853
|
+
thirdToTenthPreceding: Omit<AgriProcessingVintageResult, 'ownCap'>;
|
|
2854
|
+
/** 003300 — total received on certificates issued this year (= current.available). */
|
|
2855
|
+
totalReceived: number;
|
|
2856
|
+
/** 003302 — sum of 003335 across occurrences 1-10. */
|
|
2857
|
+
carryforwardFromPriorYear: number;
|
|
2858
|
+
/** 003304+306+308+310 requested, before the shared-room allocation below. */
|
|
2859
|
+
totalRequested: number;
|
|
2860
|
+
/** 003312 = 304+306+308+310, after the shared-room allocation. */
|
|
2861
|
+
totalApplied: number;
|
|
2862
|
+
expired: number;
|
|
2863
|
+
/** 003316 = 300 + 302 − 312 − 314. */
|
|
2864
|
+
availableForCarryforward: number;
|
|
2865
|
+
}
|
|
2866
|
+
interface Schedule3Input {
|
|
2867
|
+
mad?: MaximumAllowableDeductionInput;
|
|
2868
|
+
itc?: InvestorTaxCreditInput;
|
|
2869
|
+
citc?: CapitalInvestmentTaxCreditInput;
|
|
2870
|
+
apitc?: AgriProcessingTaxCreditInput;
|
|
2871
|
+
}
|
|
2872
|
+
interface MaximumAllowableDeductionResult {
|
|
2873
|
+
/** 003600 = 104 + 204 + 312. */
|
|
2874
|
+
creditsApplied: number;
|
|
2875
|
+
/** 003602 = 000068 − (000070+000071+000072+000074). May be negative; not floored. */
|
|
2876
|
+
room: number;
|
|
2877
|
+
}
|
|
2878
|
+
interface Schedule3Result {
|
|
2879
|
+
mad: MaximumAllowableDeductionResult;
|
|
2880
|
+
itc: InvestorTaxCreditResult;
|
|
2881
|
+
citc: CapitalInvestmentTaxCreditResult;
|
|
2882
|
+
apitc: AgriProcessingTaxCreditResult;
|
|
2883
|
+
/** 003604 — lesser of mad.creditsApplied and mad.room, floored at nil. */
|
|
2884
|
+
totalDeduction: number;
|
|
2885
|
+
issues: string[];
|
|
2886
|
+
}
|
|
2887
|
+
declare function computeSchedule3(input: Schedule3Input): Schedule3Result;
|
|
2888
|
+
/**
|
|
2889
|
+
* `scheduleNNValues` for Schedule 3, following the `at1-schedule-line-items.ts`
|
|
2890
|
+
* builder pattern (see `schedule20Values`, `schedule16Values`). Kept in THIS
|
|
2891
|
+
* file rather than the shared filing module per the task instructions — other
|
|
2892
|
+
* agents are editing `at1-schedule-line-items.ts` concurrently.
|
|
2893
|
+
*/
|
|
2894
|
+
interface At1ScheduleValueLike$6 {
|
|
2895
|
+
lineItemId: string;
|
|
2896
|
+
value: string | number;
|
|
2897
|
+
}
|
|
2898
|
+
interface At1ScheduleDataLike$6 {
|
|
2899
|
+
scheduleId: string;
|
|
2900
|
+
values: At1ScheduleValueLike$6[];
|
|
2901
|
+
}
|
|
2902
|
+
/**
|
|
2903
|
+
* Field ids per the spec transcription above: 100-108 (ITC), 200-208 (CITC),
|
|
2904
|
+
* 300-316 (APITC), 600-604 (MAD). The by-year-of-origin detail pages
|
|
2905
|
+
* (120-130/220-230/330-340) are NOT emitted — this module does not compute a
|
|
2906
|
+
* per-vintage split for ITC/CITC (see the module docstring), and the APITC
|
|
2907
|
+
* per-vintage figures this DOES compute (304/306/308/310) are filed on the
|
|
2908
|
+
* 300-series rollup, not re-emitted as an AAPITC occurrence table.
|
|
2909
|
+
*/
|
|
2910
|
+
declare function schedule3Values(result: Schedule3Result): At1ScheduleDataLike$6;
|
|
2911
|
+
//#endregion
|
|
2912
|
+
//#region src/t2/at1/schedules/schedule4-foreign-investment-tax-credit.d.ts
|
|
2913
|
+
/**
|
|
2914
|
+
* Alberta AT1 Schedule 4 — Alberta Foreign Investment Income Tax Credit.
|
|
2915
|
+
*
|
|
2916
|
+
* One "FIC" occurrence per foreign country in which the corporation earned
|
|
2917
|
+
* foreign non-business income (TRA spec §3.2.3.5, lines 4899-5082). AB form
|
|
2918
|
+
* 004 exists only if federal Schedule 21 (form 021) exists, and the
|
|
2919
|
+
* spec directs the field occurrences be sorted "in the same order as on the
|
|
2920
|
+
* federal form":
|
|
2921
|
+
*
|
|
2922
|
+
* 004002 country = fed 021100
|
|
2923
|
+
* 004004 net foreign investment income = fed 021110
|
|
2924
|
+
* 004006 foreign tax paid, net of the ITA 20(12)/ACTA 8(2.2) deduction
|
|
2925
|
+
* 004008 federal non-business foreign tax credit = fed 021180
|
|
2926
|
+
* 004012 allowable credit = lesser of D or G
|
|
2927
|
+
*
|
|
2928
|
+
* **004006** has a conditional business rule: if the ITA subsection 20(12)
|
|
2929
|
+
* deduction was computed DIFFERENTLY for Alberta (the ACTA 8(2.2) amount),
|
|
2930
|
+
* the value is `fed 021120 − greater(Alberta 8(2.2) amount, fed 021130)`;
|
|
2931
|
+
* otherwise it is `fed 021120 − fed 021130`. Both branches collapse to the
|
|
2932
|
+
* SAME expression: `max(albertaDeduction, fed021130)` equals `fed021130`
|
|
2933
|
+
* exactly when the two amounts don't differ, so this module always computes
|
|
2934
|
+
* the max, with the Alberta figure defaulting to the federal one. No separate
|
|
2935
|
+
* "differs" flag is needed — it falls out of the algebra.
|
|
2936
|
+
*
|
|
2937
|
+
* **004012** is the lesser of two amounts, D and G, transcribed exactly:
|
|
2938
|
+
*
|
|
2939
|
+
* D = 004004 × 000065 × [000068 / ((000062 − 000064) × 000065)]
|
|
2940
|
+
* G = (004006 − 004008) × 000065
|
|
2941
|
+
* 012 = lesser of D or G (calculate to 3 decimal places, rounding up at 5)
|
|
2942
|
+
*
|
|
2943
|
+
* 000062 (Alberta taxable income), 000064 (royalty tax deduction), 000065
|
|
2944
|
+
* (allocation factor) and 000068 (basic Alberta tax payable) are AT1 JACKET
|
|
2945
|
+
* lines this engine computes elsewhere (see `at1-line-items.ts`), not part of
|
|
2946
|
+
* this schedule — they are taken here as plain numeric inputs, named to match
|
|
2947
|
+
* the jacket's own field names (`albertaTaxableIncome`, `royaltyTaxDeduction`,
|
|
2948
|
+
* `allocationFactor`, `basicAlbertaTax`) so a caller can wire the two
|
|
2949
|
+
* together without renaming anything.
|
|
2950
|
+
*
|
|
2951
|
+
* D's ratio is degenerate on paper: 000068 is ITSELF DEFINED, elsewhere on the
|
|
2952
|
+
* jacket (line 068), as `(000062 − 000064) × 000065` — so the bracket
|
|
2953
|
+
* `000068 / ((000062−000064)×000065)` is exactly 1 whenever the two figures
|
|
2954
|
+
* agree, and D collapses to `004004 × 000065`. The spec still writes the
|
|
2955
|
+
* general form (it is not pre-simplified in the source) and this module
|
|
2956
|
+
* reproduces it literally rather than assuming the identity always holds — a
|
|
2957
|
+
* caller's `basicAlbertaTax` may be a filed or overridden figure that does
|
|
2958
|
+
* not exactly match the jacket's own formula. If the denominator is nil, D
|
|
2959
|
+
* cannot be computed; the module falls back to nil for that occurrence and
|
|
2960
|
+
* flags an issue rather than dividing by zero.
|
|
2961
|
+
*
|
|
2962
|
+
* "Calculate to 3 decimal places rounding up at 5" is applied to D and G
|
|
2963
|
+
* before the lesser is taken; the final 004012 amount is then rounded to the
|
|
2964
|
+
* nearest whole dollar, matching this repo's whole-dollar-integer convention
|
|
2965
|
+
* for every other field.
|
|
2966
|
+
*
|
|
2967
|
+
* The jacket total (000072, "Alberta Foreign Investment Income Tax Credit")
|
|
2968
|
+
* is the lesser of the SUM of all 004012 occurrences and
|
|
2969
|
+
* `000068 − (000070 + 000071)` — that comparison lives on the jacket, not
|
|
2970
|
+
* here (000070/000071 are the small business and M&P deductions, schedules
|
|
2971
|
+
* this module doesn't reach). This module sums the occurrences as
|
|
2972
|
+
* `totalAllowableCredit` for a caller to feed into that jacket comparison.
|
|
2973
|
+
*
|
|
2974
|
+
* Whole dollars, pure.
|
|
2975
|
+
*/
|
|
2976
|
+
interface ForeignInvestmentCountryInput {
|
|
2977
|
+
/** 004002 — two-character country code. Must equal fed 021100 for the occurrence. */
|
|
2978
|
+
country: string;
|
|
2979
|
+
/** 004004 — net foreign investment income. Must equal fed 021110. */
|
|
2980
|
+
netForeignInvestmentIncome?: number;
|
|
2981
|
+
/** fed 021120 — foreign investment income tax paid, gross (before any 20(12)/8(2.2) deduction). */
|
|
2982
|
+
fedForeignTaxPaid?: number;
|
|
2983
|
+
/** fed 021130 — the ITA subsection 20(12) deduction claimed federally for the occurrence. */
|
|
2984
|
+
fedIta2012Deduction?: number;
|
|
2985
|
+
/**
|
|
2986
|
+
* The Alberta ACTA 8(2.2) deduction, where it was computed DIFFERENTLY than
|
|
2987
|
+
* the federal ITA 20(12) figure. Defaults to `fedIta2012Deduction` — the two
|
|
2988
|
+
* business-rule branches collapse to the same `max()` expression, so no
|
|
2989
|
+
* separate "differs" flag is needed.
|
|
2990
|
+
*/
|
|
2991
|
+
albertaActa82Deduction?: number;
|
|
2992
|
+
/** 004008 — federal non-business foreign tax credit. Must equal fed 021180. */
|
|
2993
|
+
fedNonBusinessForeignTaxCredit?: number;
|
|
2994
|
+
}
|
|
2995
|
+
interface ForeignInvestmentCountryResult {
|
|
2996
|
+
country: string;
|
|
2997
|
+
/** 004004. */
|
|
2998
|
+
netForeignInvestmentIncome: number;
|
|
2999
|
+
/** 004006 — foreign tax paid, net of the 20(12)/8(2.2) deduction. */
|
|
3000
|
+
taxPaidNetOfDeduction: number;
|
|
3001
|
+
/** 004008. */
|
|
3002
|
+
federalNonBusinessForeignTaxCredit: number;
|
|
3003
|
+
/** D — see module doc. Rounded to 3 decimal places. */
|
|
3004
|
+
incomeProrationAmount: number;
|
|
3005
|
+
/** G — see module doc. Rounded to 3 decimal places. */
|
|
3006
|
+
taxPaidLessFederalCredit: number;
|
|
3007
|
+
/** 004012 — the lesser of D and G, floored at nil and rounded to the whole dollar. */
|
|
3008
|
+
allowableCredit: number;
|
|
3009
|
+
}
|
|
3010
|
+
interface Schedule4Input$1 {
|
|
3011
|
+
/** One occurrence per country, in the same order as the federal form. */
|
|
3012
|
+
countries: ForeignInvestmentCountryInput[];
|
|
3013
|
+
/** 000062 — AT1 jacket line: Alberta taxable income. */
|
|
3014
|
+
albertaTaxableIncome?: number;
|
|
3015
|
+
/** 000064 — AT1 jacket line: royalty tax deduction (Schedule 5). */
|
|
3016
|
+
royaltyTaxDeduction?: number;
|
|
3017
|
+
/** 000065 — AT1 jacket line: allocation factor. */
|
|
3018
|
+
allocationFactor?: number;
|
|
3019
|
+
/** 000068 — AT1 jacket line: basic Alberta tax payable. */
|
|
3020
|
+
basicAlbertaTax?: number;
|
|
3021
|
+
}
|
|
3022
|
+
interface Schedule4Result$1 {
|
|
3023
|
+
countries: ForeignInvestmentCountryResult[];
|
|
3024
|
+
/** Sum of all 004012 occurrences — feeds jacket line 000072 (capped there, not here). */
|
|
3025
|
+
totalAllowableCredit: number;
|
|
3026
|
+
issues: string[];
|
|
3027
|
+
}
|
|
3028
|
+
declare function computeSchedule4(input: Schedule4Input$1): Schedule4Result$1;
|
|
3029
|
+
/**
|
|
3030
|
+
* Net File line items for AT1 Schedule 4 — one FIC occurrence per country.
|
|
3031
|
+
* Field ids from the spec (§3.2.3.5): 002 country, 004 net foreign investment
|
|
3032
|
+
* income, 006 foreign tax paid net of deduction, 008 federal non-business
|
|
3033
|
+
* foreign tax credit, 012 allowable credit.
|
|
3034
|
+
*
|
|
3035
|
+
* Does NOT emit jacket line 000072 (the sum-vs-remaining-tax comparison) —
|
|
3036
|
+
* that is a jacket line, not a Schedule 4 line, and belongs to whichever
|
|
3037
|
+
* module builds the jacket. Use `result.totalAllowableCredit` for that.
|
|
3038
|
+
*/
|
|
3039
|
+
declare function schedule4Values(result: Schedule4Result$1): At1ScheduleData;
|
|
3040
|
+
//#endregion
|
|
3041
|
+
//#region src/t2/at1/schedules/schedule5-royalty-tax-deduction.d.ts
|
|
3042
|
+
/**
|
|
3043
|
+
* Alberta AT1 Schedule 5 — Alberta Royalty Tax Deduction.
|
|
3044
|
+
*
|
|
3045
|
+
* TRA spec §3.2.3.6 (Chapter 3, lines 5083-6291). The Alberta Royalty Tax
|
|
3046
|
+
* Deduction (RTD) shelters "Attributed Canadian Royalty Income" — Crown
|
|
3047
|
+
* charges net of the resource allowance and reimbursements — against Alberta
|
|
3048
|
+
* taxable income. Form 005 (this schedule) is required whenever the
|
|
3049
|
+
* corporation has Attributed Canadian Royalty Income, and **Form 007 (AT1
|
|
3050
|
+
* Schedule 7 — Royalty Tax Credit/Deduction Supplemental Information) must be
|
|
3051
|
+
* completed before Form 005** (line 5133-5138): "IF FORM 007 IS NOT INCLUDED
|
|
3052
|
+
* WITH FORMS 005 AND/OR 006, THEN THE CLIENT'S RTC ENTITLEMENT WILL BE
|
|
3053
|
+
* DISALLOWED."
|
|
3054
|
+
*
|
|
3055
|
+
* ── Structure ────────────────────────────────────────────────────────────
|
|
3056
|
+
*
|
|
3057
|
+
* The schedule has two independent pool systems that both feed AT1 core line
|
|
3058
|
+
* 064 (Royalty Tax Deduction):
|
|
3059
|
+
*
|
|
3060
|
+
* 1. **CRTD** ("Calculation of the Royalty Tax Deduction", 005001-005027) —
|
|
3061
|
+
* the corporation's OWN unsuccessored royalty pool. A single running
|
|
3062
|
+
* pool with a discretionary claim (line 016), capped by what remains
|
|
3063
|
+
* available.
|
|
3064
|
+
* 2. **Successored pools** (Area C/D, 005101-005140) — per-vendor pools
|
|
3065
|
+
* acquired on a change in control or the acquisition of substantially
|
|
3066
|
+
* all Canadian resource properties, split into "second successored"
|
|
3067
|
+
* (SSPI, 005101-005115) and "first successored" (FSPI, 005121-005135)
|
|
3068
|
+
* generations. Unlike the CRTD, each occurrence's claim is MANDATORY
|
|
3069
|
+
* arithmetic (marked "M" in the spec), not discretionary: it is exactly
|
|
3070
|
+
* `min(pool base, property income)`.
|
|
3071
|
+
*
|
|
3072
|
+
* AT1 core line 064 = `005016 + 005140`, capped at AT1 core line 062 (Alberta
|
|
3073
|
+
* Taxable Income before the deduction). This engine cannot see line 062 (it
|
|
3074
|
+
* belongs to the AT1 jacket, not this schedule) so it is accepted as a plain
|
|
3075
|
+
* numeric input, `albertaTaxableIncomeBeforeDeduction`.
|
|
3076
|
+
*
|
|
3077
|
+
* ── Cross-references accepted as plain inputs (NOT re-derived here) ────────
|
|
3078
|
+
*
|
|
3079
|
+
* • **005001** (Crown charges, line 001) is "the amount from [AT1] Schedule
|
|
3080
|
+
* 7, line 061" — a nine-term sum over Schedule 7's own Crown-payment,
|
|
3081
|
+
* partnership-share and prior-year-adjustment sections (007003 + 007005 +
|
|
3082
|
+
* 007007 + 007009 + 007011 + 007013 + 007017 + 007025 + 007029 + Σ007077
|
|
3083
|
+
* + Σ007079 + Σ007081 − 007051). AT1 Schedule 7 is a separate schedule
|
|
3084
|
+
* with its own filing requirement (see above) built independently of this
|
|
3085
|
+
* module. This engine accepts the finished Schedule 7 line 061 figure —
|
|
3086
|
+
* `crownChargesNetOfReimbursements` — and applies only the final "if
|
|
3087
|
+
* negative, default to zero" step that line 001 itself specifies.
|
|
3088
|
+
* • **005005** (resource allowance, line 005): "Value = 012024 if it
|
|
3089
|
+
* exists, otherwise default to fed 001346." AT1 Schedule 12
|
|
3090
|
+
* (income/loss reconciliation) and federal Schedule 1 are both external
|
|
3091
|
+
* to this module; the two candidate figures are accepted as plain inputs
|
|
3092
|
+
* and this schedule applies only the stated precedence.
|
|
3093
|
+
*
|
|
3094
|
+
* ── A literal-spec asymmetry worth flagging (not "fixed") ──────────────────
|
|
3095
|
+
*
|
|
3096
|
+
* Line 013 (the pool available before the current year's claim, used to
|
|
3097
|
+
* build lines 016 and 017) is `005001 − 005005 − 005007 + 005011` — it nets
|
|
3098
|
+
* out **reimbursements (005007)**. Line 025 (the Attributed Royalty Income
|
|
3099
|
+
* carried forward to NEXT year) is defined by the spec as `005001 − 005005 +
|
|
3100
|
+
* 005011 − 000064 − 005023` (or, when `005001 − 005005 < 0`, `005011 − 000064
|
|
3101
|
+
* − 005023`) — with **no 005007 term at all**. That is exactly what TRA's
|
|
3102
|
+
* EFILE business rule states (lines 5379-5386 of the spec); this module
|
|
3103
|
+
* implements it literally rather than assuming the omission is a transcription
|
|
3104
|
+
* error and "fixing" it to match line 013's shape.
|
|
3105
|
+
*
|
|
3106
|
+
* Also note line 025 subtracts **000064**, the COMBINED royalty tax deduction
|
|
3107
|
+
* (CRTD claim + successored total, capped at Alberta taxable income) — not
|
|
3108
|
+
* just the CRTD's own claim (005016). That is likewise the literal EFILE
|
|
3109
|
+
* mapping, not a simplification made here.
|
|
3110
|
+
*
|
|
3111
|
+
* Whole dollars, pure.
|
|
3112
|
+
*/
|
|
3113
|
+
/** One predecessor's transfer into the corporation's unsuccessored pool (Area B, 005031-005037). */
|
|
3114
|
+
interface At1Schedule5PredecessorTransfer {
|
|
3115
|
+
/** 005031 — predecessor's legal name. */
|
|
3116
|
+
predecessorName: string;
|
|
3117
|
+
/** 005033 — Alberta Corporate Account Number, if the predecessor was Alberta-registered. */
|
|
3118
|
+
albertaCorporateAccountNumber?: string;
|
|
3119
|
+
/** 005035 — date of the transfer event (ISO `YYYY-MM-DD`), within the corporation's taxation year. */
|
|
3120
|
+
dateOfEvent: string;
|
|
3121
|
+
/** 005037 — carry-forward amount transferred to this corporation. */
|
|
3122
|
+
amountTransferred: number;
|
|
3123
|
+
}
|
|
3124
|
+
/**
|
|
3125
|
+
* One occurrence in a successored-pool section (SSPI 005101-005115 or FSPI
|
|
3126
|
+
* 005121-005135). `poolBroughtForward` and `acquisitionAmount` are mutually
|
|
3127
|
+
* exclusive per the spec ("only one field can exist" for 105/107 and for
|
|
3128
|
+
* 125/127) — supply exactly one.
|
|
3129
|
+
*/
|
|
3130
|
+
interface At1Schedule5SuccessoredPoolEntry {
|
|
3131
|
+
/** 005101 / 005121 — legal name of the vendor, predecessor, or the corporation itself on a change in control. */
|
|
3132
|
+
vendorName: string;
|
|
3133
|
+
/** 005103 / 005123 — date of the event (ISO `YYYY-MM-DD`), oldest to newest across occurrences. */
|
|
3134
|
+
dateOfEvent: string;
|
|
3135
|
+
/**
|
|
3136
|
+
* 005105 / 005125 — pool amount available for carry-forward at the end of
|
|
3137
|
+
* the preceding year (continuing an existing successored pool). Mutually
|
|
3138
|
+
* exclusive with `acquisitionAmount` for the same occurrence.
|
|
3139
|
+
*/
|
|
3140
|
+
poolBroughtForward?: number;
|
|
3141
|
+
/**
|
|
3142
|
+
* 005107 / 005127 — cost on acquisition of all/substantially all Canadian
|
|
3143
|
+
* resource properties, or on a change in control, under s.20(8) or 20(14)
|
|
3144
|
+
* (a NEW successored pool this year). Mutually exclusive with
|
|
3145
|
+
* `poolBroughtForward` for the same occurrence.
|
|
3146
|
+
*/
|
|
3147
|
+
acquisitionAmount?: number;
|
|
3148
|
+
/** 005109 / 005129 — property income under s.20(1)(c). A loss (negative) is treated as nil. */
|
|
3149
|
+
propertyIncome: number;
|
|
3150
|
+
}
|
|
3151
|
+
/** Result for one successored-pool occurrence (005111/005113 or 005131/005133). */
|
|
3152
|
+
interface At1Schedule5SuccessoredPoolEntryResult {
|
|
3153
|
+
vendorName: string;
|
|
3154
|
+
dateOfEvent: string;
|
|
3155
|
+
/** (105 or 107) / (125 or 127) — the pool base for this occurrence. */
|
|
3156
|
+
base: number;
|
|
3157
|
+
/**
|
|
3158
|
+
* Which mutually-exclusive field `base` came from — 105/125 for
|
|
3159
|
+
* `'broughtForward'`, 107/127 for `'acquired'`, or `'unspecified'` when
|
|
3160
|
+
* neither was supplied (base is nil; see the `issues` entry for the
|
|
3161
|
+
* occurrence). Drives which line `schedule5Values` files `base` under.
|
|
3162
|
+
*/
|
|
3163
|
+
baseKind: 'broughtForward' | 'acquired' | 'unspecified';
|
|
3164
|
+
/** Property income, floored at zero. */
|
|
3165
|
+
propertyIncome: number;
|
|
3166
|
+
/** 005111 / 005131 — mandatory arithmetic: min(base, propertyIncome). */
|
|
3167
|
+
claim: number;
|
|
3168
|
+
/** 005113 / 005133 — base minus claim. */
|
|
3169
|
+
carryForwardBeforeTransfer: number;
|
|
3170
|
+
}
|
|
3171
|
+
/** 005026/005027 — whether the resource pools were transferred during the year. */
|
|
3172
|
+
interface At1Schedule5PoolTransfer {
|
|
3173
|
+
/**
|
|
3174
|
+
* 005026 — 1: transfer due to disposition of all/substantially all Canadian
|
|
3175
|
+
* resource properties (s.20(8)); 2: transfer due to a change in control or
|
|
3176
|
+
* ceasing to be exempt under s.20(14); 3: no transfer occurred.
|
|
3177
|
+
*/
|
|
3178
|
+
type: 1 | 2 | 3;
|
|
3179
|
+
/** 005027 — legal name of the acquiring corporation. Required when `type` is 1 or 2; must be absent when 3. */
|
|
3180
|
+
acquirerName?: string;
|
|
3181
|
+
}
|
|
3182
|
+
interface AlbertaSchedule5Input {
|
|
3183
|
+
/**
|
|
3184
|
+
* 005001 — Crown charges under s.20(6)(a)-(e), with reference to s.20(13):
|
|
3185
|
+
* AT1 Schedule 7, line 061. See the module docstring — this is Schedule 7's
|
|
3186
|
+
* finished output, not re-derived here. Floored at zero per the spec's
|
|
3187
|
+
* final step on line 001.
|
|
3188
|
+
*/
|
|
3189
|
+
crownChargesNetOfReimbursements?: number;
|
|
3190
|
+
/**
|
|
3191
|
+
* 005005 — resource allowance claimed under s.20(6)(g). Prefer
|
|
3192
|
+
* `albertaResourceAllowance` (AT1 Schedule 12, line 024); falls back to
|
|
3193
|
+
* `federalResourceAllowance` (federal Schedule 1, line 346) when absent,
|
|
3194
|
+
* per the spec's stated precedence.
|
|
3195
|
+
*/
|
|
3196
|
+
albertaResourceAllowance?: number;
|
|
3197
|
+
/** 005005 fallback — federal Schedule 1, line 346. Used only when `albertaResourceAllowance` is not supplied. */
|
|
3198
|
+
federalResourceAllowance?: number;
|
|
3199
|
+
/**
|
|
3200
|
+
* 005007 — reimbursements received under a contract in respect of amounts
|
|
3201
|
+
* on line 001, under s.20(6)(f). Must not already be netted into
|
|
3202
|
+
* `crownChargesNetOfReimbursements`. Excludes ARTC and other government
|
|
3203
|
+
* rebates or credits (per the spec note).
|
|
3204
|
+
*/
|
|
3205
|
+
reimbursementsForCrownCharges?: number;
|
|
3206
|
+
/** 005043 — corporation's own unsuccessored pool C/F from the preceding year (normally last year's 005017; enter manually if unavailable). */
|
|
3207
|
+
openingUnsuccessoredPoolBalance?: number;
|
|
3208
|
+
/** 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)). */
|
|
3209
|
+
predecessorTransfers?: readonly At1Schedule5PredecessorTransfer[];
|
|
3210
|
+
/**
|
|
3211
|
+
* 005016 — the CRTD claim actually made against the unsuccessored pool.
|
|
3212
|
+
* Discretionary (spec marks it "X", not "M"): omit to claim the maximum
|
|
3213
|
+
* available (lesser of the pool balance and remaining Alberta taxable
|
|
3214
|
+
* income capacity).
|
|
3215
|
+
*/
|
|
3216
|
+
crtdAmountClaimed?: number;
|
|
3217
|
+
/** 005023 — Attributed Royalty Income transferred to another corporation during the year on disposal of substantially all Canadian resource properties. */
|
|
3218
|
+
transferredOnDisposal?: number;
|
|
3219
|
+
/** 005200 — whether the corporation has any successored pools to report. When false, `secondSuccessoredPools`/`firstSuccessoredPools` must be empty (spec: 005101-005140 "must not exist"). */
|
|
3220
|
+
hasSuccessoredPools?: boolean;
|
|
3221
|
+
/** SSPI, 005101-005115 — second successored pool occurrences, oldest date of event first. */
|
|
3222
|
+
secondSuccessoredPools?: readonly At1Schedule5SuccessoredPoolEntry[];
|
|
3223
|
+
/** FSPI, 005121-005135 — first successored pool occurrences, oldest date of event first. */
|
|
3224
|
+
firstSuccessoredPools?: readonly At1Schedule5SuccessoredPoolEntry[];
|
|
3225
|
+
/** 005026/005027 — pool transfer during the year, if any. */
|
|
3226
|
+
poolTransfer?: At1Schedule5PoolTransfer;
|
|
3227
|
+
/**
|
|
3228
|
+
* 005100 — was there a change in control that created the immediately
|
|
3229
|
+
* preceding taxation year end? Informational; cross-checked against the
|
|
3230
|
+
* AT1 core fields below when both are supplied.
|
|
3231
|
+
*/
|
|
3232
|
+
changeInControlEndedPrecedingYear?: boolean;
|
|
3233
|
+
/** AT1 core 000038 — tax year end changed since the last return filed. For the 005100 cross-check only. */
|
|
3234
|
+
at1TaxYearEndChanged?: boolean;
|
|
3235
|
+
/** AT1 core 000039 — reason for the tax year end change (2 = change in control). For the 005100 cross-check only. */
|
|
3236
|
+
at1TaxYearEndChangeReason?: 1 | 2 | 3;
|
|
3237
|
+
/**
|
|
3238
|
+
* AT1 core 000062 — Alberta Taxable Income (Loss) before this deduction.
|
|
3239
|
+
* Owned by the AT1 jacket, not this schedule; caps both the CRTD claim
|
|
3240
|
+
* (line 016) and the combined total (line 064).
|
|
3241
|
+
*/
|
|
3242
|
+
albertaTaxableIncomeBeforeDeduction?: number;
|
|
3243
|
+
}
|
|
3244
|
+
interface AlbertaSchedule5Result {
|
|
3245
|
+
/** 005001, floored at zero. */
|
|
3246
|
+
crownCharges: number;
|
|
3247
|
+
/** 005005. */
|
|
3248
|
+
resourceAllowance: number;
|
|
3249
|
+
/** 005007. */
|
|
3250
|
+
reimbursements: number;
|
|
3251
|
+
/** Sum of 005037 across predecessor transfers. */
|
|
3252
|
+
predecessorTransfersTotal: number;
|
|
3253
|
+
/** 005011 = 005043 + Σ005037. */
|
|
3254
|
+
attributedRoyaltyIncomeCarryForwardIn: number;
|
|
3255
|
+
/** Line 013 (unlabeled internal subtotal) = 005001 − 005005 − 005007 + 005011. */
|
|
3256
|
+
unsuccessoredPoolAvailable: number;
|
|
3257
|
+
/** The maximum line 016 could claim: max(0, min(unsuccessoredPoolAvailable, 000062 − 005140)). */
|
|
3258
|
+
crtdMaxClaimable: number;
|
|
3259
|
+
/** 005016 — the CRTD claim actually made. */
|
|
3260
|
+
crtdClaim: number;
|
|
3261
|
+
/** 005017 = unsuccessoredPoolAvailable − crtdClaim. */
|
|
3262
|
+
poolAvailableCarryForward: number;
|
|
3263
|
+
/** 005023, passed through. */
|
|
3264
|
+
transferredOnDisposal: number;
|
|
3265
|
+
/** SSPI results, in input order. */
|
|
3266
|
+
secondSuccessoredPools: At1Schedule5SuccessoredPoolEntryResult[];
|
|
3267
|
+
/** FSPI results, in input order. */
|
|
3268
|
+
firstSuccessoredPools: At1Schedule5SuccessoredPoolEntryResult[];
|
|
3269
|
+
/** 005115 = Σ SSPI carryForwardBeforeTransfer. */
|
|
3270
|
+
secondSuccessoredSubtotal: number;
|
|
3271
|
+
/** 005135 = Σ FSPI carryForwardBeforeTransfer. */
|
|
3272
|
+
firstSuccessoredSubtotal: number;
|
|
3273
|
+
/** 005140 = Σ SSPI claims + Σ FSPI claims. */
|
|
3274
|
+
successoredTotal: number;
|
|
3275
|
+
/** AT1 core 000064 = min(005016 + 005140, 000062), floored at zero (see `issues` when this floor binds). */
|
|
3276
|
+
totalRoyaltyTaxDeduction: number;
|
|
3277
|
+
/** 005025, floored at zero. */
|
|
3278
|
+
attributedRoyaltyIncomeCarryForwardOut: number;
|
|
3279
|
+
/** 005026/005027, passed through from input for filing — see `schedule5Values`. */
|
|
3280
|
+
poolTransfer?: At1Schedule5PoolTransfer;
|
|
3281
|
+
/** 005100, passed through from input for filing — see `schedule5Values`. */
|
|
3282
|
+
changeInControlEndedPrecedingYear?: boolean;
|
|
3283
|
+
/** True once there is Attributed Canadian Royalty Income (per the spec, this is when Form 005 must be filed). */
|
|
3284
|
+
formRequired: boolean;
|
|
3285
|
+
issues: string[];
|
|
3286
|
+
}
|
|
3287
|
+
declare function computeAlbertaSchedule5(input: AlbertaSchedule5Input): AlbertaSchedule5Result;
|
|
3288
|
+
/**
|
|
3289
|
+
* `scheduleNNValues` for Schedule 5, following the `at1-schedule-line-items.ts`
|
|
3290
|
+
* builder pattern (see `schedule17Values`, `schedule18Values`, and the sibling
|
|
3291
|
+
* `schedule3Values` in `schedule3-other-deductions-credits.ts`). Kept in THIS
|
|
3292
|
+
* file rather than the shared filing module per the task instructions — other
|
|
3293
|
+
* agents are wiring their own schedules into `at1-schedule-line-items.ts`
|
|
3294
|
+
* concurrently.
|
|
3295
|
+
*
|
|
3296
|
+
* Emits every line `AlbertaSchedule5Result` carries a value for:
|
|
3297
|
+
* 005001, 005005, 005007, 005011, 005016, 005017, 005023, 005025, 005026,
|
|
3298
|
+
* 005027, 005100, and the successored-pool occurrences 005101-005140.
|
|
3299
|
+
*
|
|
3300
|
+
* NOT emitted, because the result does not retain them distinctly:
|
|
3301
|
+
* 005031-005043 (Area B predecessor-transfer detail and the opening pool
|
|
3302
|
+
* balance) — the module aggregates both into 005011
|
|
3303
|
+
* (`attributedRoyaltyIncomeCarryForwardIn`) and does not carry the
|
|
3304
|
+
* per-predecessor breakdown or the raw opening balance forward into the
|
|
3305
|
+
* result; and 005200, which gates whether the successored sections are
|
|
3306
|
+
* processed at all but is not itself a filed dollar/detail line.
|
|
3307
|
+
*/
|
|
3308
|
+
interface At1ScheduleValueLike$5 {
|
|
3309
|
+
lineItemId: string;
|
|
3310
|
+
value: string | number;
|
|
3311
|
+
}
|
|
3312
|
+
interface At1ScheduleDataLike$5 {
|
|
3313
|
+
scheduleId: string;
|
|
3314
|
+
values: At1ScheduleValueLike$5[];
|
|
3315
|
+
}
|
|
3316
|
+
declare function schedule5Values(result: AlbertaSchedule5Result): At1ScheduleDataLike$5;
|
|
3317
|
+
//#endregion
|
|
3318
|
+
//#region src/t2/at1/schedules/schedule6-royalty-tax-credit.d.ts
|
|
3319
|
+
/**
|
|
3320
|
+
* Alberta AT1 Schedule 6 — Alberta Royalty Tax Credit.
|
|
3321
|
+
*
|
|
3322
|
+
* TRA spec §3.2.3.7 (Chapter 3, lines 6292-6653). Required "If the corp, for
|
|
3323
|
+
* the taxation year, has incurred Alberta Crown Royalty in respect of a
|
|
3324
|
+
* royalty receivable by or payable to Alberta under a lease or licence
|
|
3325
|
+
* granting petroleum rights, natural gas rights or petroleum and natural gas
|
|
3326
|
+
* rights" (spec lines 6342-6361). Two filing preconditions worth carrying
|
|
3327
|
+
* into any caller, neither of which this pure module can enforce itself:
|
|
3328
|
+
* **AT1 Schedule 7 must be completed before Schedule 6** ("IF FORM 007 IS NOT
|
|
3329
|
+
* INCLUDED WITH FORMS 005 AND/OR 006, THEN THE CLIENT'S RTC ENTITLEMENT WILL
|
|
3330
|
+
* BE DISALLOWED" — spec lines 6710-6715), and the completed form "must be
|
|
3331
|
+
* submitted to Treasury Board and Finance within three years of the taxation
|
|
3332
|
+
* year end in which the Alberta Crown Royalty was incurred" (spec lines
|
|
3333
|
+
* 6354-6360).
|
|
3334
|
+
*
|
|
3335
|
+
* ── The four fields this schedule's own MAPPINGS table actually defines ────
|
|
3336
|
+
*
|
|
3337
|
+
* 006002 ARTC Is the corp associated with one or more corporations that
|
|
3338
|
+
* have incurred Alberta Crown Royalty in the year? 1 = Yes,
|
|
3339
|
+
* default 2 = No. (spec lines 6363-6373)
|
|
3340
|
+
* 006004 Alberta Crown Royalty incurred in the taxation year:
|
|
3341
|
+
* 007003 + Σ007077 − Σ007087 + Σ007089. (spec lines 6375-6384)
|
|
3342
|
+
* 006006 Crown Royalty Shelter — see below. (spec lines 6443-6448)
|
|
3343
|
+
* 006008 Weighted Average Rate — see below. (spec lines 6450-6464)
|
|
3344
|
+
*
|
|
3345
|
+
* plus two sections that exist ONLY when 006002 = 1 (associated):
|
|
3346
|
+
*
|
|
3347
|
+
* ACRS (006022-006028) — the ASSOCIATED corporation with the longest
|
|
3348
|
+
* taxation year: its Corporate Account Number, tax year dates, and
|
|
3349
|
+
* the number of days in that year (max 365). (spec lines 6466-6558)
|
|
3350
|
+
* AACRS (006030-006034) — the $2,000,000 shelter pool, sized by the
|
|
3351
|
+
* longest associated year (006028), ALLOCATED among the associated
|
|
3352
|
+
* group. Sort such that the FIRST occurrence (006030001) is the
|
|
3353
|
+
* corporation filing this return — 006006 (this filer's own
|
|
3354
|
+
* shelter) then equals 006034001 exactly. Each allocation, and the
|
|
3355
|
+
* sum of all allocations, is capped at $2,000,000 ×
|
|
3356
|
+
* (006028 / 365). (spec lines 6559-6652)
|
|
3357
|
+
*
|
|
3358
|
+
* ── 006004 is accepted as a plain input, not re-derived here ───────────────
|
|
3359
|
+
*
|
|
3360
|
+
* Every term of 006004's formula (007003, 007077, 007087, 007089) lives on
|
|
3361
|
+
* AT1 Schedule 7, which this package also implements
|
|
3362
|
+
* (`schedule7-royalty-supplemental.ts`). Rather than re-import Schedule 7's
|
|
3363
|
+
* internals here, `albertaCrownRoyaltyIncurred` is taken as a plain numeric
|
|
3364
|
+
* input — pass `computeAlbertaSchedule7(...).albertaCrownRoyaltyForSchedule6`,
|
|
3365
|
+
* which computes that exact formula. This mirrors how AT1 Schedule 20 takes
|
|
3366
|
+
* its Schedule 12 income ceiling as a plain input rather than importing
|
|
3367
|
+
* Schedule 12: the two schedules stay independently testable, and the wiring
|
|
3368
|
+
* between them is the caller's job (`alberta-return.ts`), not this module's.
|
|
3369
|
+
*
|
|
3370
|
+
* ── 006006 Crown Royalty Shelter — two mutually exclusive paths ────────────
|
|
3371
|
+
*
|
|
3372
|
+
* associated (006002 = 1): 006006 = 006034001 (this filer's own
|
|
3373
|
+
* allocation from the AACRS pool below)
|
|
3374
|
+
* not associated (006002 = 2): 006006 = $2,000,000 × (days in this corp's
|
|
3375
|
+
* own taxation year, max 365) / 365
|
|
3376
|
+
*
|
|
3377
|
+
* ── 006008 Weighted Average Rate — an EXTERNAL rate table, not computed ─────
|
|
3378
|
+
*
|
|
3379
|
+
* "For each calendar quarter that the taxation year spans, enter the sum of
|
|
3380
|
+
* the number of days in the taxation year that fall within the calendar
|
|
3381
|
+
* quarter / total number of days in the taxation year X RTC quarterly rate
|
|
3382
|
+
* ... Note that the rate can be found on website:
|
|
3383
|
+
* http://www.finance.alberta.ca/publications/tax_rebates/rates/rtc1.html"
|
|
3384
|
+
* (spec lines 6450-6464). The RTC quarterly rate itself is a published
|
|
3385
|
+
* external figure this engine has no source for; `quarters` therefore takes
|
|
3386
|
+
* BOTH the day-count weight and the already-looked-up rate per quarter, and
|
|
3387
|
+
* this module only does the weighting arithmetic the spec states, to 4
|
|
3388
|
+
* decimal places (e.g. `.7500`, `.6667`).
|
|
3389
|
+
*
|
|
3390
|
+
* ── CONFIRMED: there is no "credit" dollar amount to compute here ──────────
|
|
3391
|
+
*
|
|
3392
|
+
* The transcribed range for this schedule (spec lines 6292-6653) ends after
|
|
3393
|
+
* 006034 with no field that multiplies the weighted average rate (006008) by
|
|
3394
|
+
* the royalty incurred (006004) or the shelter (006006) into a claimable
|
|
3395
|
+
* credit — and this is not a transcription gap. Traced through the AT1
|
|
3396
|
+
* jacket's own MAPPINGS (spec §3.2.3.1): the balance-owing reconciliation is
|
|
3397
|
+
* `090 = 080 − (081 + 082 + 085 + 086 + 087)`, where 080 is Alberta Tax
|
|
3398
|
+
* Payable, 081 is the SR&ED credit (form 009), 082 is "Instalments and other
|
|
3399
|
+
* payments **and ARTC instalments** credited to income tax account for this
|
|
3400
|
+
* taxation year" — a single, plain, preparer-entered figure — and 086/087 are
|
|
3401
|
+
* the capital gains refund and other credits. No line in that sequence reads
|
|
3402
|
+
* "if form 006 exists, value = ...", unlike every other schedule's credit
|
|
3403
|
+
* (see 072 = form 004, 074 = form 008, 081 = form 009).
|
|
3404
|
+
*
|
|
3405
|
+
* The Alberta Royalty Tax Credit is administered as an INSTALMENT PROGRAM,
|
|
3406
|
+
* not an annual claimed credit: TRA pays or credits ARTC instalments to the
|
|
3407
|
+
* corporation during the year based on estimated entitlement, and the
|
|
3408
|
+
* corporation simply reports what it already received at line 082 (already
|
|
3409
|
+
* collected in this app's shared "Payments & Instalments" schedule) — it
|
|
3410
|
+
* does not compute a fresh credit from Schedule 6/7's own figures on this
|
|
3411
|
+
* return. Schedule 6/7 exist to establish the royalty amount, shelter and
|
|
3412
|
+
* rate TRA uses to determine those instalments (and to support TRA's own
|
|
3413
|
+
* assessment), not to produce a number the corporation deducts here. So this
|
|
3414
|
+
* module correctly stops at the three components (006004, 006006, 006008)
|
|
3415
|
+
* — that is the schedule's whole job.
|
|
3416
|
+
*
|
|
3417
|
+
* Whole dollars, pure.
|
|
3418
|
+
*/
|
|
3419
|
+
/** ACRS (006022-006028) — the associated corporation with the longest taxation year. */
|
|
3420
|
+
interface RoyaltyTaxCreditLongestAssociatedYear {
|
|
3421
|
+
/** 006022 — Alberta Corporate Account Number of that corporation. */
|
|
3422
|
+
albertaCan?: string;
|
|
3423
|
+
/** 006024 — that corporation's taxation year beginning, ISO `YYYY-MM-DD`. */
|
|
3424
|
+
taxationYearBeginning?: string;
|
|
3425
|
+
/** 006026 — that corporation's taxation year ending, ISO `YYYY-MM-DD`. */
|
|
3426
|
+
taxationYearEnding?: string;
|
|
3427
|
+
/** 006028 — number of days in that taxation year, capped at 365 on the form. */
|
|
3428
|
+
days: number;
|
|
3429
|
+
}
|
|
3430
|
+
/** One row of the AACRS allocation table (006030-006034). */
|
|
3431
|
+
interface RoyaltyTaxCreditShelterAllocation {
|
|
3432
|
+
/** 006030 — name of the corporation. Sort so the FIRST row is the corporation filing this return. */
|
|
3433
|
+
name: string;
|
|
3434
|
+
/** 006032 — Alberta Corporate Account Number, if this row is not the filer. */
|
|
3435
|
+
albertaCan?: string;
|
|
3436
|
+
/** 006034 — amount of the $2,000,000 shelter pool allocated to this corporation. */
|
|
3437
|
+
allocatedAmount: number;
|
|
3438
|
+
}
|
|
3439
|
+
/** One resolved allocation row, after the per-row and aggregate caps are applied. */
|
|
3440
|
+
interface RoyaltyTaxCreditShelterAllocationResult {
|
|
3441
|
+
name: string;
|
|
3442
|
+
albertaCan?: string;
|
|
3443
|
+
/** 006034, capped at the pool per row. See `AlbertaSchedule6Result.issues` if capping occurred. */
|
|
3444
|
+
allocatedAmount: number;
|
|
3445
|
+
/** What was actually requested before capping, for the audit trail. */
|
|
3446
|
+
requestedAmount: number;
|
|
3447
|
+
}
|
|
3448
|
+
/** One quarter the taxation year spans, for the 006008 weighted-average-rate calculation. */
|
|
3449
|
+
interface RoyaltyTaxCreditQuarter {
|
|
3450
|
+
/** Number of days in the taxation year that fall within this calendar quarter. */
|
|
3451
|
+
days: number;
|
|
3452
|
+
/** The published RTC quarterly rate for this calendar quarter, as a decimal (e.g. 0.0473). */
|
|
3453
|
+
rate: number;
|
|
3454
|
+
}
|
|
3455
|
+
interface AlbertaSchedule6Input {
|
|
3456
|
+
/** 006002 — is the corp associated with one or more corporations that incurred Alberta Crown Royalty in the year? Defaults to No. */
|
|
3457
|
+
associatedWithCrownRoyaltyCorporations?: boolean;
|
|
3458
|
+
/**
|
|
3459
|
+
* 006004 — Alberta Crown Royalty incurred in the taxation year. Pass
|
|
3460
|
+
* `computeAlbertaSchedule7(...).albertaCrownRoyaltyForSchedule6`; see the
|
|
3461
|
+
* module docstring for why this is a plain input rather than re-derived.
|
|
3462
|
+
*/
|
|
3463
|
+
albertaCrownRoyaltyIncurred?: number;
|
|
3464
|
+
/**
|
|
3465
|
+
* Days in THIS corporation's own taxation year — used only on the
|
|
3466
|
+
* NOT-associated shelter path (006002 = 2). Defaults to 365 (a full year)
|
|
3467
|
+
* and is capped at 365, per the form's own "(max 365)".
|
|
3468
|
+
*/
|
|
3469
|
+
taxationYearDays?: number;
|
|
3470
|
+
/** ACRS — required when `associatedWithCrownRoyaltyCorporations` is true. */
|
|
3471
|
+
longestAssociatedYear?: RoyaltyTaxCreditLongestAssociatedYear;
|
|
3472
|
+
/**
|
|
3473
|
+
* AACRS — required when `associatedWithCrownRoyaltyCorporations` is true.
|
|
3474
|
+
* The FIRST entry must be the corporation filing this return — its
|
|
3475
|
+
* (possibly capped) `allocatedAmount` becomes 006006.
|
|
3476
|
+
*/
|
|
3477
|
+
allocations?: readonly RoyaltyTaxCreditShelterAllocation[];
|
|
3478
|
+
/** 006008 — one entry per calendar quarter the taxation year spans. */
|
|
3479
|
+
quarters?: readonly RoyaltyTaxCreditQuarter[];
|
|
3480
|
+
}
|
|
3481
|
+
interface AlbertaSchedule6Result {
|
|
3482
|
+
/** 006002. */
|
|
3483
|
+
associatedWithCrownRoyaltyCorporations: boolean;
|
|
3484
|
+
/** 006004. */
|
|
3485
|
+
albertaCrownRoyaltyIncurred: number;
|
|
3486
|
+
/** 006006. */
|
|
3487
|
+
crownRoyaltyShelter: number;
|
|
3488
|
+
/** 006008, to 4 decimal places. */
|
|
3489
|
+
weightedAverageRate: number;
|
|
3490
|
+
/** ACRS, echoed through with `days` resolved — present only when associated. */
|
|
3491
|
+
longestAssociatedYear?: RoyaltyTaxCreditLongestAssociatedYear;
|
|
3492
|
+
/** The $2,000,000 × (006028 / 365) pool being allocated — present only when associated. */
|
|
3493
|
+
aggregateShelterPool: number;
|
|
3494
|
+
/** AACRS, after per-row and aggregate capping. */
|
|
3495
|
+
allocations: RoyaltyTaxCreditShelterAllocationResult[];
|
|
3496
|
+
/** Σ allocated (post-cap). Cannot exceed `aggregateShelterPool`. */
|
|
3497
|
+
totalAllocated: number;
|
|
3498
|
+
/** Whether Alberta Crown Royalty was incurred at all — the form's own trigger condition (spec lines 6342-6361), evaluated from `albertaCrownRoyaltyIncurred` alone. */
|
|
3499
|
+
formRequired: boolean;
|
|
3500
|
+
issues: string[];
|
|
3501
|
+
}
|
|
3502
|
+
/**
|
|
3503
|
+
* `scheduleNNValues` for Schedule 6, following the `at1-schedule-line-items.ts`
|
|
3504
|
+
* builder pattern (see `schedule3Values` in `schedule3-other-deductions-credits.ts`
|
|
3505
|
+
* for the identical local-type convention). Kept in THIS file rather than the
|
|
3506
|
+
* shared filing module — other agents edit `at1-schedule-line-items.ts`
|
|
3507
|
+
* concurrently.
|
|
3508
|
+
*/
|
|
3509
|
+
interface At1ScheduleValueLike$4 {
|
|
3510
|
+
lineItemId: string;
|
|
3511
|
+
value: string | number;
|
|
3512
|
+
}
|
|
3513
|
+
interface At1ScheduleDataLike$4 {
|
|
3514
|
+
scheduleId: string;
|
|
3515
|
+
values: At1ScheduleValueLike$4[];
|
|
3516
|
+
}
|
|
3517
|
+
/**
|
|
3518
|
+
* Emits every field this module's own MAPPINGS transcription actually defines
|
|
3519
|
+
* a number for: 006002/004/006/008, and — only when the corporation is
|
|
3520
|
+
* associated — the ACRS section (006022-028) and the AACRS allocation table
|
|
3521
|
+
* (006030-034, one occurrence per row).
|
|
3522
|
+
*
|
|
3523
|
+
* ── No credit amount is filed here, because none exists on this schedule ────
|
|
3524
|
+
*
|
|
3525
|
+
* See the module docstring's "CONFIRMED: there is no 'credit' dollar amount
|
|
3526
|
+
* to compute here" section — the Alberta Royalty Tax Credit is an instalment
|
|
3527
|
+
* program (AT1 jacket line 000082, the shared "Payments & Instalments"
|
|
3528
|
+
* schedule), not a value Schedule 6 computes and files. This builder emits
|
|
3529
|
+
* exactly the three components the schedule DOES define (006004, 006006,
|
|
3530
|
+
* 006008) plus the ACRS/AACRS detail when associated — matching
|
|
3531
|
+
* `schedule3Values`'s `At1ScheduleDataLike` shape exactly: `{ scheduleId,
|
|
3532
|
+
* values }`.
|
|
3533
|
+
*/
|
|
3534
|
+
declare function schedule6Values(result: AlbertaSchedule6Result): At1ScheduleDataLike$4;
|
|
3535
|
+
declare function computeAlbertaSchedule6(input: AlbertaSchedule6Input): AlbertaSchedule6Result;
|
|
3536
|
+
//#endregion
|
|
3537
|
+
//#region src/t2/at1/schedules/schedule7-royalty-supplemental.d.ts
|
|
3538
|
+
/**
|
|
3539
|
+
* Alberta AT1 Schedule 7 — Alberta Royalty Tax Credit/Deduction Supplemental
|
|
3540
|
+
* Information.
|
|
3541
|
+
*
|
|
3542
|
+
* TRA spec §3.2.3.8 (Chapter 3, lines 6654-7251). Schedule 7 is not itself a
|
|
3543
|
+
* claim — it is the disclosure schedule that supports BOTH AT1 Schedule 5
|
|
3544
|
+
* (Royalty Tax Deduction) and AT1 Schedule 6 (Royalty Tax Credit): "If there
|
|
3545
|
+
* is a requirement for forms 005 and/or form 006, then form 007 must be
|
|
3546
|
+
* completed. IF FORM 007 IS NOT INCLUDED WITH FORMS 005 AND/OR 006, THEN THE
|
|
3547
|
+
* CLIENT'S RTC ENTITLEMENT WILL BE DISALLOWED" (spec lines 6704-6715).
|
|
3548
|
+
* Schedule 5 is built independently by another module in this package; this
|
|
3549
|
+
* one only produces the figures Schedule 5 and Schedule 6 each cite as coming
|
|
3550
|
+
* "from Schedule 7".
|
|
3551
|
+
*
|
|
3552
|
+
* ── Structure ────────────────────────────────────────────────────────────
|
|
3553
|
+
*
|
|
3554
|
+
* CPI (Crown Payment Information, 007003-007029) — the corporation's own
|
|
3555
|
+
* crown charges, transcribed line by line from the income statement
|
|
3556
|
+
* (fed form 125) and balance sheet (fed form 100).
|
|
3557
|
+
* PITI (Partnership Income Tax Information, 007071-007081) — one row per
|
|
3558
|
+
* partnership the corporation is a member of, repeating.
|
|
3559
|
+
* ACRA (Adjustments to ACR Reported in the Current year but Relating to
|
|
3560
|
+
* prior taxation years, 007083-007091) — one row per prior-year
|
|
3561
|
+
* correction, repeating.
|
|
3562
|
+
*
|
|
3563
|
+
* ── Two totals with NO defining row of their own in this MAPPINGS table ────
|
|
3564
|
+
*
|
|
3565
|
+
* Both totals below are cited BY NAME from other schedules' own field
|
|
3566
|
+
* definitions elsewhere in the same spec document, but neither has its own
|
|
3567
|
+
* row inside Schedule 7's MAPPINGS block (spec lines 6654-7251, the full
|
|
3568
|
+
* extent of Schedule 7 in this document) — the field numbering jumps
|
|
3569
|
+
* 007051 → 007071 with no 007061 row ever printed, even though line 061 is
|
|
3570
|
+
* referenced as an existing, fully-defined line. Both are modelled here
|
|
3571
|
+
* because their formulas are stated explicitly elsewhere in the spec, not
|
|
3572
|
+
* guessed:
|
|
3573
|
+
*
|
|
3574
|
+
* **007051** ("Total Adjustments to current year Alberta Crown Royalty due
|
|
3575
|
+
* to adjustments from Prior Production Years") DOES have its own row
|
|
3576
|
+
* (spec lines 6939-6947):
|
|
3577
|
+
* 051 = Σ (007087 − 007089 + 007091), default zero if no ACRA rows.
|
|
3578
|
+
*
|
|
3579
|
+
* **007061** has no row in 6654-7251, but AT1 Schedule 5's own field 005001
|
|
3580
|
+
* ("Crown charges") cites it verbatim, formula included in full (spec
|
|
3581
|
+
* lines 5237-5248, inside Schedule 5's own MAPPINGS block, not Schedule
|
|
3582
|
+
* 7's):
|
|
3583
|
+
* "Enter the amount from Schedule 7, line 061.
|
|
3584
|
+
* 007003 + 007005 + 007007 + 007009 + 007011 + 007013 + 007017 +
|
|
3585
|
+
* 007025 + 007029 + (sum of all 007077) + (sum of all 007079) +
|
|
3586
|
+
* (sum of all 007081) − 007051
|
|
3587
|
+
* if negative, default to zero."
|
|
3588
|
+
* The "if negative, default to zero" step is Schedule 5's own 005001 rule
|
|
3589
|
+
* (confirmed against the Schedule 5 module in this package, which applies
|
|
3590
|
+
* that floor itself), so `crownChargesNetOfReimbursements` here is left
|
|
3591
|
+
* SIGNED — un-floored — and the floor is Schedule 5's job, not this
|
|
3592
|
+
* module's.
|
|
3593
|
+
*
|
|
3594
|
+
* ── A sign asymmetry between 007051 and 006004, not resolved here ──────────
|
|
3595
|
+
*
|
|
3596
|
+
* AT1 Schedule 6's own field 006004 ("Alberta Crown Royalty incurred in the
|
|
3597
|
+
* taxation year") is defined, also elsewhere in the spec (Schedule 6's own
|
|
3598
|
+
* block, lines 6375-6384), as:
|
|
3599
|
+
*
|
|
3600
|
+
* 006004 = 007003 + (sum of all 007077) − (sum of all 007087)
|
|
3601
|
+
* + (sum of all 007089)
|
|
3602
|
+
*
|
|
3603
|
+
* That is the OPPOSITE sign treatment of 007087/007089 from 007051 above
|
|
3604
|
+
* (which adds 087 and subtracts 089). Both formulas are transcribed exactly
|
|
3605
|
+
* as printed — this module does not "correct" the apparent inversion, and
|
|
3606
|
+
* `albertaCrownRoyaltyForSchedule6` and `totalAdjustments` are computed
|
|
3607
|
+
* independently, each per its own literal spec text. Flagged for the filer
|
|
3608
|
+
* to confirm against the live form rather than silently normalized.
|
|
3609
|
+
*
|
|
3610
|
+
* ── Cross-reference to Schedule 5 (built independently, out of scope here) ──
|
|
3611
|
+
*
|
|
3612
|
+
* `totalPartnershipShareOtherCrownCharges` (Σ007081, "corporation's share of
|
|
3613
|
+
* other Crown charges eligible for Royalty Tax Deduction") feeds Schedule 5,
|
|
3614
|
+
* not this schedule — it is exposed here purely as data collected on this
|
|
3615
|
+
* form, computed and passed through, never consumed by Schedule 6 or by any
|
|
3616
|
+
* calculation inside this module.
|
|
3617
|
+
*
|
|
3618
|
+
* Whole dollars, pure.
|
|
3619
|
+
*/
|
|
3620
|
+
/** One partnership the corporation is a member of (PITI, 007071-007081). */
|
|
3621
|
+
interface RoyaltySupplementalPartnership {
|
|
3622
|
+
/** 007071 — legal name of the partnership. */
|
|
3623
|
+
name: string;
|
|
3624
|
+
/** 007073 — corporation's percentage interest, as a decimal (0.75, not 75). Expressed to 4 decimal places on the form. */
|
|
3625
|
+
interestPercent: number;
|
|
3626
|
+
/** 007075 — partnership fiscal period end, ISO `YYYY-MM-DD`. */
|
|
3627
|
+
fiscalPeriodEnd?: string;
|
|
3628
|
+
/** 007077 — corporation's share of Alberta Crown Royalties eligible for the Royalty Tax Credit. */
|
|
3629
|
+
shareEligibleForCredit?: number;
|
|
3630
|
+
/** 007079 — corporation's share of other royalties paid to Alberta not eligible for the Royalty Tax Credit. */
|
|
3631
|
+
shareOtherRoyaltiesNotEligible?: number;
|
|
3632
|
+
/**
|
|
3633
|
+
* 007081 — corporation's share of other Crown charges eligible for the
|
|
3634
|
+
* Royalty Tax Deduction. Feeds AT1 Schedule 5 (built independently); not
|
|
3635
|
+
* used anywhere in this module's own arithmetic beyond being summed and
|
|
3636
|
+
* passed through.
|
|
3637
|
+
*/
|
|
3638
|
+
shareOtherCrownChargesEligibleForDeduction?: number;
|
|
3639
|
+
}
|
|
3640
|
+
/** One resolved partnership row. */
|
|
3641
|
+
interface RoyaltySupplementalPartnershipResult {
|
|
3642
|
+
name: string;
|
|
3643
|
+
interestPercent: number;
|
|
3644
|
+
fiscalPeriodEnd?: string;
|
|
3645
|
+
shareEligibleForCredit: number;
|
|
3646
|
+
shareOtherRoyaltiesNotEligible: number;
|
|
3647
|
+
shareOtherCrownChargesEligibleForDeduction: number;
|
|
3648
|
+
}
|
|
3649
|
+
/**
|
|
3650
|
+
* One prior-year Alberta Crown Royalty adjustment reported in the current
|
|
3651
|
+
* accounting period (ACRA, 007083-007091).
|
|
3652
|
+
*/
|
|
3653
|
+
interface RoyaltySupplementalPriorYearAdjustment {
|
|
3654
|
+
/** 007083 — the prior production period (taxation year end) the adjustment relates to, ISO `YYYY-MM-DD`. */
|
|
3655
|
+
priorProductionPeriodEnd?: string;
|
|
3656
|
+
/** 007085 — 1 = Department of Resource Development (formerly Energy), 2 = Operator. */
|
|
3657
|
+
sourceOfAdjustment?: 1 | 2;
|
|
3658
|
+
/** 007087 — amount of INCREASE to eligible crown royalties for that prior year (positive magnitude). */
|
|
3659
|
+
increase?: number;
|
|
3660
|
+
/** 007089 — amount of DECREASE to eligible crown royalties for that prior year (positive magnitude). */
|
|
3661
|
+
decrease?: number;
|
|
3662
|
+
/** 007091 — signed adjustment to the amount NOT eligible for the Royalty Tax Credit for that prior year. */
|
|
3663
|
+
adjustmentNotEligibleForCredit?: number;
|
|
3664
|
+
}
|
|
3665
|
+
/** One resolved prior-year adjustment row. */
|
|
3666
|
+
interface RoyaltySupplementalPriorYearAdjustmentResult {
|
|
3667
|
+
priorProductionPeriodEnd?: string;
|
|
3668
|
+
sourceOfAdjustment?: 1 | 2;
|
|
3669
|
+
increase: number;
|
|
3670
|
+
decrease: number;
|
|
3671
|
+
adjustmentNotEligibleForCredit: number;
|
|
3672
|
+
}
|
|
3673
|
+
interface AlbertaSchedule7Input {
|
|
3674
|
+
/** 007003 — Alberta crown royalty eligible for the Royalty Tax Credit, from the income statement (fed form 125). */
|
|
3675
|
+
eligibleCrownRoyalty?: number;
|
|
3676
|
+
/** 007005 — other royalties paid to Alberta not eligible for the Royalty Tax Credit (fed form 125). */
|
|
3677
|
+
otherRoyaltiesNotEligible?: number;
|
|
3678
|
+
/** 007007 — crown royalty paid to other provincial or federal jurisdictions (fed form 125). */
|
|
3679
|
+
royaltyPaidToOtherJurisdictions?: number;
|
|
3680
|
+
/** 007009 — non-deductible crown lease rentals (fed form 125). */
|
|
3681
|
+
nonDeductibleCrownLeaseRentals?: number;
|
|
3682
|
+
/** 007011 — mineral taxes (fed form 125). */
|
|
3683
|
+
mineralTaxes?: number;
|
|
3684
|
+
/** 007013 — Saskatchewan resources surcharge, non-deductible portion only (fed form 125). */
|
|
3685
|
+
saskatchewanResourcesSurcharge?: number;
|
|
3686
|
+
/** 007014 / 007015 / 007016 — up to three names of other non-deductible crown charge types (fed form 125). */
|
|
3687
|
+
otherNonDeductibleCrownChargeTypes?: readonly string[];
|
|
3688
|
+
/**
|
|
3689
|
+
* 007017 — total dollar amount of the other non-deductible crown charges
|
|
3690
|
+
* named above. The spec sums the underlying source-document amounts for
|
|
3691
|
+
* whichever types are named; those per-type amounts are not themselves
|
|
3692
|
+
* separate transmitted fields, so the total is taken as a pass-through
|
|
3693
|
+
* input. Defaults to zero when no types are named, per spec.
|
|
3694
|
+
*/
|
|
3695
|
+
otherNonDeductibleCrownCharges?: number;
|
|
3696
|
+
/** 007025 — crown lease rentals capitalized during the year on non-producing properties, non-deductible portion (balance sheet, fed form 100). */
|
|
3697
|
+
crownLeaseRentalsCapitalized?: number;
|
|
3698
|
+
/** 007027 — name of another balance sheet (fed form 100) eligible deduction. */
|
|
3699
|
+
otherBalanceSheetDeductionName?: string;
|
|
3700
|
+
/** 007029 — dollar amount of the deduction named at 007027. Defaults to zero when no name is given, per spec. */
|
|
3701
|
+
otherBalanceSheetDeduction?: number;
|
|
3702
|
+
/** PITI — one row per partnership the corporation is a member of. */
|
|
3703
|
+
partnerships?: readonly RoyaltySupplementalPartnership[];
|
|
3704
|
+
/** ACRA — one row per prior-year Alberta Crown Royalty adjustment reported in the current year. */
|
|
3705
|
+
priorYearAdjustments?: readonly RoyaltySupplementalPriorYearAdjustment[];
|
|
3706
|
+
}
|
|
3707
|
+
interface AlbertaSchedule7Result {
|
|
3708
|
+
eligibleCrownRoyalty: number;
|
|
3709
|
+
otherRoyaltiesNotEligible: number;
|
|
3710
|
+
royaltyPaidToOtherJurisdictions: number;
|
|
3711
|
+
nonDeductibleCrownLeaseRentals: number;
|
|
3712
|
+
mineralTaxes: number;
|
|
3713
|
+
saskatchewanResourcesSurcharge: number;
|
|
3714
|
+
otherNonDeductibleCrownChargeTypes: string[];
|
|
3715
|
+
/** 007017. */
|
|
3716
|
+
otherNonDeductibleCrownCharges: number;
|
|
3717
|
+
crownLeaseRentalsCapitalized: number;
|
|
3718
|
+
otherBalanceSheetDeductionName?: string;
|
|
3719
|
+
/** 007029. */
|
|
3720
|
+
otherBalanceSheetDeduction: number;
|
|
3721
|
+
partnerships: RoyaltySupplementalPartnershipResult[];
|
|
3722
|
+
/** Σ 007077 across all partnerships. */
|
|
3723
|
+
totalPartnershipShareEligibleForCredit: number;
|
|
3724
|
+
/** Σ 007079 across all partnerships. */
|
|
3725
|
+
totalPartnershipShareOtherRoyaltiesNotEligible: number;
|
|
3726
|
+
/** Σ 007081 across all partnerships — feeds AT1 Schedule 5, not used here. */
|
|
3727
|
+
totalPartnershipShareOtherCrownCharges: number;
|
|
3728
|
+
priorYearAdjustments: RoyaltySupplementalPriorYearAdjustmentResult[];
|
|
3729
|
+
/** 007051 = Σ (087 − 089 + 091). */
|
|
3730
|
+
totalAdjustments: number;
|
|
3731
|
+
/**
|
|
3732
|
+
* 007061 — no defining row in this schedule's own MAPPINGS block; formula
|
|
3733
|
+
* transcribed from AT1 Schedule 5's field 005001 definition, which cites it
|
|
3734
|
+
* as "Schedule 7, line 061" in full. Left SIGNED — Schedule 5 applies its
|
|
3735
|
+
* own floor at zero.
|
|
3736
|
+
*/
|
|
3737
|
+
crownChargesNetOfReimbursements: number;
|
|
3738
|
+
/**
|
|
3739
|
+
* AT1 Schedule 6's 006004 ("Alberta Crown Royalty incurred in the taxation
|
|
3740
|
+
* year"): 007003 + Σ077 − Σ087 + Σ089. Pass this into
|
|
3741
|
+
* `computeAlbertaSchedule6`'s `albertaCrownRoyaltyIncurred` input.
|
|
3742
|
+
*/
|
|
3743
|
+
albertaCrownRoyaltyForSchedule6: number;
|
|
3744
|
+
issues: string[];
|
|
3745
|
+
}
|
|
3746
|
+
/**
|
|
3747
|
+
* `scheduleNNValues` for Schedule 7, following the `at1-schedule-line-items.ts`
|
|
3748
|
+
* builder pattern (see `schedule3Values` in `schedule3-other-deductions-credits.ts`
|
|
3749
|
+
* for the identical local-type convention this file reuses). Kept in THIS
|
|
3750
|
+
* file rather than the shared filing module — other agents edit
|
|
3751
|
+
* `at1-schedule-line-items.ts` concurrently.
|
|
3752
|
+
*/
|
|
3753
|
+
interface At1ScheduleValueLike$3 {
|
|
3754
|
+
lineItemId: string;
|
|
3755
|
+
value: string | number;
|
|
3756
|
+
}
|
|
3757
|
+
interface At1ScheduleDataLike$3 {
|
|
3758
|
+
scheduleId: string;
|
|
3759
|
+
values: At1ScheduleValueLike$3[];
|
|
3760
|
+
}
|
|
3761
|
+
/**
|
|
3762
|
+
* Emits CPI (007003-029), the computed totals 007051 and 007061, and the two
|
|
3763
|
+
* repeating sections — PITI (007071-081, one occurrence per partnership) and
|
|
3764
|
+
* ACRA (007083-091, one occurrence per prior-year adjustment).
|
|
3765
|
+
*
|
|
3766
|
+
* 007061 is filed even though it has no defining row of its own anywhere in
|
|
3767
|
+
* this schedule's MAPPINGS block (spec lines 6654-7251) — see the module
|
|
3768
|
+
* docstring's "Two totals with NO defining row of their own in this MAPPINGS
|
|
3769
|
+
* table" section. It is a real Schedule 7 output line: AT1 Schedule 5's own
|
|
3770
|
+
* field 005001 definition (spec lines 5237-5248) names it explicitly as
|
|
3771
|
+
* "Schedule 7, line 061" and gives its formula in full, so it is filed here
|
|
3772
|
+
* under that citation rather than omitted for lack of a home row.
|
|
3773
|
+
*/
|
|
3774
|
+
declare function schedule7Values(result: AlbertaSchedule7Result): At1ScheduleDataLike$3;
|
|
3775
|
+
declare function computeAlbertaSchedule7(input: AlbertaSchedule7Input): AlbertaSchedule7Result;
|
|
3776
|
+
//#endregion
|
|
3777
|
+
//#region src/t2/at1/schedules/schedule8-political-contributions.d.ts
|
|
3778
|
+
/**
|
|
3779
|
+
* Alberta AT1 Schedule 8 — Alberta Political Contributions Tax Credit.
|
|
3780
|
+
*
|
|
3781
|
+
* Schedule 8 itself (TRA spec §3.2.3.9, lines 7252-7450, form "008") is a
|
|
3782
|
+
* detail schedule, not a calculation: it collects one PCD occurrence per
|
|
3783
|
+
* receipted contribution —
|
|
3784
|
+
*
|
|
3785
|
+
* 008002 name of party / constituency association / candidate M
|
|
3786
|
+
* 008004 official receipt number M
|
|
3787
|
+
* 008006 date of donation (the spec: "do not let ... blank") M
|
|
3788
|
+
* 008008 donation amount M
|
|
3789
|
+
*
|
|
3790
|
+
* — plus two APC (Alberta Political Contributions) totals for contributions
|
|
3791
|
+
* made THROUGH A PARTNERSHIP, sourced from federal form T5013 and not
|
|
3792
|
+
* derivable from anything else in this schedule:
|
|
3793
|
+
*
|
|
3794
|
+
* 008012 partnership contributions made in 2003 or earlier (T5013 box 37)
|
|
3795
|
+
* 008013 partnership contributions made in 2004 or later (T5013)
|
|
3796
|
+
*
|
|
3797
|
+
* The actual TIERED CREDIT FORMULA that turns those totals into a dollar
|
|
3798
|
+
* credit is not on Schedule 8's own line map at all — it lives on the AT1
|
|
3799
|
+
* JACKET, line 000074 (§3.2.3.1, "AT1 - Alberta Corporate Income Tax Return"),
|
|
3800
|
+
* which consumes Schedule 8's own totals (008008, 008012, 008013). Because it
|
|
3801
|
+
* is entirely built from Schedule 8's own numbers and the module's name is
|
|
3802
|
+
* "the Alberta Political Contributions Tax Credit", it is reproduced here —
|
|
3803
|
+
* transcribed exactly, three rate periods:
|
|
3804
|
+
*
|
|
3805
|
+
* **All contributions made in 2003 or earlier:**
|
|
3806
|
+
* A = (sum of 008008) + 008012
|
|
3807
|
+
* B = A ≤ $150 → A×.75 | A ≤ $825 → $112.50 + (A−150)×.50 | else $450 + (A−825)×.333
|
|
3808
|
+
* credit = least of B, $750, `000068 − (000070 + 000071 + 000072)`
|
|
3809
|
+
*
|
|
3810
|
+
* **All contributions made in 2004 or later:**
|
|
3811
|
+
* A = (sum of 008008) + 008013
|
|
3812
|
+
* B = A ≤ $200 → A×.75 | A ≤ $900 → $150 + (A−200)×.50 | else $600 + (A−900)×.333
|
|
3813
|
+
* credit = least of B, $1000, `000068 − (000070 + 000071 + 000072)`
|
|
3814
|
+
*
|
|
3815
|
+
* **Contributions made in BOTH 2003 and 2004, AND the tax year itself begins
|
|
3816
|
+
* in 2003 and ends in 2004** (a straddling fiscal year-end, not just mixed
|
|
3817
|
+
* donation dates):
|
|
3818
|
+
* X = (sum of 008008 dated in 2004 only) + 008013
|
|
3819
|
+
* Y = (sum of 008008) + 008012 + 008013
|
|
3820
|
+
* A = min(Y, 150); B = min(X−A, 50); C = min(Y−(A+B), 675)
|
|
3821
|
+
* D = min(X−(A+B+C), 225); E = min(Y−(A+B+C+D), 900); F = min(X−(A+B+C+D+E), 300)
|
|
3822
|
+
* credit = .75A + .75B + .50C + .50D + ⅓E + ⅓F
|
|
3823
|
+
* — the spec states NO $750/$1000/remaining-tax ceiling for this branch,
|
|
3824
|
+
* unlike the other two. Reproduced literally: this module does not invent
|
|
3825
|
+
* one. (Jacket line 080, "Alberta Tax Payable", cannot go negative, and
|
|
3826
|
+
* that reconciliation is enforced elsewhere, e.g. `at1-line-items.ts`'s
|
|
3827
|
+
* `At1TaxPayableMismatchError` — not this module's job.)
|
|
3828
|
+
*
|
|
3829
|
+
* If contributions span both periods WITHOUT the tax year itself straddling
|
|
3830
|
+
* 2003/2004, the spec defines no formula for that combination; this module
|
|
3831
|
+
* computes nothing and raises an issue rather than guessing which branch to
|
|
3832
|
+
* apply.
|
|
3833
|
+
*
|
|
3834
|
+
* `000068 − (000070 + 000071 + 000072)` (basic Alberta tax minus the small
|
|
3835
|
+
* business deduction, M&P profits deduction and foreign investment tax
|
|
3836
|
+
* credit) is an AT1 JACKET figure built from schedules this module doesn't
|
|
3837
|
+
* reach — taken here as a single `remainingBasicTax` input, following the
|
|
3838
|
+
* same fail-closed convention as `schedule20-donations.ts`'s `incomeLimit`:
|
|
3839
|
+
* absent means no claim for the two capped rate periods.
|
|
3840
|
+
*
|
|
3841
|
+
* Whole dollars, pure.
|
|
3842
|
+
*/
|
|
3843
|
+
interface PoliticalContributionInput {
|
|
3844
|
+
/** 008002 — name of the party, constituency association or candidate. */
|
|
3845
|
+
name: string;
|
|
3846
|
+
/** 008004 — official receipt number. */
|
|
3847
|
+
receiptNumber: string;
|
|
3848
|
+
/** 008006 — date of the official receipt, ISO `YYYY-MM-DD`. Mandatory per spec. */
|
|
3849
|
+
dateOfDonation: string;
|
|
3850
|
+
/** 008008 — donation amount. */
|
|
3851
|
+
amount: number;
|
|
3852
|
+
}
|
|
3853
|
+
interface Schedule8Input {
|
|
3854
|
+
/** One PCD occurrence per receipted contribution. */
|
|
3855
|
+
contributions: PoliticalContributionInput[];
|
|
3856
|
+
/**
|
|
3857
|
+
* 008012 — Alberta political contributions from a partnership made in 2003
|
|
3858
|
+
* or earlier, sourced from federal T5013 box 37. Defaults to nil.
|
|
3859
|
+
*/
|
|
3860
|
+
partnershipContributionsTo2003?: number;
|
|
3861
|
+
/**
|
|
3862
|
+
* 008013 — Alberta political contributions from a partnership made in 2004
|
|
3863
|
+
* or later, sourced from federal T5013. Defaults to nil.
|
|
3864
|
+
*/
|
|
3865
|
+
partnershipContributionsFrom2004?: number;
|
|
3866
|
+
/**
|
|
3867
|
+
* The corporation's tax year start/end, ISO `YYYY-MM-DD`. Needed ONLY to
|
|
3868
|
+
* confirm the third (straddling) rate-period formula applies — it
|
|
3869
|
+
* additionally requires the tax year itself to begin in 2003 and end in
|
|
3870
|
+
* 2004, not just that contribution dates span both years.
|
|
3871
|
+
*/
|
|
3872
|
+
taxYearBegin?: string;
|
|
3873
|
+
taxYearEnd?: string;
|
|
3874
|
+
/**
|
|
3875
|
+
* `000068 − (000070 + 000071 + 000072)` — remaining basic Alberta tax after
|
|
3876
|
+
* the small business deduction, M&P profits deduction and foreign
|
|
3877
|
+
* investment tax credit. Required for the 2003-or-earlier and
|
|
3878
|
+
* 2004-or-later rate periods, which the spec caps against it; absent means
|
|
3879
|
+
* no claim for those periods (fail closed). NOT applied to the straddling
|
|
3880
|
+
* period, which the spec states no ceiling for.
|
|
3881
|
+
*/
|
|
3882
|
+
remainingBasicTax?: number;
|
|
3883
|
+
}
|
|
3884
|
+
interface Schedule8Result {
|
|
3885
|
+
contributions: PoliticalContributionInput[];
|
|
3886
|
+
partnershipContributionsTo2003: number;
|
|
3887
|
+
partnershipContributionsFrom2004: number;
|
|
3888
|
+
/** Which of the three rate-period formulas applied, or 'none'. */
|
|
3889
|
+
period: 'to-2003' | 'from-2004' | 'straddle-2003-2004' | 'none';
|
|
3890
|
+
/** B in the to-2003/from-2004 branches, or the weighted A..F sum in the straddle branch — before any ceiling. */
|
|
3891
|
+
creditBeforeCeiling: number;
|
|
3892
|
+
/** 000074 (jacket) — the Alberta Political Contributions Tax Credit, after whatever ceiling applies. */
|
|
3893
|
+
credit: number;
|
|
3894
|
+
issues: string[];
|
|
3895
|
+
}
|
|
3896
|
+
declare function computeSchedule8(input: Schedule8Input): Schedule8Result;
|
|
3897
|
+
/**
|
|
3898
|
+
* Net File line items for AT1 Schedule 8: one PCD occurrence per contribution
|
|
3899
|
+
* (002 name, 004 receipt number, 006 date, 008 amount), plus the two APC
|
|
3900
|
+
* partnership totals (012, 013).
|
|
3901
|
+
*
|
|
3902
|
+
* Does NOT emit jacket line 000074 (the actual tax credit) — that is a
|
|
3903
|
+
* jacket line, not a Schedule 8 line. Use `result.credit` for that.
|
|
3904
|
+
*/
|
|
3905
|
+
declare function schedule8Values(result: Schedule8Result): At1ScheduleData;
|
|
3906
|
+
//#endregion
|
|
3907
|
+
//#region src/t2/at1/schedules/schedule9-sred-tax-credit.d.ts
|
|
3908
|
+
/**
|
|
3909
|
+
* AT1 Schedule 9 — Alberta Scientific Research & Experimental Development Tax
|
|
3910
|
+
* Credit.
|
|
3911
|
+
*
|
|
3912
|
+
* Alberta's OWN investment tax credit on SR&ED spending — not the same thing as
|
|
3913
|
+
* either of the two SR&ED-adjacent modules already in this package:
|
|
3914
|
+
*
|
|
3915
|
+
* • AT1 Schedule 16 (`schedule16-sred.ts`) — the Alberta SR&ED expenditure
|
|
3916
|
+
* **pool**, a deduction against income; and
|
|
3917
|
+
* • federal Schedule 31 (`t2/schedules/schedule31-sred-itc.ts`) — the FEDERAL
|
|
3918
|
+
* investment tax credit, computed under s.127/127.1 at 35%/15%.
|
|
3919
|
+
*
|
|
3920
|
+
* This module is Alberta's PARALLEL investment tax credit, at a flat 10% (line
|
|
3921
|
+
* 120, "lesser of line 009031 and 009108 X 10%") — an entirely separate credit
|
|
3922
|
+
* mechanism from the federal one, not a top-up or a share of it.
|
|
3923
|
+
*
|
|
3924
|
+
* **The credit is WOUND DOWN.** Per the spec's own framing text (TRA spec
|
|
3925
|
+
* §3.2.3.10, page 3-84): "eligible expenditures" are federal-expenditure amounts
|
|
3926
|
+
* "carried out in Alberta before January 1, 2020, [and] the SR&ED Tax Credit may
|
|
3927
|
+
* not be claimed in respect of any such expenditures carried out in Alberta after
|
|
3928
|
+
* that date." This module does not filter expenditures by date itself — the
|
|
3929
|
+
* `albertaPortionOfExpenditures` (005) input must already exclude anything
|
|
3930
|
+
* incurred after 2019-12-31. `taxationYearEnd` is accepted purely to raise a
|
|
3931
|
+
* reminder issue when the return's own year end falls after that cut-off, since
|
|
3932
|
+
* a straddling year is exactly where a preparer is most likely to include an
|
|
3933
|
+
* ineligible period by mistake.
|
|
3934
|
+
*
|
|
3935
|
+
* Line map (TRA spec §3.2.3.10, "Schedule 9 - Alberta Scientific Research &
|
|
3936
|
+
* Experimental Development Tax Credit", pp. 3-84 to 3-90):
|
|
3937
|
+
*
|
|
3938
|
+
* 009003 federal total qualified SR&ED expenditures (fed T661 line 559) M
|
|
3939
|
+
* 009005 portion of 003 incurred in Alberta X
|
|
3940
|
+
* 009007 deduct: federal prescribed proxy amount in the Alberta portion X
|
|
3941
|
+
* 009009 add: Alberta proxy amount X
|
|
3942
|
+
* 009011 add: Alberta SR&ED credit that reduced the federal expense X
|
|
3943
|
+
* on fed T661 line 559 in the taxation year
|
|
3944
|
+
* 009015 federal ITC received in the immediately preceding year X
|
|
3945
|
+
* (fed T661 line 435)
|
|
3946
|
+
* 009017 total Alberta-eligible expenditures for years in which the X
|
|
3947
|
+
* expenditure was incurred (009031 from all relevant years)
|
|
3948
|
+
* 009019 total federal expenditures for those same years (fed T661 X
|
|
3949
|
+
* line 570 from all relevant years)
|
|
3950
|
+
* 009023 deduct: Alberta portion of the prior-year federal ITC X
|
|
3951
|
+
* = 009015 x 009017 / 009019
|
|
3952
|
+
* 009025 add: Alberta portion of any repayment of assistance and X
|
|
3953
|
+
* contract payments relating to amounts in 009005
|
|
3954
|
+
* 009040 primary field of science or technology (1-4) M
|
|
3955
|
+
* 009100 associated with one or more corporations for SR&ED purposes? M
|
|
3956
|
+
* 009102 if associated: allocated amount from line 240 (page 3) X
|
|
3957
|
+
* 009104 if not associated: maximum expenditure limit = $4,000,000 x X
|
|
3958
|
+
* (days in the corporation's tax year / 365, max 365 or 366)
|
|
3959
|
+
* 009106 eligible expenditures for Alberta purposes = 009031 X
|
|
3960
|
+
* 009108 maximum expenditure limit for the year (102 or 104) M
|
|
3961
|
+
* 009112 recapture on disposal of Alberta SR&ED property O
|
|
3962
|
+
* 009116 less: Alberta portion of prior-year federal ITC (Schedule 9 X
|
|
3963
|
+
* Supplemental line 428 — only where the year end is on or
|
|
3964
|
+
* before 2012-03-31)
|
|
3965
|
+
* 009120 NET ALBERTA SR&ED TAX CREDIT (REPAYMENT), to AT1 page 2 line M
|
|
3966
|
+
* 081 = (lesser of 009031 and 009108 x 10%) - 009112 - 009116
|
|
3967
|
+
*
|
|
3968
|
+
* Allocation of the Maximum Expenditure Limit (page 3, required when 100 = 1):
|
|
3969
|
+
* 009200 CAN of the associated corporation with the longest tax year X
|
|
3970
|
+
* 009202 / 009204 that corporation's own tax year begin / end M
|
|
3971
|
+
* 009206 days in the longest year (max 365, or 366 across Feb 29) M
|
|
3972
|
+
* 009220 name of each associated corporation (row 1 = the filer) M
|
|
3973
|
+
* 009230 Alberta Corporate Account Number of each X
|
|
3974
|
+
* 009240 allocated amount — each occurrence AND the sum of all M
|
|
3975
|
+
* occurrences must not exceed $4,000,000 x (009206 / 365)
|
|
3976
|
+
*
|
|
3977
|
+
* ── Line 009031 has no formula in the spec text ─────────────────────────────
|
|
3978
|
+
*
|
|
3979
|
+
* Lines 009003-009025 and 009106/009017 all reference "009031" ("Total eligible
|
|
3980
|
+
* expenditures for Alberta purposes") as the figure they equal or feed into, but
|
|
3981
|
+
* the mapping tables jump straight from 009025 to 009040 — 009027, 009029 and
|
|
3982
|
+
* 009031 themselves are never defined in the spec's MAPPINGS chapter, most
|
|
3983
|
+
* likely because they are calculated-on-paper subtotals that are not, unlike
|
|
3984
|
+
* every field above them, separately transmitted EFILE data elements. Rather
|
|
3985
|
+
* than invent a number, this module DERIVES 031 from the six lines the spec DOES
|
|
3986
|
+
* define and caption unambiguously as "Deduct" or "Add" against the Alberta
|
|
3987
|
+
* expenditure pool (005, 007, 009, 011, 023, 025):
|
|
3988
|
+
*
|
|
3989
|
+
* 031 = 005 − 007 + 009 + 011 − 023 + 025
|
|
3990
|
+
*
|
|
3991
|
+
* That derivation is used only when `eligibleExpenditures` is not supplied
|
|
3992
|
+
* directly, and an issue is always raised when it is, so a preparer with the
|
|
3993
|
+
* authoritative figure (e.g. from the Guide to Claiming the Alberta SR&ED Tax
|
|
3994
|
+
* Credit) knows to override it via `eligibleExpenditures`.
|
|
3995
|
+
*
|
|
3996
|
+
* ── Line 009011 cites a line that does not exist ────────────────────────────
|
|
3997
|
+
*
|
|
3998
|
+
* The spec's own business rule for 011 reads "Value = 009110. See Guide to
|
|
3999
|
+
* Claiming The Alberta SR&ED Tax Credit for calculation" — but no line 009110 is
|
|
4000
|
+
* defined anywhere in this schedule (the lines run ...009108, 009112...). It is
|
|
4001
|
+
* most likely a transposed "009011" (self-reference) or a Guide-only figure with
|
|
4002
|
+
* no corresponding transmitted line at all. Either way its actual calculation is
|
|
4003
|
+
* explicitly deferred to an external guide this package does not model, so
|
|
4004
|
+
* `albertaCreditReducingFederalExpense` is accepted as a plain numeric INPUT.
|
|
4005
|
+
*
|
|
4006
|
+
* ── Line 009116 is a legacy, pre-2012 field ─────────────────────────────────
|
|
4007
|
+
*
|
|
4008
|
+
* "If the taxation year end is on or before March 31, 2012, value = line 428 of
|
|
4009
|
+
* Schedule 9 Supplemental." The Schedule 9 Supplemental and its own line 428 are
|
|
4010
|
+
* not modelled — `priorYearFederalItcAdjustment` is a plain numeric input,
|
|
4011
|
+
* expected to be nil for any current return.
|
|
4012
|
+
*
|
|
4013
|
+
* Whole dollars, pure.
|
|
4014
|
+
*/
|
|
4015
|
+
/** Valid codes for line 009040 — "Primary field of science or technology". */
|
|
4016
|
+
type Schedule9FieldOfScience = 1 | 2 | 3 | 4;
|
|
4017
|
+
interface AlbertaSchedule9Input {
|
|
4018
|
+
/** 009003 — federal total qualified SR&ED expenditures. Must equal fed T661 line 559. */
|
|
4019
|
+
federalQualifiedExpenditures?: number;
|
|
4020
|
+
/** 009005 — the portion of 003 incurred in Alberta. Must not exceed 003. */
|
|
4021
|
+
albertaPortionOfExpenditures?: number;
|
|
4022
|
+
/** 009007 — deduct: federal prescribed proxy amount included in the Alberta portion. */
|
|
4023
|
+
federalProxyAmountInAlbertaPortion?: number;
|
|
4024
|
+
/** 009009 — add: Alberta proxy amount. */
|
|
4025
|
+
albertaProxyAmount?: number;
|
|
4026
|
+
/**
|
|
4027
|
+
* 009011 — add: Alberta SR&ED credit that reduced the federal expense on fed
|
|
4028
|
+
* T661 line 559 in the taxation year. Its calculation is deferred by the spec
|
|
4029
|
+
* to the Guide to Claiming the Alberta SR&ED Tax Credit — see the module
|
|
4030
|
+
* docstring. Plain input.
|
|
4031
|
+
*/
|
|
4032
|
+
albertaCreditReducingFederalExpense?: number;
|
|
4033
|
+
/** 009015 — federal ITC received in the immediately preceding year (fed T661 line 435). */
|
|
4034
|
+
priorYearFederalItcReceived?: number;
|
|
4035
|
+
/** 009017 — total Alberta-eligible expenditures for years in which incurred (009031, all years). */
|
|
4036
|
+
totalAlbertaExpendituresAllYears?: number;
|
|
4037
|
+
/** 009019 — total federal expenditures for those same years (fed T661 line 570, all years). */
|
|
4038
|
+
totalFederalExpendituresAllYears?: number;
|
|
4039
|
+
/** 009025 — add: Alberta portion of any repayment of assistance relating to 005. */
|
|
4040
|
+
albertaPortionOfRepayments?: number;
|
|
4041
|
+
/**
|
|
4042
|
+
* 009031 / 009106 — "Total eligible expenditures for Alberta purposes."
|
|
4043
|
+
* Overrides the derived figure (005 − 007 + 009 + 011 − 023 + 025) when the
|
|
4044
|
+
* authoritative amount is known. See the module docstring for why this is
|
|
4045
|
+
* derived rather than read directly off the spec.
|
|
4046
|
+
*/
|
|
4047
|
+
eligibleExpenditures?: number;
|
|
4048
|
+
/** 009040 — primary field of science or technology. Mandatory on the live form. */
|
|
4049
|
+
fieldOfScience?: Schedule9FieldOfScience;
|
|
4050
|
+
/** 009100 — associated with one or more corporations for SR&ED purposes? Defaults to false (line default = 2/No). */
|
|
4051
|
+
isAssociated?: boolean;
|
|
4052
|
+
/** 009102 — required when associated: this corporation's allocated share of line 240. */
|
|
4053
|
+
allocatedExpenditureLimit?: number;
|
|
4054
|
+
/**
|
|
4055
|
+
* Days in the corporation's own taxation year, for the non-associated 009104
|
|
4056
|
+
* proration. Defaults to 365 (a full year); clamped to [0, 366]. Per the
|
|
4057
|
+
* spec, days before 2009-01-01 (when the Alberta SR&ED program began) must
|
|
4058
|
+
* already be excluded by the caller — day-of-year proration from real
|
|
4059
|
+
* calendar dates is not modelled here, matching this package's convention
|
|
4060
|
+
* elsewhere (e.g. the AT1 Schedule 29 group allocation).
|
|
4061
|
+
*/
|
|
4062
|
+
daysInTaxYear?: number;
|
|
4063
|
+
/** 009112 — recapture on disposal (or deemed disposal) of Alberta SR&ED property. */
|
|
4064
|
+
disposalRecapture?: number;
|
|
4065
|
+
/**
|
|
4066
|
+
* 009116 — legacy pre-2012 adjustment from the Schedule 9 Supplemental line
|
|
4067
|
+
* 428. See the module docstring; expected nil for a current return.
|
|
4068
|
+
*/
|
|
4069
|
+
priorYearFederalItcAdjustment?: number;
|
|
4070
|
+
/**
|
|
4071
|
+
* The return's taxation year end (ISO `YYYY-MM-DD`), used only to flag a
|
|
4072
|
+
* reminder when it falls after the 2019-12-31 wind-down date — see the
|
|
4073
|
+
* module docstring's "WOUND DOWN" note.
|
|
4074
|
+
*/
|
|
4075
|
+
taxationYearEnd?: string;
|
|
4076
|
+
}
|
|
4077
|
+
interface AlbertaSchedule9Result {
|
|
4078
|
+
federalQualifiedExpenditures: number;
|
|
4079
|
+
albertaPortionOfExpenditures: number;
|
|
4080
|
+
federalProxyAmountInAlbertaPortion: number;
|
|
4081
|
+
albertaProxyAmount: number;
|
|
4082
|
+
albertaCreditReducingFederalExpense: number;
|
|
4083
|
+
priorYearFederalItcReceived: number;
|
|
4084
|
+
totalAlbertaExpendituresAllYears: number;
|
|
4085
|
+
totalFederalExpendituresAllYears: number;
|
|
4086
|
+
/** 009023 = 009015 x 009017 / 009019. */
|
|
4087
|
+
priorYearItcAlbertaPortion: number;
|
|
4088
|
+
albertaPortionOfRepayments: number;
|
|
4089
|
+
/**
|
|
4090
|
+
* 009031 / 009106 — the figure actually used at 009108's lesser-of test.
|
|
4091
|
+
* Equal to `eligibleExpenditures` when supplied, otherwise the derived
|
|
4092
|
+
* figure (see `derivedEligibleExpenditures` and the module docstring).
|
|
4093
|
+
*/
|
|
4094
|
+
eligibleExpenditures: number;
|
|
4095
|
+
/** The derived cross-check: 005 − 007 + 009 + 011 − 023 + 025, always computed. */
|
|
4096
|
+
derivedEligibleExpenditures: number;
|
|
4097
|
+
fieldOfScience: Schedule9FieldOfScience | undefined;
|
|
4098
|
+
isAssociated: boolean;
|
|
4099
|
+
/** 009104 — the non-associated day-prorated $4,000,000 limit (0 when associated). */
|
|
4100
|
+
nonAssociatedMaximumExpenditureLimit: number;
|
|
4101
|
+
/** 009108 — the maximum expenditure limit actually in effect (102 or 104). */
|
|
4102
|
+
maximumExpenditureLimit: number;
|
|
4103
|
+
disposalRecapture: number;
|
|
4104
|
+
priorYearFederalItcAdjustment: number;
|
|
4105
|
+
/** 009120 — signed; may be negative (a repayment). To AT1 page 2, line 081. */
|
|
4106
|
+
netCredit: number;
|
|
4107
|
+
issues: string[];
|
|
4108
|
+
}
|
|
4109
|
+
/** 009120's flat rate — "lesser of line 009031 and 009108 X 10%". */
|
|
4110
|
+
declare const ALBERTA_SRED_TAX_CREDIT_RATE = 0.1;
|
|
4111
|
+
/** Alberta's SR&ED program did not exist before this date (line 009104's note). */
|
|
4112
|
+
declare const ALBERTA_SRED_PROGRAM_START = "2009-01-01";
|
|
4113
|
+
/** Alberta SR&ED expenditures carried out after this date are not eligible (module docstring). */
|
|
4114
|
+
declare const ALBERTA_SRED_EXPENDITURE_CUTOFF = "2019-12-31";
|
|
4115
|
+
/**
|
|
4116
|
+
* 009104 / 009206's day-prorated $4,000,000 expenditure limit. Days are clamped
|
|
4117
|
+
* to [0, 366] — 366 only for a year genuinely spanning a February 29, per the
|
|
4118
|
+
* spec's own note.
|
|
4119
|
+
*/
|
|
4120
|
+
declare function computeSchedule9MaximumExpenditureLimit(daysInTaxYear?: number): number;
|
|
4121
|
+
declare function computeAlbertaSchedule9(input: AlbertaSchedule9Input): AlbertaSchedule9Result;
|
|
4122
|
+
/** One row of the page-3 allocation table. Row 1 must be the filing corporation. */
|
|
4123
|
+
interface Schedule9AllocationMember {
|
|
4124
|
+
/** 009220 — name of the associated corporation. */
|
|
4125
|
+
name: string;
|
|
4126
|
+
/** 009230 — Alberta Corporate Account Number. */
|
|
4127
|
+
albertaCan?: string;
|
|
4128
|
+
/** 009240 — this member's agreed share of the expenditure limit. */
|
|
4129
|
+
allocated: number;
|
|
4130
|
+
}
|
|
4131
|
+
interface Schedule9AllocationMemberResult {
|
|
4132
|
+
name: string;
|
|
4133
|
+
albertaCan?: string;
|
|
4134
|
+
allocated: number;
|
|
4135
|
+
}
|
|
4136
|
+
interface Schedule9AllocationResult {
|
|
4137
|
+
/** 009206 — days in the longest associated taxation year (clamped to [0, 366]). */
|
|
4138
|
+
daysInLongestYear: number;
|
|
4139
|
+
/** The shared $4,000,000-based ceiling every occurrence AND their sum must respect. */
|
|
4140
|
+
maximumExpenditureLimit: number;
|
|
4141
|
+
members: Schedule9AllocationMemberResult[];
|
|
4142
|
+
/** Σ 009240. Must not exceed maximumExpenditureLimit. */
|
|
4143
|
+
totalAllocated: number;
|
|
4144
|
+
/** The filing corporation's own allocated share (row 1) — feeds 009102. */
|
|
4145
|
+
claimantAllocatedAmount: number;
|
|
4146
|
+
unallocated: number;
|
|
4147
|
+
issues: string[];
|
|
4148
|
+
}
|
|
4149
|
+
/**
|
|
4150
|
+
* Allocate the day-prorated $4,000,000 maximum expenditure limit among an
|
|
4151
|
+
* associated group (page 3). Per the spec, EACH occurrence of 009240 and the
|
|
4152
|
+
* SUM of all occurrences are independently capped at the limit — unlike a
|
|
4153
|
+
* running-remainder split, one member requesting more than the limit does not
|
|
4154
|
+
* consume another member's room; it is simply capped and flagged.
|
|
4155
|
+
*/
|
|
4156
|
+
declare function allocateSchedule9ExpenditureLimit(daysInLongestYear: number, requested: readonly Schedule9AllocationMember[]): Schedule9AllocationResult;
|
|
4157
|
+
/**
|
|
4158
|
+
* `scheduleNNValues` for Schedule 9, following the `at1-schedule-line-items.ts`
|
|
4159
|
+
* builder pattern (see `schedule3Values` in `schedule3-other-deductions-credits.ts`,
|
|
4160
|
+
* `schedule16Values`, `schedule20Values`). Kept in THIS file rather than the
|
|
4161
|
+
* shared filing module per the task instructions — other agents are editing
|
|
4162
|
+
* `at1-schedule-line-items.ts` concurrently.
|
|
4163
|
+
*/
|
|
4164
|
+
interface At1ScheduleValueLike$2 {
|
|
4165
|
+
lineItemId: string;
|
|
4166
|
+
value: string | number;
|
|
4167
|
+
}
|
|
4168
|
+
interface At1ScheduleDataLike$2 {
|
|
4169
|
+
scheduleId: string;
|
|
4170
|
+
values: At1ScheduleValueLike$2[];
|
|
4171
|
+
}
|
|
4172
|
+
/**
|
|
4173
|
+
* The page-3 "Allocation of the Maximum Expenditure Limit" context that has no
|
|
4174
|
+
* home on `AlbertaSchedule9Result` itself — the CAN and tax-year dates of the
|
|
4175
|
+
* associated corporation with the longest year (009200/009202/009204), plus
|
|
4176
|
+
* the `allocateSchedule9ExpenditureLimit` result supplying 009206 and the
|
|
4177
|
+
* per-member 009220/009230/009240 rows. Supplied only when the corporation is
|
|
4178
|
+
* associated and a group was actually entered.
|
|
4179
|
+
*/
|
|
4180
|
+
interface Schedule9GroupFilingInput {
|
|
4181
|
+
/** 009200 — Alberta CAN of the associated corporation with the longest tax year. */
|
|
4182
|
+
longestYearCan?: string;
|
|
4183
|
+
/** 009202 — that corporation's own tax year begin, ISO `YYYY-MM-DD`. */
|
|
4184
|
+
longestYearBegin?: string;
|
|
4185
|
+
/** 009204 — that corporation's own tax year end, ISO `YYYY-MM-DD`. */
|
|
4186
|
+
longestYearEnd?: string;
|
|
4187
|
+
/** The result of `allocateSchedule9ExpenditureLimit` — supplies 009206/220/230/240. */
|
|
4188
|
+
allocation: Schedule9AllocationResult;
|
|
4189
|
+
}
|
|
4190
|
+
/**
|
|
4191
|
+
* Field ids per the spec transcription in the module docstring: 003-025 (the
|
|
4192
|
+
* expenditure buildup), 040 (field of science), 100-120 (the credit
|
|
4193
|
+
* calculation), and — when `group` is supplied — 200-240 (page 3's
|
|
4194
|
+
* allocation). Line 031 has no confirmed transmitted status of its own (see
|
|
4195
|
+
* the module docstring's "line 009031 has no formula in the spec text"), but
|
|
4196
|
+
* is filed anyway alongside 106 since both carry the identical "Total
|
|
4197
|
+
* eligible expenditures for Alberta purposes" figure per the spec's own
|
|
4198
|
+
* cross-reference ("106 ... Value must equal 009031").
|
|
4199
|
+
*/
|
|
4200
|
+
declare function schedule9Values(result: AlbertaSchedule9Result, group?: Schedule9GroupFilingInput): At1ScheduleDataLike$2;
|
|
4201
|
+
//#endregion
|
|
4202
|
+
//#region src/t2/at1/schedules/schedule11-manufacturing-processing.d.ts
|
|
4203
|
+
/**
|
|
4204
|
+
* Alberta AT1 Schedule 11 — Alberta Manufacturing and Processing Profits Deduction.
|
|
4205
|
+
*
|
|
4206
|
+
* ── This form is HISTORICAL: it stopped applying 2001-03-31 ────────────────
|
|
4207
|
+
*
|
|
4208
|
+
* The spec's own business rule for the form-required flag (line 011) says so
|
|
4209
|
+
* directly: *"If the corp's tax year beginning is prior to April 1, 2001 and
|
|
4210
|
+
* the corp derives at least 10% of its gross revenue for the year from
|
|
4211
|
+
* manufacturing or processing of goods for sale or lease, then form 011
|
|
4212
|
+
* should be completed. NOTE: The M&P Deduction is only applicable up to
|
|
4213
|
+
* March 31, 2001."* (TRA spec §3.2.3.12, lines 9135-9146). `computeSchedule11`
|
|
4214
|
+
* enforces both halves of that test — the tax-year date AND the 10%
|
|
4215
|
+
* gross-revenue ratio — and forces line 042 to nil whenever either fails,
|
|
4216
|
+
* regardless of what the capital/labour workings below would otherwise
|
|
4217
|
+
* produce.
|
|
4218
|
+
*
|
|
4219
|
+
* ── What this module does NOT compute ───────────────────────────────────
|
|
4220
|
+
*
|
|
4221
|
+
* The transcribed section (TRA spec §3.2.3.12, lines 9082-9397) stops at line
|
|
4222
|
+
* 042, "Alberta Manufacturing and Processing Profits" — an INCOME figure, not
|
|
4223
|
+
* a tax saving. No rate or deduction-dollar calculation appears in that
|
|
4224
|
+
* range, so none is invented here; `albertaManufacturingProcessingProfits` is
|
|
4225
|
+
* exactly line 042 as specified, nothing further.
|
|
4226
|
+
*
|
|
4227
|
+
* ADJUBI (line 001 / AMPPD), Cost of Capital (031) and Cost of Labour (037)
|
|
4228
|
+
* are the SAME figures federal Schedule 27 Part 2 computes — confirmed
|
|
4229
|
+
* against `packages/ca-tax/src/t2/forms/generated/schedule27.captions.ts`,
|
|
4230
|
+
* where line 130 is "Adjusted business income (ADJUBI)", line 140 is "Cost of
|
|
4231
|
+
* capital (C)" and line 160 is "Cost of labour (L)" (matching the AT1 spec's
|
|
4232
|
+
* "fed 027130" / "fed 027140" / "fed 027160" references exactly: `027` +
|
|
4233
|
+
* the three-digit federal line number). This codebase has no module that
|
|
4234
|
+
* COMPUTES those figures, though: `schedule27-mp.ts` starts from Part 2's
|
|
4235
|
+
* OUTPUT (`manufacturingAndProcessingProfits`, fed line 200 = CMPP), never
|
|
4236
|
+
* from ADJUBI or the capital/labour cost bases that produce it. Per the task
|
|
4237
|
+
* scope instruction, this module takes `federalAdjubi`, `costOfCapital` and
|
|
4238
|
+
* `costOfLabour` as plain numeric INPUTS the caller supplies from the
|
|
4239
|
+
* federal Schedule 27 Part 2 workings, rather than reimplementing Part 2.
|
|
4240
|
+
*
|
|
4241
|
+
* ── Line map (TRA spec §3.2.3.12) ───────────────────────────────────────
|
|
4242
|
+
*
|
|
4243
|
+
* 011001 AMPPD ADJUBI for Alberta purposes (line 9152-9165)
|
|
4244
|
+
* 011013 CCPC-only: aggregate investment income (line 9167-9179)
|
|
4245
|
+
* 011031 Cost of Capital (= fed 027140) (line 9248-9256)
|
|
4246
|
+
* 011033 Alberta Cost of Manufacturing & Processing
|
|
4247
|
+
* Capital (≤ 011031) (line 9257-9273)
|
|
4248
|
+
* 011037 Cost of Labour (= fed 027160) (line 9274-9282)
|
|
4249
|
+
* 011039 Alberta Cost of Manufacturing & Processing
|
|
4250
|
+
* Labour (≤ 011037) (line 9283-9294)
|
|
4251
|
+
* 011042 AMPP Alberta Manufacturing and Processing Profits (line 9295-9390)
|
|
4252
|
+
*
|
|
4253
|
+
* ── Line 001 (AMPPD): a discrepancy in the source document ─────────────────
|
|
4254
|
+
*
|
|
4255
|
+
* The line CAPTION reads *"If the ADJUBI is calculated differently for
|
|
4256
|
+
* Alberta purposes, then enter the amount from Schedule 12, line 116"*, but
|
|
4257
|
+
* the BUSINESS RULE beside it gives a different, fully-specified formula:
|
|
4258
|
+
* *"value = 012112 + 012114. If negative, default = 0. Otherwise, if form 012
|
|
4259
|
+
* does not exist, set value = fed 027130."* There is no Schedule 12 line 116
|
|
4260
|
+
* anywhere else in this spec. This module follows the business rule's stated
|
|
4261
|
+
* arithmetic (012112 + 012114) rather than the caption's single, unverifiable
|
|
4262
|
+
* line reference, because a formula that is actually computable beats a
|
|
4263
|
+
* citation that cannot be checked. Flagged here rather than silently resolved
|
|
4264
|
+
* either way, per the task's instruction not to guess at spec ambiguity.
|
|
4265
|
+
*
|
|
4266
|
+
* ── Line 042: the four-case formula collapses to two `min`s ────────────────
|
|
4267
|
+
*
|
|
4268
|
+
* The spec states line 042 as four cases keyed by whether 011031 < 011033 ×
|
|
4269
|
+
* 100/85 and whether 011037 < 011039 × 100/75. Each case selects, per
|
|
4270
|
+
* dimension, either the RAW cost (031 or 037) or the grossed-up ALBERTA
|
|
4271
|
+
* portion (033 × 100/85 or 039 × 100/75) — precisely a `Math.min`, matching
|
|
4272
|
+
* the shape federal Schedule 27 lines 150/170 already use for the analogous
|
|
4273
|
+
* "cost of manufacturing and processing capital/labour" figures:
|
|
4274
|
+
*
|
|
4275
|
+
* 042 = 001 × [min(033×100/85, 031) + min(039×100/75, 037)] / (031 + 037)
|
|
4276
|
+
*
|
|
4277
|
+
* Verified against all four spec cases: whichever side of "031 < 033×100/85"
|
|
4278
|
+
* holds, `min(033×100/85, 031)` reduces to exactly the value that case's
|
|
4279
|
+
* formula uses (031 itself, or the grossed-up 033), and likewise for the
|
|
4280
|
+
* labour term — so the single expression above reproduces all four cases
|
|
4281
|
+
* without branching on them explicitly.
|
|
4282
|
+
*
|
|
4283
|
+
* ── Small manufacturing corporations: out of scope by the spec itself ──────
|
|
4284
|
+
*
|
|
4285
|
+
* The AMPP business rule (line 9180-9184) says lines 011031-011042 "must be
|
|
4286
|
+
* completed" for a corp OTHER than a small manufacturing corp, and "must not
|
|
4287
|
+
* exist" otherwise — but gives no alternative formula for a small
|
|
4288
|
+
* manufacturer's line 042 anywhere in the transcribed range (the "AT1 Guide"
|
|
4289
|
+
* it defers to is a separate document not sourced here). `computeSchedule11`
|
|
4290
|
+
* does not guess one: pass `smallManufacturerAmpp` directly when
|
|
4291
|
+
* `isSmallManufacturingCorp` is true, or an issue is raised and line 042
|
|
4292
|
+
* reports nil.
|
|
4293
|
+
*
|
|
4294
|
+
* Whole dollars, pure.
|
|
4295
|
+
*/
|
|
4296
|
+
interface Schedule11Input {
|
|
4297
|
+
/**
|
|
4298
|
+
* The corporation's tax year START date, ISO `YYYY-MM-DD`. The deduction
|
|
4299
|
+
* applies only where this is before 2001-04-01 (TRA-spec lines 9135-9146).
|
|
4300
|
+
*/
|
|
4301
|
+
taxYearStart: string;
|
|
4302
|
+
/**
|
|
4303
|
+
* Gross revenue from manufacturing or processing of goods for sale or
|
|
4304
|
+
* lease, for the 10% test (TRA-spec lines 9138-9142).
|
|
4305
|
+
*/
|
|
4306
|
+
manufacturingGrossRevenue?: number;
|
|
4307
|
+
/** Total gross revenue for the year, for the 10% test. */
|
|
4308
|
+
totalGrossRevenue?: number;
|
|
4309
|
+
/**
|
|
4310
|
+
* Whether the corp qualifies as a "small manufacturing corp" per the AT1
|
|
4311
|
+
* Guide criteria (business rule beside line "AMPP", 9180-9184). Gates
|
|
4312
|
+
* whether 011031-011042 apply at all.
|
|
4313
|
+
*/
|
|
4314
|
+
isSmallManufacturingCorp?: boolean;
|
|
4315
|
+
/**
|
|
4316
|
+
* 011042 supplied directly for a small manufacturing corp. The transcribed
|
|
4317
|
+
* spec range states only that 011031-011042 "must not exist" in this case
|
|
4318
|
+
* — it does not give the alternative formula, so none is derived here.
|
|
4319
|
+
*/
|
|
4320
|
+
smallManufacturerAmpp?: number;
|
|
4321
|
+
/** 027130 — federal Schedule 27 ADJUBI. Used unless the Alberta figure differs. */
|
|
4322
|
+
federalAdjubi?: number;
|
|
4323
|
+
/**
|
|
4324
|
+
* When the corp elects to calculate ADJUBI differently for Alberta
|
|
4325
|
+
* purposes (Schedule 12 exists): the two Schedule 12 lines the AT1
|
|
4326
|
+
* business rule sums, 012112 + 012114. Supplying this OVERRIDES
|
|
4327
|
+
* `federalAdjubi` for line 011001 — presence of this field IS the "chooses
|
|
4328
|
+
* to calculate ADJUBI differently, and form 012 exists" signal.
|
|
4329
|
+
*/
|
|
4330
|
+
albertaAdjubiFromSchedule12?: {
|
|
4331
|
+
line112: number;
|
|
4332
|
+
line114: number;
|
|
4333
|
+
};
|
|
4334
|
+
/**
|
|
4335
|
+
* 000029 = 1 or 2 — Canadian-controlled private corporation, gating line
|
|
4336
|
+
* 011013 (CCPC-only aggregate investment income). This figure is a
|
|
4337
|
+
* disclosure item: the transcribed spec range (9082-9397) does not use it
|
|
4338
|
+
* anywhere in the line 042 formula.
|
|
4339
|
+
*/
|
|
4340
|
+
isCcpc?: boolean;
|
|
4341
|
+
/** Whether an Alberta Schedule 12 exists for this return. */
|
|
4342
|
+
schedule12Exists?: boolean;
|
|
4343
|
+
/** Alberta-specific aggregate investment income, used when Schedule 12 exists. */
|
|
4344
|
+
albertaAggregateInvestmentIncome?: number;
|
|
4345
|
+
/** 200440 — federal aggregate investment income, used when Schedule 12 does not exist. */
|
|
4346
|
+
federalAggregateInvestmentIncome?: number;
|
|
4347
|
+
/** 011031 — Cost of Capital. Must equal fed 027140 for a non-small-manufacturer. */
|
|
4348
|
+
costOfCapital?: number;
|
|
4349
|
+
/** 011033 — the Alberta portion of Cost of Capital. Clamped to ≤ costOfCapital. */
|
|
4350
|
+
albertaCostOfCapital?: number;
|
|
4351
|
+
/** 011037 — Cost of Labour. Must equal fed 027160 for a non-small-manufacturer. */
|
|
4352
|
+
costOfLabour?: number;
|
|
4353
|
+
/** 011039 — the Alberta portion of Cost of Labour. Clamped to ≤ costOfLabour. */
|
|
4354
|
+
albertaCostOfLabour?: number;
|
|
4355
|
+
}
|
|
4356
|
+
interface Schedule11Result {
|
|
4357
|
+
/** Whether the deduction applies this year at all (date test AND 10% gross-revenue test). */
|
|
4358
|
+
eligible: boolean;
|
|
4359
|
+
isSmallManufacturingCorp: boolean;
|
|
4360
|
+
/** 011001 (AMPPD) — resolved ADJUBI base for the line 042 formula. */
|
|
4361
|
+
albertaAdjubi: number;
|
|
4362
|
+
/** 011013 — CCPC aggregate investment income. Undefined when the corp is not a CCPC. */
|
|
4363
|
+
aggregateInvestmentIncome?: number;
|
|
4364
|
+
/** 011031. */
|
|
4365
|
+
costOfCapital: number;
|
|
4366
|
+
/** 011033. */
|
|
4367
|
+
albertaCostOfCapital: number;
|
|
4368
|
+
/** 011037. */
|
|
4369
|
+
costOfLabour: number;
|
|
4370
|
+
/** 011039. */
|
|
4371
|
+
albertaCostOfLabour: number;
|
|
4372
|
+
/** 011042 — Alberta Manufacturing and Processing Profits. Nil unless `eligible`. */
|
|
4373
|
+
albertaManufacturingProcessingProfits: number;
|
|
4374
|
+
/** Manufacturing gross revenue ÷ total gross revenue, when both figures were given. */
|
|
4375
|
+
grossRevenueRatio?: number;
|
|
4376
|
+
issues: string[];
|
|
4377
|
+
}
|
|
4378
|
+
declare function computeSchedule11(input: Schedule11Input): Schedule11Result;
|
|
4379
|
+
/**
|
|
4380
|
+
* `scheduleNNValues` for Schedule 11, following the `at1-schedule-line-items.ts`
|
|
4381
|
+
* builder pattern (see `schedule20Values`, `schedule16Values`). Kept in THIS
|
|
4382
|
+
* file rather than the shared filing module per the task instructions — other
|
|
4383
|
+
* agents are editing `at1-schedule-line-items.ts` concurrently.
|
|
4384
|
+
*/
|
|
4385
|
+
interface At1ScheduleValueLike$1 {
|
|
4386
|
+
lineItemId: string;
|
|
4387
|
+
value: string | number;
|
|
4388
|
+
}
|
|
4389
|
+
interface At1ScheduleDataLike$1 {
|
|
4390
|
+
scheduleId: string;
|
|
4391
|
+
values: At1ScheduleValueLike$1[];
|
|
4392
|
+
}
|
|
4393
|
+
/**
|
|
4394
|
+
* Field ids per the spec transcription above: 001 (AMPPD/ADJUBI), 013 (CCPC
|
|
4395
|
+
* aggregate investment income), 031/033/037/039 (cost of capital/labour, both
|
|
4396
|
+
* jurisdictions) and 042 (Alberta M&P Profits).
|
|
4397
|
+
*
|
|
4398
|
+
* Line 042 is ALWAYS emitted, including when the historical-eligibility gate
|
|
4399
|
+
* (pre-2001-04-01 tax year AND the 10% gross-revenue test) has forced it to
|
|
4400
|
+
* nil — an ineligible year still has a line 011042 on the form, and it reads
|
|
4401
|
+
* nil, so this files nil rather than omitting the line entirely. The REASON
|
|
4402
|
+
* it is nil (a `Schedule 11: … applies only where the tax year begins before
|
|
4403
|
+
* 2001-04-01 …` / `… below the 10% threshold …` entry) lives on
|
|
4404
|
+
* `result.issues`, which this builder does not carry onto the wire itself —
|
|
4405
|
+
* the caller already has `result` (this function's own input) and so already
|
|
4406
|
+
* has `result.issues` sitting beside whatever this returns; duplicating it
|
|
4407
|
+
* onto `At1ScheduleDataLike`, which has no field for prose, would only be
|
|
4408
|
+
* losing information conversion by not adding any.
|
|
4409
|
+
*
|
|
4410
|
+
* Line 013 (CCPC aggregate investment income) is the one line legitimately
|
|
4411
|
+
* OMITTED rather than filed as nil: it is undefined, not zero, for a non-CCPC
|
|
4412
|
+
* corporation — the spec's own business rule gates it on `000029 = 1 or 2`,
|
|
4413
|
+
* so a non-CCPC has no box to fill here at all, unlike line 042's "nil is a
|
|
4414
|
+
* real answer" case above.
|
|
4415
|
+
*/
|
|
4416
|
+
declare function schedule11Values(result: Schedule11Result): At1ScheduleDataLike$1;
|
|
4417
|
+
//#endregion
|
|
4418
|
+
//#region src/t2/at1/schedules/schedule15-resource-related-deductions.d.ts
|
|
4419
|
+
/**
|
|
4420
|
+
* Alberta AT1 Schedule 15 — Alberta Resource Related Deductions.
|
|
4421
|
+
*
|
|
4422
|
+
* Source: `research/sources/tra-spec/AT1-Chapter3-2025.2-full.txt`, lines
|
|
4423
|
+
* 12394-15937 (§3.2.3.16 "Schedule 15 - Alberta Resource Related Deductions").
|
|
4424
|
+
* There is NO standalone AT1SCH15 PDF under `research/sources/tra-forms/pdf/`
|
|
4425
|
+
* (unlike schedules 1, 2, 10, 12, 13, 16, 17, 18, 20, 21, 29, which all have
|
|
4426
|
+
* one) — the NetFile mapping spec above is the ONLY source available for this
|
|
4427
|
+
* schedule, so every field below is cited to that text file alone and cannot
|
|
4428
|
+
* be cross-checked against a rendered form layout.
|
|
4429
|
+
*
|
|
4430
|
+
* Like AT1 Schedule 18 (dispositions) and Schedule 13 (CCA), this is a
|
|
4431
|
+
* RECONCILIATION overlay, not a second engine: for most lines, the Alberta
|
|
4432
|
+
* figure defaults to the corresponding FEDERAL pool figure, and only the
|
|
4433
|
+
* lines where Alberta actually diverges are entered. The form is forbidden
|
|
4434
|
+
* when the return declares no Alberta/federal divergence (000060 AND 000061
|
|
4435
|
+
* both 2) and required when the opening balance or the claim for Alberta
|
|
4436
|
+
* purposes differs from federal (line 015 gating text, source lines
|
|
4437
|
+
* 12444-12456).
|
|
4438
|
+
*
|
|
4439
|
+
* Despite the task brief's expectation of a "resource allowance" pool, THERE
|
|
4440
|
+
* IS NO resource-allowance computation on this schedule — the federal
|
|
4441
|
+
* resource allowance deduction was repealed for taxation years after 1989
|
|
4442
|
+
* (phased out through the mid-1990s) and this schedule is entirely about the
|
|
4443
|
+
* EIGHT resource-expense CONTINUITY pools that survive it:
|
|
4444
|
+
*
|
|
4445
|
+
* EDA — Continuity of Earned Depletion Base (grandfathered; regular +
|
|
4446
|
+
* successor expenses), lines 001-021.
|
|
4447
|
+
* CMEDB — Continuity of Mining Exploration Depletion Base, lines 023-033.
|
|
4448
|
+
* CEE — Cumulative Canadian Exploration Expenses (regular + successor),
|
|
4449
|
+
* lines 041-083.
|
|
4450
|
+
* CDE — Cumulative Canadian Development Expenses (regular + successor),
|
|
4451
|
+
* lines 091-143.
|
|
4452
|
+
* CCOGPE — Cumulative Canadian Oil and Gas Property Expenses (regular +
|
|
4453
|
+
* successor), lines 151-191.
|
|
4454
|
+
* FEDE — Foreign Exploration and Development Expenses (regular +
|
|
4455
|
+
* successor), lines 201-233.
|
|
4456
|
+
* SFEDE — Specified Foreign Exploration and Development Expenses, PER
|
|
4457
|
+
* COUNTRY (regular + successor), lines 241-277.
|
|
4458
|
+
* CFRE — Cumulative Foreign Resource Expenses, PER COUNTRY (regular +
|
|
4459
|
+
* successor), lines 281-317.
|
|
4460
|
+
*
|
|
4461
|
+
* Each pool is modelled as its own `Input`/`Result` pair and its own pure
|
|
4462
|
+
* `computeXxx` function, per this directory's convention (see
|
|
4463
|
+
* `schedule18-dispositions.ts`, `schedule21-year-of-origin.ts`). A single
|
|
4464
|
+
* `computeAlbertaSchedule15` at the bottom composes all eight (accepting the
|
|
4465
|
+
* already-computed CCOGPE results where CDE needs them — see "CCOGPE ↔ CDE
|
|
4466
|
+
* cross-linkage" below) and applies the schedule-level 000060/000061 gate.
|
|
4467
|
+
*
|
|
4468
|
+
* ── Two proration conventions, NOT interchangeable ──────────────────────────
|
|
4469
|
+
*
|
|
4470
|
+
* The current-year-claim caps use TWO different short-tax-year formulas, and
|
|
4471
|
+
* the spec is explicit that they differ:
|
|
4472
|
+
*
|
|
4473
|
+
* - CDE (lines 115, 141) and CCOGPE (lines 169, 189) use a STEP function:
|
|
4474
|
+
* "if days in tax year ≥ 357, cap = rate × pool; if < 357, cap = rate ×
|
|
4475
|
+
* (days/365) × pool" — i.e. the proration is skipped entirely for a
|
|
4476
|
+
* near-full year.
|
|
4477
|
+
* - FEDE (line 209), SFEDE (line 253) and CFRE (lines 293, 313) use a
|
|
4478
|
+
* PLAIN `days/365` multiplier with no 357-day step.
|
|
4479
|
+
*
|
|
4480
|
+
* `stepYearFactor` implements the first; `linearYearFactor` the second. CEE
|
|
4481
|
+
* (lines 061, 081) and EDA/CMEDB have no day-proration at all — CEE is fully
|
|
4482
|
+
* claimable up to the pool balance in one year, no percentage rate applies.
|
|
4483
|
+
*
|
|
4484
|
+
* ── CCOGPE ↔ CDE cross-linkage (FLAGGED, not fully auto-wired) ──────────────
|
|
4485
|
+
*
|
|
4486
|
+
* When a CCOGPE pool's pre-claim subtotal is NEGATIVE, three things in the
|
|
4487
|
+
* spec text interact in a way this module resolves only PARTIALLY:
|
|
4488
|
+
*
|
|
4489
|
+
* 1. CDE line 105 ("Deduct: credit balance in the cumulative Canadian oil
|
|
4490
|
+
* and gas property expense pool", source lines 13604-13622) has its OWN
|
|
4491
|
+
* self-contained formula: `A = 015151+015153+015155+015157-015159-
|
|
4492
|
+
* 015161-015165-015167; if A < 0, value = A; otherwise enter fed
|
|
4493
|
+
* 012330`. This is unconditional — it does not mention the designation
|
|
4494
|
+
* election. This module implements 105 EXACTLY this way, computed from
|
|
4495
|
+
* the already-computed CCOGPE-regular pool subtotal (see
|
|
4496
|
+
* `computeCdeRegular`'s `ccogpeRegular` parameter).
|
|
4497
|
+
* 2. CCOGPE line 169 ("Deduct: current year claim...", source lines
|
|
4498
|
+
* 14281-14370) separately says that when that SAME subtotal A is
|
|
4499
|
+
* negative, it "must be carried forward to 015105" ONLY if the
|
|
4500
|
+
* corporation "has made a designation pursuant to subparagraph
|
|
4501
|
+
* 66.7(4)(a)(iii)" — and to 015133 (CDE SUCCESSOR, not 105) if it has
|
|
4502
|
+
* NOT. This CONTRADICTS (1)'s unconditional reading. Line 189 (source
|
|
4503
|
+
* lines 14646-14661) makes the analogous claim for the CCOGPE-successor
|
|
4504
|
+
* pool: negative → 015133 if designated, or "included in 015167"
|
|
4505
|
+
* (CCOGPE's OWN regular-pool deduction line, not a CDE line) if not.
|
|
4506
|
+
*
|
|
4507
|
+
* This module resolves (1) literally (105 is auto-computed, unconditionally,
|
|
4508
|
+
* from the CCOGPE-regular subtotal) because that is the more specific,
|
|
4509
|
+
* self-contained rule attached directly to line 105 itself. It does NOT
|
|
4510
|
+
* auto-route a negative CCOGPE-successor subtotal into CDE line 133 or back
|
|
4511
|
+
* into CCOGPE-regular line 167, because (a) line 133 has no unconditional
|
|
4512
|
+
* formula of its own — only the ambiguous "value may not exceed amount A"
|
|
4513
|
+
* (source lines 13945-13962), and (b) whether it should land on 133 or 167
|
|
4514
|
+
* hinges on the 66.7(4)(a)(iii) designation, which this schedule has no
|
|
4515
|
+
* source for and no sibling schedule to pull it from. Whenever the CCOGPE-
|
|
4516
|
+
* successor subtotal goes negative, `computeCcogpeSuccessor` raises an issue
|
|
4517
|
+
* naming lines 133/167/189 so a preparer resolves the routing by hand; the
|
|
4518
|
+
* pool's own claim and closing balance are zeroed per the schedule's
|
|
4519
|
+
* unconditional instruction ("enter zero at 015189 and 015191").
|
|
4520
|
+
*
|
|
4521
|
+
* A second, independent anomaly: CCOGPE-successor's own closing balance
|
|
4522
|
+
* formula (line 191, source lines 14731-14740) reads literally as "value =
|
|
4523
|
+
* 015173+015175+015177-015181-015185-015187-015189 **-015167-015169**" when
|
|
4524
|
+
* the pre-subtraction total is positive — i.e. it appears to subtract the
|
|
4525
|
+
* CCOGPE-REGULAR pool's OWN deduction (167) and claim (169) from the
|
|
4526
|
+
* SUCCESSOR pool's closing balance. No other continuity balance on this
|
|
4527
|
+
* schedule mixes fields across the regular/successor split this way, and
|
|
4528
|
+
* nothing else in the 000-series explains why a successor balance would
|
|
4529
|
+
* absorb the regular pool's claim. This module computes 191 with the clean,
|
|
4530
|
+
* schedule-consistent formula (additions − deductions − claim, floored at
|
|
4531
|
+
* zero) and raises an issue quoting the literal spec text whenever 167 or
|
|
4532
|
+
* 169 is non-zero (the only case where the two readings diverge), so a
|
|
4533
|
+
* reviewer can check it against the real form — which, again, has no PDF in
|
|
4534
|
+
* this engine's sources to check against.
|
|
4535
|
+
*
|
|
4536
|
+
* ── Other flagged items ─────────────────────────────────────────────────────
|
|
4537
|
+
*
|
|
4538
|
+
* - CDE line 107 ("Deduct: other deductions or transfers", source lines
|
|
4539
|
+
* 13681-13691) carries a parenthetical "(Note: If 015139 is negative,
|
|
4540
|
+
* include the amount at 015107 as a positive value.)" — there is NO line
|
|
4541
|
+
* 139 anywhere else in this schedule's field list (CDE regular runs
|
|
4542
|
+
* 091-117 with no 108/109/113/114/116/139 gaps that resolve to it, and
|
|
4543
|
+
* no other pool numbers into the 130s except CDE-successor's own 133-137,
|
|
4544
|
+
* which are a different pool entirely). This looks like either an OCR
|
|
4545
|
+
* artifact or a reference to a paper-form-only field outside the NetFile
|
|
4546
|
+
* schema (the same category as Schedule 21's RIFE section). Not modelled;
|
|
4547
|
+
* flagged verbatim whenever the schedule is computed.
|
|
4548
|
+
* - Negative-pool amounts on FEDE, SFEDE and CFRE (claim lines 209, 221,
|
|
4549
|
+
* 253, 273, 293, 313) are, per the spec, "include[d] in 012040" — a
|
|
4550
|
+
* FEDERAL T2 line, entirely outside this schedule and this engine's
|
|
4551
|
+
* stated scope for Schedule 15. This module zeroes the claim/closing per
|
|
4552
|
+
* the schedule's own instruction and raises an issue noting the federal
|
|
4553
|
+
* inclusion is the caller's responsibility elsewhere.
|
|
4554
|
+
* - CFRE line 293's "B" component is capped at "the global foreign
|
|
4555
|
+
* resource limit for the year designated for that country" (source lines
|
|
4556
|
+
* 15703-15711) — a quantity with no definition or source anywhere in
|
|
4557
|
+
* this spec excerpt. Modelled as an optional plain-number INPUT per
|
|
4558
|
+
* country (`globalForeignResourceLimit`); omitting it makes B = 0 (the
|
|
4559
|
+
* conservative, under-claim direction) and raises an issue rather than
|
|
4560
|
+
* inventing a limit.
|
|
4561
|
+
*
|
|
4562
|
+
* Whole dollars, pure functions, no I/O.
|
|
4563
|
+
*/
|
|
4564
|
+
interface EdaRegularFederal {
|
|
4565
|
+
/** 012101 — balance at end of preceding taxation year. */
|
|
4566
|
+
openingBalance?: number;
|
|
4567
|
+
/** 012105 — transferred on amalgamation or wind-up of subsidiary. */
|
|
4568
|
+
amalgamationTransfer?: number;
|
|
4569
|
+
/** 012110 — transferred on sale of resource property to successor. */
|
|
4570
|
+
saleTransfer?: number;
|
|
4571
|
+
/** 012115 — claim for the year per federal Regulation 1201. */
|
|
4572
|
+
regulation1201Claim?: number;
|
|
4573
|
+
}
|
|
4574
|
+
interface EdaRegularInput {
|
|
4575
|
+
federal: EdaRegularFederal;
|
|
4576
|
+
/** Entered ONLY where the Alberta figure differs from federal. */
|
|
4577
|
+
albertaOverride?: Partial<EdaRegularFederal>;
|
|
4578
|
+
}
|
|
4579
|
+
interface EdaRegularResult {
|
|
4580
|
+
/** 015001 */
|
|
4581
|
+
openingBalance: number;
|
|
4582
|
+
/** 015003 */
|
|
4583
|
+
amalgamationTransfer: number;
|
|
4584
|
+
/** 015005 */
|
|
4585
|
+
saleTransfer: number;
|
|
4586
|
+
/** Pool before the year's claim: 015001 + 015003 − 015005. */
|
|
4587
|
+
poolBeforeClaim: number;
|
|
4588
|
+
/** 015007 */
|
|
4589
|
+
claim: number;
|
|
4590
|
+
/** 015009 */
|
|
4591
|
+
closingBalance: number;
|
|
4592
|
+
differsFromFederal: boolean;
|
|
4593
|
+
issues: string[];
|
|
4594
|
+
}
|
|
4595
|
+
declare function computeEdaRegular(input: EdaRegularInput): EdaRegularResult;
|
|
4596
|
+
interface EdaSuccessorFederal {
|
|
4597
|
+
/** 012126 */
|
|
4598
|
+
openingBalance?: number;
|
|
4599
|
+
/** 012130 */
|
|
4600
|
+
amalgamationTransfer?: number;
|
|
4601
|
+
/** 012132 — transferred other than on amalgamation or wind-up of subsidiary. */
|
|
4602
|
+
otherTransfer?: number;
|
|
4603
|
+
/** 012135 — transferred on sale of resource property. */
|
|
4604
|
+
saleTransfer?: number;
|
|
4605
|
+
/** 012140 — claim for the year per federal Regulation 1202(2). */
|
|
4606
|
+
regulation1202Claim?: number;
|
|
4607
|
+
}
|
|
4608
|
+
interface EdaSuccessorInput {
|
|
4609
|
+
federal: EdaSuccessorFederal;
|
|
4610
|
+
albertaOverride?: Partial<EdaSuccessorFederal>;
|
|
4611
|
+
}
|
|
4612
|
+
interface EdaSuccessorResult {
|
|
4613
|
+
/** 015011 */
|
|
4614
|
+
openingBalance: number;
|
|
4615
|
+
/** 015013 */
|
|
4616
|
+
amalgamationTransfer: number;
|
|
4617
|
+
/** 015015 */
|
|
4618
|
+
otherTransfer: number;
|
|
4619
|
+
/** 015017 */
|
|
4620
|
+
saleTransfer: number;
|
|
4621
|
+
/** Pool before claim: 015011 + 015013 + 015015 − 015017. */
|
|
4622
|
+
poolBeforeClaim: number;
|
|
4623
|
+
/** 015019 */
|
|
4624
|
+
claim: number;
|
|
4625
|
+
/** 015021 */
|
|
4626
|
+
closingBalance: number;
|
|
4627
|
+
differsFromFederal: boolean;
|
|
4628
|
+
issues: string[];
|
|
4629
|
+
}
|
|
4630
|
+
declare function computeEdaSuccessor(input: EdaSuccessorInput): EdaSuccessorResult;
|
|
4631
|
+
interface CmedbFederal {
|
|
4632
|
+
/** 012150 */
|
|
4633
|
+
openingBalance?: number;
|
|
4634
|
+
/** 012155 */
|
|
4635
|
+
amalgamationTransfer?: number;
|
|
4636
|
+
/** 012160 — transferred other than on amalgamation or wind-up of subsidiary. */
|
|
4637
|
+
otherTransfer?: number;
|
|
4638
|
+
/** 012165 — transferred on disposal of resource property to successor. */
|
|
4639
|
+
disposalTransfer?: number;
|
|
4640
|
+
}
|
|
4641
|
+
interface CmedbInput {
|
|
4642
|
+
federal: CmedbFederal;
|
|
4643
|
+
albertaOverride?: Partial<CmedbFederal>;
|
|
4644
|
+
/**
|
|
4645
|
+
* 015031 — claim for the year per federal Regulation 1203(1). The spec
|
|
4646
|
+
* gives NO federal default line for this field (unlike the EDA claims,
|
|
4647
|
+
* which default to fed 012115/012140) — it is a genuinely discretionary
|
|
4648
|
+
* Alberta claim, capped at the positive pool balance. Omit to claim the
|
|
4649
|
+
* maximum.
|
|
4650
|
+
*/
|
|
4651
|
+
claimed?: number;
|
|
4652
|
+
}
|
|
4653
|
+
interface CmedbResult {
|
|
4654
|
+
/** 015023 */
|
|
4655
|
+
openingBalance: number;
|
|
4656
|
+
/** 015025 */
|
|
4657
|
+
amalgamationTransfer: number;
|
|
4658
|
+
/** 015027 */
|
|
4659
|
+
otherTransfer: number;
|
|
4660
|
+
/** 015029 */
|
|
4661
|
+
disposalTransfer: number;
|
|
4662
|
+
/** Pool before claim: 015023 + 015025 + 015027 − 015029. */
|
|
4663
|
+
poolBeforeClaim: number;
|
|
4664
|
+
/** 015031 */
|
|
4665
|
+
claim: number;
|
|
4666
|
+
/** 015033 */
|
|
4667
|
+
closingBalance: number;
|
|
4668
|
+
differsFromFederal: boolean;
|
|
4669
|
+
issues: string[];
|
|
4670
|
+
}
|
|
4671
|
+
declare function computeCmedb(input: CmedbInput): CmedbResult;
|
|
4672
|
+
interface CeeRegularFederal {
|
|
4673
|
+
/** 012200 */
|
|
4674
|
+
openingBalance?: number;
|
|
4675
|
+
/** 012205 — current year expenses excluding look-back. MUST equal federal (no AB override). */
|
|
4676
|
+
currentYearExpenses: number;
|
|
4677
|
+
/** 012206 — current year expenses under the look-back rule, s.66(12.66). MUST equal federal. */
|
|
4678
|
+
lookBackExpenses?: number;
|
|
4679
|
+
/** 012210 — reclassified from CDE, ss.66.1(9)/66.7(9). MUST equal federal. */
|
|
4680
|
+
reclassifiedFromCde?: number;
|
|
4681
|
+
/** 012215 — transferred on amalgamation or wind-up of subsidiary. */
|
|
4682
|
+
amalgamationTransfer?: number;
|
|
4683
|
+
/** 012217 — Canadian renewable and conservation expenses. MUST equal federal. */
|
|
4684
|
+
renewableConservationExpenses?: number;
|
|
4685
|
+
/** 012220 — other additions. */
|
|
4686
|
+
otherAdditions?: number;
|
|
4687
|
+
/** 012225 — government assistance and grants. MUST equal federal. */
|
|
4688
|
+
governmentAssistance?: number;
|
|
4689
|
+
/** 012230 — other deductions or transfers. */
|
|
4690
|
+
otherDeductions?: number;
|
|
4691
|
+
/** 012243 — CEE renounced under a flow-through share agreement. MUST equal federal. */
|
|
4692
|
+
renouncedFlowThrough?: number;
|
|
4693
|
+
/** 012240 — transferred on disposition of resource property to successor. */
|
|
4694
|
+
transferredToSuccessor?: number;
|
|
4695
|
+
/** 012244 — expenses renounced under the look-back rule, s.66(12.66). MUST equal federal. */
|
|
4696
|
+
renouncedLookBack?: number;
|
|
4697
|
+
}
|
|
4698
|
+
/** Only the fields the spec permits an Alberta override for (the rest "must equal" federal). */
|
|
4699
|
+
type CeeRegularOverride = Partial<Pick<CeeRegularFederal, 'openingBalance' | 'amalgamationTransfer' | 'otherAdditions' | 'otherDeductions' | 'transferredToSuccessor'>>;
|
|
4700
|
+
interface CeeRegularInput {
|
|
4701
|
+
federal: CeeRegularFederal;
|
|
4702
|
+
albertaOverride?: CeeRegularOverride;
|
|
4703
|
+
/** 015061 — discretionary claim when the pool subtotal is positive. Omit to claim the maximum. */
|
|
4704
|
+
claimed?: number;
|
|
4705
|
+
}
|
|
4706
|
+
interface CeeRegularResult {
|
|
4707
|
+
openingBalance: number;
|
|
4708
|
+
currentYearExpenses: number;
|
|
4709
|
+
lookBackExpenses: number;
|
|
4710
|
+
reclassifiedFromCde: number;
|
|
4711
|
+
amalgamationTransfer: number;
|
|
4712
|
+
renewableConservationExpenses: number;
|
|
4713
|
+
otherAdditions: number;
|
|
4714
|
+
governmentAssistance: number;
|
|
4715
|
+
otherDeductions: number;
|
|
4716
|
+
renouncedFlowThrough: number;
|
|
4717
|
+
transferredToSuccessor: number;
|
|
4718
|
+
renouncedLookBack: number;
|
|
4719
|
+
/** Pool subtotal before the claim (015041+043+044+045+047+049+051-053-055-058-059-060). */
|
|
4720
|
+
subtotal: number;
|
|
4721
|
+
/** 015061 — claim, or income inclusion if the subtotal is ≤ 0. */
|
|
4722
|
+
claim: number;
|
|
4723
|
+
/** 015063 */
|
|
4724
|
+
closingBalance: number;
|
|
4725
|
+
differsFromFederal: boolean;
|
|
4726
|
+
issues: string[];
|
|
4727
|
+
}
|
|
4728
|
+
declare function computeCeeRegular(input: CeeRegularInput): CeeRegularResult;
|
|
4729
|
+
interface CeeSuccessorFederal {
|
|
4730
|
+
/** 012250 */
|
|
4731
|
+
openingBalance?: number;
|
|
4732
|
+
/** 012255 — reclassified from CDE. MUST equal federal. */
|
|
4733
|
+
reclassifiedFromCde?: number;
|
|
4734
|
+
/** 012260 — transferred on amalgamation or wind-up of subsidiary. */
|
|
4735
|
+
amalgamationTransfer?: number;
|
|
4736
|
+
/** 012265 — transferred other than on amalgamation or wind-up of subsidiary. */
|
|
4737
|
+
otherTransfer?: number;
|
|
4738
|
+
/** 012280 — other deductions or transfers. */
|
|
4739
|
+
otherDeductions?: number;
|
|
4740
|
+
/** 012290 — transferred on disposition of resource property to successor. */
|
|
4741
|
+
transferredToSuccessor?: number;
|
|
4742
|
+
}
|
|
4743
|
+
type CeeSuccessorOverride = Partial<Pick<CeeSuccessorFederal, 'openingBalance' | 'amalgamationTransfer' | 'otherTransfer' | 'otherDeductions' | 'transferredToSuccessor'>>;
|
|
4744
|
+
interface CeeSuccessorInput {
|
|
4745
|
+
federal: CeeSuccessorFederal;
|
|
4746
|
+
albertaOverride?: CeeSuccessorOverride;
|
|
4747
|
+
/** 015081 */
|
|
4748
|
+
claimed?: number;
|
|
4749
|
+
}
|
|
4750
|
+
interface CeeSuccessorResult {
|
|
4751
|
+
openingBalance: number;
|
|
4752
|
+
reclassifiedFromCde: number;
|
|
4753
|
+
amalgamationTransfer: number;
|
|
4754
|
+
otherTransfer: number;
|
|
4755
|
+
otherDeductions: number;
|
|
4756
|
+
transferredToSuccessor: number;
|
|
4757
|
+
/** Subtotal before claim: 015064+065+067+069-077-079. */
|
|
4758
|
+
subtotal: number;
|
|
4759
|
+
/** 015081 */
|
|
4760
|
+
claim: number;
|
|
4761
|
+
/** 015083 */
|
|
4762
|
+
closingBalance: number;
|
|
4763
|
+
differsFromFederal: boolean;
|
|
4764
|
+
issues: string[];
|
|
4765
|
+
}
|
|
4766
|
+
declare function computeCeeSuccessor(input: CeeSuccessorInput): CeeSuccessorResult;
|
|
4767
|
+
interface CdeRegularFederal {
|
|
4768
|
+
/** 012300 */
|
|
4769
|
+
openingBalance?: number;
|
|
4770
|
+
/** 012303 — current year expenses excluding look-back. MUST equal federal. */
|
|
4771
|
+
currentYearExpenses?: number;
|
|
4772
|
+
/** 012304 — current year expenses under the look-back rule. MUST equal federal. */
|
|
4773
|
+
lookBackExpenses?: number;
|
|
4774
|
+
/** 012305 — transferred on amalgamation or wind-up of subsidiary. */
|
|
4775
|
+
amalgamationTransfer?: number;
|
|
4776
|
+
/** 012310 — other additions. */
|
|
4777
|
+
otherAdditions?: number;
|
|
4778
|
+
/** 012315 — reclassified Canadian exploration expenses. MUST equal federal. */
|
|
4779
|
+
reclassifiedFromCee?: number;
|
|
4780
|
+
/** 012320 — government assistance and grants. MUST equal federal. */
|
|
4781
|
+
governmentAssistance?: number;
|
|
4782
|
+
/** 012325 — receivable on disposition of underground oil/gas storage rights or mining property. */
|
|
4783
|
+
receivableOnDisposition?: number;
|
|
4784
|
+
/**
|
|
4785
|
+
* 012335 — other deductions or transfers (015107). The spec's own text for
|
|
4786
|
+
* this field adds "(Note: If 015139 is negative, include the amount at
|
|
4787
|
+
* 015107 as a positive value.)" — line 015139 does not exist anywhere else
|
|
4788
|
+
* in this schedule's field list. NOT modelled; see the module doc comment.
|
|
4789
|
+
* This input is the federal 012335 figure only.
|
|
4790
|
+
*/
|
|
4791
|
+
otherDeductions?: number;
|
|
4792
|
+
/** 012343 — renounced under a flow-through share agreement. MUST equal federal. */
|
|
4793
|
+
renouncedFlowThrough?: number;
|
|
4794
|
+
/** 012340 — transferred on disposition of resource property to successor. */
|
|
4795
|
+
transferredToSuccessor?: number;
|
|
4796
|
+
/** 012344 — expenses renounced under the look-back rule. MUST equal federal. */
|
|
4797
|
+
renouncedLookBack?: number;
|
|
4798
|
+
/**
|
|
4799
|
+
* 012330 — the federal default for line 015105 when the CCOGPE-regular
|
|
4800
|
+
* pool subtotal is NOT negative (see `computeCdeRegular`'s `ccogpeRegular`
|
|
4801
|
+
* parameter for the negative-subtotal case, which overrides this).
|
|
4802
|
+
*/
|
|
4803
|
+
creditBalanceInCogpePool?: number;
|
|
4804
|
+
}
|
|
4805
|
+
type CdeRegularOverride = Partial<Pick<CdeRegularFederal, 'openingBalance' | 'amalgamationTransfer' | 'otherAdditions' | 'receivableOnDisposition' | 'otherDeductions' | 'transferredToSuccessor' | 'creditBalanceInCogpePool'>>;
|
|
4806
|
+
interface CdeRegularInput {
|
|
4807
|
+
federal: CdeRegularFederal;
|
|
4808
|
+
albertaOverride?: CdeRegularOverride;
|
|
4809
|
+
/** 015115 */
|
|
4810
|
+
claimed?: number;
|
|
4811
|
+
/** Days in the tax year, for the ≥357-day step proration. Default 365. */
|
|
4812
|
+
daysInTaxYear?: number;
|
|
4813
|
+
}
|
|
4814
|
+
interface CdeRegularResult {
|
|
4815
|
+
openingBalance: number;
|
|
4816
|
+
currentYearExpenses: number;
|
|
4817
|
+
lookBackExpenses: number;
|
|
4818
|
+
amalgamationTransfer: number;
|
|
4819
|
+
otherAdditions: number;
|
|
4820
|
+
reclassifiedFromCee: number;
|
|
4821
|
+
governmentAssistance: number;
|
|
4822
|
+
receivableOnDisposition: number;
|
|
4823
|
+
/** 015105 — see module doc comment for the CCOGPE ↔ CDE cross-linkage this implements. */
|
|
4824
|
+
creditBalanceInCogpePool: number;
|
|
4825
|
+
otherDeductions: number;
|
|
4826
|
+
renouncedFlowThrough: number;
|
|
4827
|
+
transferredToSuccessor: number;
|
|
4828
|
+
renouncedLookBack: number;
|
|
4829
|
+
/** Subtotal before claim (additions − deductions, excluding the claim itself). */
|
|
4830
|
+
subtotal: number;
|
|
4831
|
+
/** 015115 */
|
|
4832
|
+
claim: number;
|
|
4833
|
+
/** 015117 */
|
|
4834
|
+
closingBalance: number;
|
|
4835
|
+
differsFromFederal: boolean;
|
|
4836
|
+
issues: string[];
|
|
4837
|
+
}
|
|
4838
|
+
declare function computeCdeRegular(input: CdeRegularInput, /** The already-computed CCOGPE-regular pool, for line 015105's cross-pool formula. */
|
|
4839
|
+
|
|
4840
|
+
ccogpeRegular: {
|
|
4841
|
+
subtotal: number;
|
|
4842
|
+
}): CdeRegularResult;
|
|
4843
|
+
interface CdeSuccessorFederal {
|
|
4844
|
+
/** 012350 */
|
|
4845
|
+
openingBalance?: number;
|
|
4846
|
+
/** 012355 — transferred on amalgamation or wind-up of subsidiary. */
|
|
4847
|
+
amalgamationTransfer?: number;
|
|
4848
|
+
/** 012357 — transferred other than on amalgamation or wind-up of subsidiary. */
|
|
4849
|
+
otherTransfer?: number;
|
|
4850
|
+
/** 012365 — reclassified Canadian exploration expenses. MUST equal federal. */
|
|
4851
|
+
reclassifiedFromCee?: number;
|
|
4852
|
+
/**
|
|
4853
|
+
* 015133 — "Deduct: credit balance in the cumulative Canadian oil and gas
|
|
4854
|
+
* property expense pool". Unlike 015105, the spec gives NO federal default
|
|
4855
|
+
* line for this field, and its own formula text ("value may not exceed
|
|
4856
|
+
* amount A" when A is negative) is ambiguous about whether it means "value
|
|
4857
|
+
* = A" (as 015105 states unconditionally) or something looser. This module
|
|
4858
|
+
* treats it the same way as 015105 — auto-set to the negative CCOGPE-
|
|
4859
|
+
* successor subtotal when negative — and flags the ambiguity. See module
|
|
4860
|
+
* doc comment.
|
|
4861
|
+
*/
|
|
4862
|
+
creditBalanceInCogpePool?: number;
|
|
4863
|
+
/** 012385 — other deductions or transfers. */
|
|
4864
|
+
otherDeductions?: number;
|
|
4865
|
+
/** 012390 — transferred on disposition of resource property. */
|
|
4866
|
+
transferredToSuccessor?: number;
|
|
4867
|
+
}
|
|
4868
|
+
type CdeSuccessorOverride = Partial<Pick<CdeSuccessorFederal, 'openingBalance' | 'amalgamationTransfer' | 'otherTransfer' | 'creditBalanceInCogpePool' | 'otherDeductions' | 'transferredToSuccessor'>>;
|
|
4869
|
+
interface CdeSuccessorInput {
|
|
4870
|
+
federal: CdeSuccessorFederal;
|
|
4871
|
+
albertaOverride?: CdeSuccessorOverride;
|
|
4872
|
+
/** 015141 */
|
|
4873
|
+
claimed?: number;
|
|
4874
|
+
/** Days in the tax year, for the ≥357-day step proration. Default 365. */
|
|
4875
|
+
daysInTaxYear?: number;
|
|
4876
|
+
}
|
|
4877
|
+
interface CdeSuccessorResult {
|
|
4878
|
+
openingBalance: number;
|
|
4879
|
+
amalgamationTransfer: number;
|
|
4880
|
+
otherTransfer: number;
|
|
4881
|
+
reclassifiedFromCee: number;
|
|
4882
|
+
/** 015133 — see module doc comment. */
|
|
4883
|
+
creditBalanceInCogpePool: number;
|
|
4884
|
+
otherDeductions: number;
|
|
4885
|
+
transferredToSuccessor: number;
|
|
4886
|
+
subtotal: number;
|
|
4887
|
+
/** 015141 */
|
|
4888
|
+
claim: number;
|
|
4889
|
+
/** 015143 */
|
|
4890
|
+
closingBalance: number;
|
|
4891
|
+
differsFromFederal: boolean;
|
|
4892
|
+
issues: string[];
|
|
4893
|
+
}
|
|
4894
|
+
declare function computeCdeSuccessor(input: CdeSuccessorInput, /** The already-computed CCOGPE-successor pool, for line 015133's cross-pool formula. */
|
|
4895
|
+
|
|
4896
|
+
ccogpeSuccessor: {
|
|
4897
|
+
subtotal: number;
|
|
4898
|
+
}): CdeSuccessorResult;
|
|
4899
|
+
interface CcogpeRegularFederal {
|
|
4900
|
+
/** 012400 */
|
|
4901
|
+
openingBalance?: number;
|
|
4902
|
+
/** 012405 — current year expenses. MUST equal federal. */
|
|
4903
|
+
currentYearExpenses?: number;
|
|
4904
|
+
/** 012410 — transferred on amalgamation or wind-up of subsidiary. */
|
|
4905
|
+
amalgamationTransfer?: number;
|
|
4906
|
+
/** 012415 — other additions. */
|
|
4907
|
+
otherAdditions?: number;
|
|
4908
|
+
/** 012420 — received or receivable on disposition of Canadian oil and gas property. */
|
|
4909
|
+
receivableOnDisposition?: number;
|
|
4910
|
+
/** 012425 — government assistance and grants. MUST equal federal. */
|
|
4911
|
+
governmentAssistance?: number;
|
|
4912
|
+
/** 012435 — transferred on disposition of resource property to successor. */
|
|
4913
|
+
transferredToSuccessor?: number;
|
|
4914
|
+
/**
|
|
4915
|
+
* 012440 — other deductions or transfers (015167). May ALSO receive a
|
|
4916
|
+
* carryover from the CCOGPE-successor pool per line 189(b) when that pool
|
|
4917
|
+
* is negative and no s.66.7(4)(a)(iii) designation was made — NOT
|
|
4918
|
+
* auto-applied here; see module doc comment and `computeCcogpeSuccessor`'s
|
|
4919
|
+
* issues.
|
|
4920
|
+
*/
|
|
4921
|
+
otherDeductions?: number;
|
|
4922
|
+
}
|
|
4923
|
+
type CcogpeRegularOverride = Partial<Pick<CcogpeRegularFederal, 'openingBalance' | 'amalgamationTransfer' | 'otherAdditions' | 'receivableOnDisposition' | 'transferredToSuccessor' | 'otherDeductions'>>;
|
|
4924
|
+
interface CcogpeRegularInput {
|
|
4925
|
+
federal: CcogpeRegularFederal;
|
|
4926
|
+
albertaOverride?: CcogpeRegularOverride;
|
|
4927
|
+
/** 015169 */
|
|
4928
|
+
claimed?: number;
|
|
4929
|
+
/** Days in the tax year, for the ≥357-day step proration. Default 365. */
|
|
4930
|
+
daysInTaxYear?: number;
|
|
4931
|
+
}
|
|
4932
|
+
interface CcogpeRegularResult {
|
|
4933
|
+
openingBalance: number;
|
|
4934
|
+
currentYearExpenses: number;
|
|
4935
|
+
amalgamationTransfer: number;
|
|
4936
|
+
otherAdditions: number;
|
|
4937
|
+
receivableOnDisposition: number;
|
|
4938
|
+
governmentAssistance: number;
|
|
4939
|
+
transferredToSuccessor: number;
|
|
4940
|
+
otherDeductions: number;
|
|
4941
|
+
/** Subtotal before claim ("A" at source lines 14281-14283): 015151+153+155+157-159-161-165-167. */
|
|
4942
|
+
subtotal: number;
|
|
4943
|
+
/** 015169 */
|
|
4944
|
+
claim: number;
|
|
4945
|
+
/** 015171 */
|
|
4946
|
+
closingBalance: number;
|
|
4947
|
+
differsFromFederal: boolean;
|
|
4948
|
+
issues: string[];
|
|
4949
|
+
}
|
|
4950
|
+
declare function computeCcogpeRegular(input: CcogpeRegularInput): CcogpeRegularResult;
|
|
4951
|
+
interface CcogpeSuccessorFederal {
|
|
4952
|
+
/** 012450 */
|
|
4953
|
+
openingBalance?: number;
|
|
4954
|
+
/** 012455 — transferred on amalgamation or wind-up of subsidiary. */
|
|
4955
|
+
amalgamationTransfer?: number;
|
|
4956
|
+
/** 012460 — transferred other than on amalgamation or wind-up of subsidiary. */
|
|
4957
|
+
otherTransfer?: number;
|
|
4958
|
+
/** 012470 — received or receivable on disposition of Canadian oil and gas property. */
|
|
4959
|
+
receivableOnDisposition?: number;
|
|
4960
|
+
/** 012485 — transferred on disposition of resource property. */
|
|
4961
|
+
transferredToSuccessor?: number;
|
|
4962
|
+
/** 012490 — other deductions or transfers. */
|
|
4963
|
+
otherDeductions?: number;
|
|
4964
|
+
}
|
|
4965
|
+
type CcogpeSuccessorOverride = Partial<Pick<CcogpeSuccessorFederal, 'openingBalance' | 'amalgamationTransfer' | 'otherTransfer' | 'receivableOnDisposition' | 'transferredToSuccessor' | 'otherDeductions'>>;
|
|
4966
|
+
interface CcogpeSuccessorInput {
|
|
4967
|
+
federal: CcogpeSuccessorFederal;
|
|
4968
|
+
albertaOverride?: CcogpeSuccessorOverride;
|
|
4969
|
+
/** 015189 */
|
|
4970
|
+
claimed?: number;
|
|
4971
|
+
/** Days in the tax year, for the ≥357-day step proration. Default 365. */
|
|
4972
|
+
daysInTaxYear?: number;
|
|
4973
|
+
}
|
|
4974
|
+
interface CcogpeSuccessorResult {
|
|
4975
|
+
openingBalance: number;
|
|
4976
|
+
amalgamationTransfer: number;
|
|
4977
|
+
otherTransfer: number;
|
|
4978
|
+
receivableOnDisposition: number;
|
|
4979
|
+
transferredToSuccessor: number;
|
|
4980
|
+
otherDeductions: number;
|
|
4981
|
+
/** Subtotal before claim ("A" at source lines 14643-14645): 015173+175+177-181-185-187. */
|
|
4982
|
+
subtotal: number;
|
|
4983
|
+
/** 015189 */
|
|
4984
|
+
claim: number;
|
|
4985
|
+
/**
|
|
4986
|
+
* 015191 — computed with the clean additions−deductions−claim formula
|
|
4987
|
+
* (floored at 0), NOT the literal spec text's apparent "−015167−015169"
|
|
4988
|
+
* cross-pool subtraction. See module doc comment ("A second, independent
|
|
4989
|
+
* anomaly").
|
|
4990
|
+
*/
|
|
4991
|
+
closingBalance: number;
|
|
4992
|
+
differsFromFederal: boolean;
|
|
4993
|
+
issues: string[];
|
|
4994
|
+
}
|
|
4995
|
+
declare function computeCcogpeSuccessor(input: CcogpeSuccessorInput): CcogpeSuccessorResult;
|
|
4996
|
+
interface FedeRegularFederal {
|
|
4997
|
+
/** 012500 */
|
|
4998
|
+
openingBalance?: number;
|
|
4999
|
+
/** 012510 — transferred on amalgamation or wind-up of subsidiary. */
|
|
5000
|
+
amalgamationTransfer?: number;
|
|
5001
|
+
/**
|
|
5002
|
+
* 012515 — "other deductions or transfers" per the field caption; the
|
|
5003
|
+
* spec's own rule TEXT for this line instead describes "transferred on
|
|
5004
|
+
* disposition of resource property" (source lines 14829-14839), a
|
|
5005
|
+
* caption/rule-text mismatch. The federal line reference (012515) is
|
|
5006
|
+
* unambiguous either way, so this is a minor note, not a computation risk.
|
|
5007
|
+
*/
|
|
5008
|
+
otherDeductions?: number;
|
|
5009
|
+
/** 012530 — foreign-source resource income. MUST equal federal. Used as the claim's income cap. */
|
|
5010
|
+
foreignResourceIncome?: number;
|
|
5011
|
+
}
|
|
5012
|
+
type FedeRegularOverride = Partial<Pick<FedeRegularFederal, 'openingBalance' | 'amalgamationTransfer' | 'otherDeductions'>>;
|
|
5013
|
+
interface FedeRegularInput {
|
|
5014
|
+
federal: FedeRegularFederal;
|
|
5015
|
+
albertaOverride?: FedeRegularOverride;
|
|
5016
|
+
/** 015209 */
|
|
5017
|
+
claimed?: number;
|
|
5018
|
+
/** Days in the tax year, for the linear days/365 proration. Default 365. */
|
|
5019
|
+
daysInTaxYear?: number;
|
|
5020
|
+
}
|
|
5021
|
+
interface FedeRegularResult {
|
|
5022
|
+
openingBalance: number;
|
|
5023
|
+
amalgamationTransfer: number;
|
|
5024
|
+
otherDeductions: number;
|
|
5025
|
+
foreignResourceIncome: number;
|
|
5026
|
+
/** Pool: 015201+205-207. */
|
|
5027
|
+
pool: number;
|
|
5028
|
+
/** 015209 */
|
|
5029
|
+
claim: number;
|
|
5030
|
+
/** 015211 */
|
|
5031
|
+
closingBalance: number;
|
|
5032
|
+
differsFromFederal: boolean;
|
|
5033
|
+
issues: string[];
|
|
5034
|
+
}
|
|
5035
|
+
declare function computeFedeRegular(input: FedeRegularInput): FedeRegularResult;
|
|
5036
|
+
interface FedeSuccessorFederal {
|
|
5037
|
+
/** 012550 */
|
|
5038
|
+
openingBalance?: number;
|
|
5039
|
+
/** 012555 — transferred on amalgamation or wind-up of subsidiary. */
|
|
5040
|
+
amalgamationTransfer?: number;
|
|
5041
|
+
/** 012560 — transferred other than on amalgamation or wind-up of subsidiary. */
|
|
5042
|
+
otherTransfer?: number;
|
|
5043
|
+
/** 012565 — other deductions or transfers (same caption/rule-text mismatch as 015207; see FedeRegularFederal.otherDeductions). */
|
|
5044
|
+
otherDeductions?: number;
|
|
5045
|
+
/** 012580 — foreign-source resource income. MUST equal federal. */
|
|
5046
|
+
foreignResourceIncome?: number;
|
|
5047
|
+
}
|
|
5048
|
+
type FedeSuccessorOverride = Partial<Pick<FedeSuccessorFederal, 'openingBalance' | 'amalgamationTransfer' | 'otherTransfer' | 'otherDeductions'>>;
|
|
5049
|
+
interface FedeSuccessorInput {
|
|
5050
|
+
federal: FedeSuccessorFederal;
|
|
5051
|
+
albertaOverride?: FedeSuccessorOverride;
|
|
5052
|
+
/** 015221 */
|
|
5053
|
+
claimed?: number;
|
|
5054
|
+
}
|
|
5055
|
+
interface FedeSuccessorResult {
|
|
5056
|
+
openingBalance: number;
|
|
5057
|
+
amalgamationTransfer: number;
|
|
5058
|
+
otherTransfer: number;
|
|
5059
|
+
otherDeductions: number;
|
|
5060
|
+
foreignResourceIncome: number;
|
|
5061
|
+
/** Pool: 015213+215+217-219. */
|
|
5062
|
+
pool: number;
|
|
5063
|
+
/** 015221 — NO percentage rate, unlike the regular pool: capped only by pool and income. */
|
|
5064
|
+
claim: number;
|
|
5065
|
+
/** 015223 */
|
|
5066
|
+
closingBalance: number;
|
|
5067
|
+
differsFromFederal: boolean;
|
|
5068
|
+
issues: string[];
|
|
5069
|
+
}
|
|
5070
|
+
declare function computeFedeSuccessor(input: FedeSuccessorInput): FedeSuccessorResult;
|
|
5071
|
+
interface SfedeCountryRegularFederal {
|
|
5072
|
+
/** 012601 — 2-letter country code. MUST equal federal. */
|
|
5073
|
+
countryCode: string;
|
|
5074
|
+
/** 012600 */
|
|
5075
|
+
openingBalance?: number;
|
|
5076
|
+
/** 012610 — transferred on amalgamation or wind-up of subsidiary. */
|
|
5077
|
+
amalgamationTransfer?: number;
|
|
5078
|
+
/** 012611 — other additions. */
|
|
5079
|
+
otherAdditions?: number;
|
|
5080
|
+
/** 012615 — other deductions or transfers. */
|
|
5081
|
+
otherDeductions?: number;
|
|
5082
|
+
/** 012630 — foreign resource income for THIS country. MUST equal federal. */
|
|
5083
|
+
foreignResourceIncome?: number;
|
|
5084
|
+
}
|
|
5085
|
+
type SfedeCountryRegularOverride = Partial<Pick<SfedeCountryRegularFederal, 'openingBalance' | 'amalgamationTransfer' | 'otherAdditions' | 'otherDeductions'>>;
|
|
5086
|
+
interface SfedeCountryRegularInput {
|
|
5087
|
+
federal: SfedeCountryRegularFederal;
|
|
5088
|
+
albertaOverride?: SfedeCountryRegularOverride;
|
|
5089
|
+
/** 015253 */
|
|
5090
|
+
claimed?: number;
|
|
5091
|
+
/** Days in the tax year, for the linear days/365 proration. Default 365. */
|
|
5092
|
+
daysInTaxYear?: number;
|
|
5093
|
+
}
|
|
5094
|
+
interface SfedeCountryRegularResult {
|
|
5095
|
+
countryCode: string;
|
|
5096
|
+
openingBalance: number;
|
|
5097
|
+
amalgamationTransfer: number;
|
|
5098
|
+
otherAdditions: number;
|
|
5099
|
+
otherDeductions: number;
|
|
5100
|
+
foreignResourceIncome: number;
|
|
5101
|
+
/** Pool: 015243+247+249-251. */
|
|
5102
|
+
pool: number;
|
|
5103
|
+
/** 015253 */
|
|
5104
|
+
claim: number;
|
|
5105
|
+
/** 015255 */
|
|
5106
|
+
closingBalance: number;
|
|
5107
|
+
differsFromFederal: boolean;
|
|
5108
|
+
issues: string[];
|
|
5109
|
+
}
|
|
5110
|
+
declare function computeSfedeCountryRegular(input: SfedeCountryRegularInput): SfedeCountryRegularResult;
|
|
5111
|
+
interface SfedeCountrySuccessorFederal {
|
|
5112
|
+
/** 012651 — 2-letter country code. MUST equal federal. */
|
|
5113
|
+
countryCode: string;
|
|
5114
|
+
/** 012650 */
|
|
5115
|
+
openingBalance?: number;
|
|
5116
|
+
/** 012655 — transferred on amalgamation or wind-up of subsidiary. */
|
|
5117
|
+
amalgamationTransfer?: number;
|
|
5118
|
+
/** 012660 — transferred other than on amalgamation or wind-up of subsidiary. */
|
|
5119
|
+
otherTransfer?: number;
|
|
5120
|
+
/** 012665 — other deductions or transfers. */
|
|
5121
|
+
otherDeductions?: number;
|
|
5122
|
+
/** 012680 — foreign resource income for THIS country. MUST equal federal. */
|
|
5123
|
+
foreignResourceIncome?: number;
|
|
5124
|
+
}
|
|
5125
|
+
type SfedeCountrySuccessorOverride = Partial<Pick<SfedeCountrySuccessorFederal, 'openingBalance' | 'amalgamationTransfer' | 'otherTransfer' | 'otherDeductions'>>;
|
|
5126
|
+
interface SfedeCountrySuccessorInput {
|
|
5127
|
+
federal: SfedeCountrySuccessorFederal;
|
|
5128
|
+
albertaOverride?: SfedeCountrySuccessorOverride;
|
|
5129
|
+
/** 015273 */
|
|
5130
|
+
claimed?: number;
|
|
5131
|
+
}
|
|
5132
|
+
interface SfedeCountrySuccessorResult {
|
|
5133
|
+
countryCode: string;
|
|
5134
|
+
openingBalance: number;
|
|
5135
|
+
amalgamationTransfer: number;
|
|
5136
|
+
otherTransfer: number;
|
|
5137
|
+
otherDeductions: number;
|
|
5138
|
+
foreignResourceIncome: number;
|
|
5139
|
+
/** Pool: 015263+265+267-269. */
|
|
5140
|
+
pool: number;
|
|
5141
|
+
/** 015273 — NO percentage rate, capped only by pool and this country's income. */
|
|
5142
|
+
claim: number;
|
|
5143
|
+
/** 015275 */
|
|
5144
|
+
closingBalance: number;
|
|
5145
|
+
differsFromFederal: boolean;
|
|
5146
|
+
issues: string[];
|
|
5147
|
+
}
|
|
5148
|
+
declare function computeSfedeCountrySuccessor(input: SfedeCountrySuccessorInput): SfedeCountrySuccessorResult;
|
|
5149
|
+
interface CfreCountryRegularFederal {
|
|
5150
|
+
/** 012701 — 2-letter country code. MUST equal federal. */
|
|
5151
|
+
countryCode: string;
|
|
5152
|
+
/** 012700 */
|
|
5153
|
+
openingBalance?: number;
|
|
5154
|
+
/** 012705 — current year expenses. MUST equal federal. */
|
|
5155
|
+
currentYearExpenses?: number;
|
|
5156
|
+
/** 012710 — transferred on amalgamation or wind-up of subsidiary. */
|
|
5157
|
+
amalgamationTransfer?: number;
|
|
5158
|
+
/** 012711 — other additions. */
|
|
5159
|
+
otherAdditions?: number;
|
|
5160
|
+
/** 012715 — other deductions or transfers. */
|
|
5161
|
+
otherDeductions?: number;
|
|
5162
|
+
/** 012730 — foreign resource income (loss) for THIS country. MUST equal federal. */
|
|
5163
|
+
foreignResourceIncome?: number;
|
|
5164
|
+
}
|
|
5165
|
+
type CfreCountryRegularOverride = Partial<Pick<CfreCountryRegularFederal, 'openingBalance' | 'amalgamationTransfer' | 'otherAdditions' | 'otherDeductions'>>;
|
|
5166
|
+
interface CfreCountryRegularInput {
|
|
5167
|
+
federal: CfreCountryRegularFederal;
|
|
5168
|
+
albertaOverride?: CfreCountryRegularOverride;
|
|
5169
|
+
/** 015293 */
|
|
5170
|
+
claimed?: number;
|
|
5171
|
+
/** Days in the tax year, for the linear days/365 proration. Default 365. */
|
|
5172
|
+
daysInTaxYear?: number;
|
|
5173
|
+
/**
|
|
5174
|
+
* "The global foreign resource limit for the year designated for that
|
|
5175
|
+
* country" (source lines 15703-15711) — an undefined external quantity in
|
|
5176
|
+
* this spec excerpt. Omitting it makes the B-component of the claim zero
|
|
5177
|
+
* (the conservative, under-claim direction) and raises an issue. See
|
|
5178
|
+
* module doc comment.
|
|
5179
|
+
*/
|
|
5180
|
+
globalForeignResourceLimit?: number;
|
|
5181
|
+
}
|
|
5182
|
+
interface CfreCountryRegularResult {
|
|
5183
|
+
countryCode: string;
|
|
5184
|
+
openingBalance: number;
|
|
5185
|
+
currentYearExpenses: number;
|
|
5186
|
+
amalgamationTransfer: number;
|
|
5187
|
+
otherAdditions: number;
|
|
5188
|
+
otherDeductions: number;
|
|
5189
|
+
foreignResourceIncome: number;
|
|
5190
|
+
/** Pool: 015283+285+287+289-291. */
|
|
5191
|
+
pool: number;
|
|
5192
|
+
/** 015293 = A + B, see module doc comment. */
|
|
5193
|
+
claim: number;
|
|
5194
|
+
/** 015295 */
|
|
5195
|
+
closingBalance: number;
|
|
5196
|
+
differsFromFederal: boolean;
|
|
5197
|
+
issues: string[];
|
|
5198
|
+
}
|
|
5199
|
+
/**
|
|
5200
|
+
* CFRE regular claims need a second pass across all countries (line 015293's
|
|
5201
|
+
* "A" component caps at "total of all occurrences of 015297"), so this takes
|
|
5202
|
+
* the whole array and the pre-summed `sumForeignResourceIncome` across every
|
|
5203
|
+
* country's own 015297 rather than being called per-entry like the other
|
|
5204
|
+
* per-country pools.
|
|
5205
|
+
*/
|
|
5206
|
+
declare function computeCfreRegular(entries: readonly CfreCountryRegularInput[]): {
|
|
5207
|
+
entries: CfreCountryRegularResult[];
|
|
5208
|
+
issues: string[];
|
|
5209
|
+
};
|
|
5210
|
+
interface AlbertaSchedule15Input {
|
|
5211
|
+
eda?: {
|
|
5212
|
+
regular: EdaRegularInput;
|
|
5213
|
+
successor: EdaSuccessorInput;
|
|
5214
|
+
};
|
|
5215
|
+
cmedb?: CmedbInput;
|
|
5216
|
+
cee?: {
|
|
5217
|
+
regular: CeeRegularInput;
|
|
5218
|
+
successor: CeeSuccessorInput;
|
|
5219
|
+
};
|
|
5220
|
+
cde?: {
|
|
5221
|
+
regular: CdeRegularInput;
|
|
5222
|
+
successor: CdeSuccessorInput;
|
|
5223
|
+
};
|
|
5224
|
+
ccogpe?: {
|
|
5225
|
+
regular: CcogpeRegularInput;
|
|
5226
|
+
successor: CcogpeSuccessorInput;
|
|
5227
|
+
};
|
|
5228
|
+
fede?: {
|
|
5229
|
+
regular: FedeRegularInput;
|
|
5230
|
+
successor: FedeSuccessorInput;
|
|
1896
5231
|
};
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
federal: number;
|
|
5232
|
+
sfede?: {
|
|
5233
|
+
regular: readonly SfedeCountryRegularInput[];
|
|
5234
|
+
successor: readonly SfedeCountrySuccessorInput[];
|
|
1901
5235
|
};
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
federal: number;
|
|
5236
|
+
cfre?: {
|
|
5237
|
+
regular: readonly CfreCountryRegularInput[];
|
|
5238
|
+
successor: readonly CfreCountrySuccessorInput[];
|
|
1906
5239
|
};
|
|
5240
|
+
/** 000060 — is the corporation reporting different Alberta taxable income? Defaults to false. */
|
|
5241
|
+
reportsDifferentAlbertaIncome?: boolean;
|
|
1907
5242
|
/**
|
|
1908
|
-
*
|
|
1909
|
-
*
|
|
1910
|
-
*
|
|
1911
|
-
*
|
|
1912
|
-
* Build these with `schedule12LossDeductions` rather than by hand: the capital
|
|
1913
|
-
* one is NOT the raw amount applied.
|
|
5243
|
+
* 000061 — has the corporation elected different discretionary amounts, or
|
|
5244
|
+
* do opening balances differ? Defaults to false. The spec forces this to
|
|
5245
|
+
* true whenever 000060 is true.
|
|
1914
5246
|
*/
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
federal: number;
|
|
1931
|
-
};
|
|
5247
|
+
electsDifferentDiscretionaryAmounts?: boolean;
|
|
5248
|
+
}
|
|
5249
|
+
interface AlbertaSchedule15Result {
|
|
5250
|
+
eda?: {
|
|
5251
|
+
regular: EdaRegularResult;
|
|
5252
|
+
successor: EdaSuccessorResult;
|
|
5253
|
+
};
|
|
5254
|
+
cmedb?: CmedbResult;
|
|
5255
|
+
cee?: {
|
|
5256
|
+
regular: CeeRegularResult;
|
|
5257
|
+
successor: CeeSuccessorResult;
|
|
5258
|
+
};
|
|
5259
|
+
cde?: {
|
|
5260
|
+
regular: CdeRegularResult;
|
|
5261
|
+
successor: CdeSuccessorResult;
|
|
1932
5262
|
};
|
|
5263
|
+
ccogpe?: {
|
|
5264
|
+
regular: CcogpeRegularResult;
|
|
5265
|
+
successor: CcogpeSuccessorResult;
|
|
5266
|
+
};
|
|
5267
|
+
fede?: {
|
|
5268
|
+
regular: FedeRegularResult;
|
|
5269
|
+
successor: FedeSuccessorResult;
|
|
5270
|
+
};
|
|
5271
|
+
sfede?: {
|
|
5272
|
+
regular: SfedeCountryRegularResult[];
|
|
5273
|
+
successor: SfedeCountrySuccessorResult[];
|
|
5274
|
+
};
|
|
5275
|
+
cfre?: {
|
|
5276
|
+
regular: CfreCountryRegularResult[];
|
|
5277
|
+
successor: CfreCountrySuccessorResult[];
|
|
5278
|
+
};
|
|
5279
|
+
/** Whether the TRA requires form 015 to be filed. */
|
|
5280
|
+
formRequired: boolean;
|
|
5281
|
+
/** Whether form 015 may be filed at all — false when both 000060 and 000061 are 2. */
|
|
5282
|
+
formPermitted: boolean;
|
|
5283
|
+
issues: string[];
|
|
1933
5284
|
}
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
*/
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
restrictedFarm?: LossContinuityResult;
|
|
1958
|
-
farm?: LossContinuityResult;
|
|
1959
|
-
}, federal?: {
|
|
1960
|
-
nonCapital?: LossContinuityResult;
|
|
1961
|
-
capital?: LossContinuityResult;
|
|
1962
|
-
restrictedFarm?: LossContinuityResult;
|
|
1963
|
-
farm?: LossContinuityResult;
|
|
1964
|
-
}, inclusionRate?: number): NonNullable<Schedule12FilingInput['lossDeductions']>;
|
|
1965
|
-
declare function schedule12Values(input: Schedule12FilingInput): At1ScheduleData;
|
|
1966
|
-
/**
|
|
1967
|
-
* FIVE independent loss continuities on one schedule, each with its own opening,
|
|
1968
|
-
* additions, deductions and closing. Verified line by line against the live form:
|
|
1969
|
-
*
|
|
1970
|
-
* pool opening current carry-back closing
|
|
1971
|
-
* non-capital 031 037 047 049
|
|
1972
|
-
* capital 051 057 067 069
|
|
1973
|
-
* farm 071 077 085 087
|
|
1974
|
-
* restricted farm 091 097 105 107
|
|
1975
|
-
* listed personal property 111 117 123 125
|
|
1976
|
-
*
|
|
1977
|
-
* The first part of the schedule computes the current-year non-capital loss and
|
|
1978
|
-
* puts it on **021**, starting from *"Net Income (loss) per AB Sched. 12 line
|
|
1979
|
-
* 054"* — the Schedule 12 → Schedule 21 chain, stated on the form itself.
|
|
1980
|
-
*
|
|
1981
|
-
* Several closing figures carry BACK to Schedule 12 as deductions, which the form
|
|
1982
|
-
* also states beside each line: the non-capital amount applied against taxable
|
|
1983
|
-
* income goes to Schedule 12 line **064**, the capital amount (× the inclusion
|
|
1984
|
-
* rate) to **066**, farm to **070**, restricted farm to **068**. Those
|
|
1985
|
-
* cross-schedule links are not modelled here — this builder emits Schedule 21's
|
|
1986
|
-
* own lines, and the caller supplies Schedule 12's figures directly.
|
|
1987
|
-
*
|
|
1988
|
-
* Only the lines the engine computes are emitted. The section 80 and
|
|
1989
|
-
* other-adjustment lines in between are conditional rather than mandatory, so an
|
|
1990
|
-
* absent one is left off rather than zeroed.
|
|
1991
|
-
*/
|
|
1992
|
-
interface Schedule21FilingInput {
|
|
1993
|
-
/** 021021 — the current year non-capital loss, from the first part. */
|
|
1994
|
-
currentYearNonCapitalLoss?: number;
|
|
1995
|
-
nonCapital?: LossContinuityResult;
|
|
1996
|
-
capital?: LossContinuityResult;
|
|
1997
|
-
farm?: LossContinuityResult;
|
|
1998
|
-
restrictedFarm?: LossContinuityResult;
|
|
1999
|
-
listedPersonalProperty?: LossContinuityResult;
|
|
5285
|
+
declare function computeAlbertaSchedule15(input: AlbertaSchedule15Input): AlbertaSchedule15Result;
|
|
5286
|
+
interface CfreCountrySuccessorFederal {
|
|
5287
|
+
/** 012751 — 2-letter country code. MUST equal federal. */
|
|
5288
|
+
countryCode: string;
|
|
5289
|
+
/** 012750 */
|
|
5290
|
+
openingBalance?: number;
|
|
5291
|
+
/** 012755 — transferred on amalgamation or wind-up of subsidiary. */
|
|
5292
|
+
amalgamationTransfer?: number;
|
|
5293
|
+
/** 012760 — transferred other than on amalgamation or wind-up of subsidiary. */
|
|
5294
|
+
otherTransfer?: number;
|
|
5295
|
+
/** 012765 — other deductions or transfers. */
|
|
5296
|
+
otherDeductions?: number;
|
|
5297
|
+
/** 012780 — foreign resource income (loss) for THIS country. MUST equal federal. */
|
|
5298
|
+
foreignResourceIncome?: number;
|
|
5299
|
+
}
|
|
5300
|
+
type CfreCountrySuccessorOverride = Partial<Pick<CfreCountrySuccessorFederal, 'openingBalance' | 'amalgamationTransfer' | 'otherTransfer' | 'otherDeductions'>>;
|
|
5301
|
+
interface CfreCountrySuccessorInput {
|
|
5302
|
+
federal: CfreCountrySuccessorFederal;
|
|
5303
|
+
albertaOverride?: CfreCountrySuccessorOverride;
|
|
5304
|
+
/** 015313 */
|
|
5305
|
+
claimed?: number;
|
|
5306
|
+
/** Days in the tax year, for the linear days/365 proration. Default 365. */
|
|
5307
|
+
daysInTaxYear?: number;
|
|
2000
5308
|
}
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
*/
|
|
2017
|
-
interface Schedule1FilingInput {
|
|
2018
|
-
result: AlbertaSbdResult;
|
|
2019
|
-
/** 001001 — associated with one or more CCPCs. */
|
|
2020
|
-
isAssociated?: boolean;
|
|
2021
|
-
/** 001003 — active business income. */
|
|
2022
|
-
activeBusinessIncome?: number;
|
|
2023
|
-
/** 001009 — Alberta taxable income, adjusted. */
|
|
2024
|
-
albertaTaxableIncome?: number;
|
|
2025
|
-
/** 001005 / 001011 — royalty tax deduction, where one applies. */
|
|
2026
|
-
royaltyTaxDeduction?: number;
|
|
5309
|
+
interface CfreCountrySuccessorResult {
|
|
5310
|
+
countryCode: string;
|
|
5311
|
+
openingBalance: number;
|
|
5312
|
+
amalgamationTransfer: number;
|
|
5313
|
+
otherTransfer: number;
|
|
5314
|
+
otherDeductions: number;
|
|
5315
|
+
foreignResourceIncome: number;
|
|
5316
|
+
/** Pool: 015303+305+307-309. */
|
|
5317
|
+
pool: number;
|
|
5318
|
+
/** 015313, capped at 30%-prorated pool OR the sum of every country's 015317. */
|
|
5319
|
+
claim: number;
|
|
5320
|
+
/** 015315 */
|
|
5321
|
+
closingBalance: number;
|
|
5322
|
+
differsFromFederal: boolean;
|
|
5323
|
+
issues: string[];
|
|
2027
5324
|
}
|
|
2028
|
-
|
|
5325
|
+
/** Line 015313 caps at "total of all occurrence of 015317", so this also processes the whole array. */
|
|
5326
|
+
declare function computeCfreSuccessor(entries: readonly CfreCountrySuccessorInput[]): {
|
|
5327
|
+
entries: CfreCountrySuccessorResult[];
|
|
5328
|
+
issues: string[];
|
|
5329
|
+
};
|
|
2029
5330
|
/**
|
|
2030
|
-
*
|
|
2031
|
-
*
|
|
2032
|
-
*
|
|
2033
|
-
*
|
|
2034
|
-
*
|
|
2035
|
-
* 006 gross revenue in Alberta (C)
|
|
2036
|
-
* 008 gross revenue, all jurisdictions (D)
|
|
2037
|
-
*
|
|
2038
|
-
* The factor itself — `(A/B + C/D) × ½` — is a computed column with no line of its
|
|
2039
|
-
* own on the schedule; it is reported on the jacket at 000065.
|
|
5331
|
+
* `scheduleNNValues` for Schedule 15, following the `at1-schedule-line-items.ts`
|
|
5332
|
+
* builder pattern (see `schedule3Values` in `schedule3-other-deductions-credits.ts`
|
|
5333
|
+
* for the exact convention this copies). Kept in THIS file rather than the
|
|
5334
|
+
* shared filing module per the task instructions — other agents are editing
|
|
5335
|
+
* `at1-schedule-line-items.ts` concurrently.
|
|
2040
5336
|
*/
|
|
2041
|
-
interface
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
albertaRevenue?: number;
|
|
2045
|
-
totalRevenue?: number;
|
|
5337
|
+
interface At1ScheduleValueLike {
|
|
5338
|
+
lineItemId: string;
|
|
5339
|
+
value: string | number;
|
|
2046
5340
|
}
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
*
|
|
2051
|
-
* non-capital 002 available · 004 / 006 / 008 per preceding year · 010 balance
|
|
2052
|
-
* capital 042 gross · 044 / 046 / 048 applied · —
|
|
2053
|
-
*
|
|
2054
|
-
* The preceding-year rows also carry the year-end DATES on 003 / 005 / 007, which
|
|
2055
|
-
* are the caller's to supply.
|
|
2056
|
-
*
|
|
2057
|
-
* **The capital column is applied at the inclusion rate**, not gross: the form's
|
|
2058
|
-
* two columns are headed "Gross Amount" and "Amount of Loss Applied (Inclusion
|
|
2059
|
-
* Rate X Capital Loss)". Same trap as the Schedule 21 → 12 carry-forward.
|
|
2060
|
-
*/
|
|
2061
|
-
interface Schedule10FilingInput {
|
|
2062
|
-
nonCapital?: LossCarrybackResult;
|
|
2063
|
-
capital?: LossCarrybackResult;
|
|
2064
|
-
/** Year-end dates for the three preceding years, `YYYYMMDD`. */
|
|
2065
|
-
precedingYearEnds?: readonly string[];
|
|
2066
|
-
/** Capital losses are applied at this rate. Defaults to ½. */
|
|
2067
|
-
inclusionRate?: number;
|
|
5341
|
+
interface At1ScheduleDataLike {
|
|
5342
|
+
scheduleId: string;
|
|
5343
|
+
values: At1ScheduleValueLike[];
|
|
2068
5344
|
}
|
|
2069
|
-
declare function schedule10Values(input: Schedule10FilingInput): At1ScheduleData;
|
|
2070
5345
|
/**
|
|
2071
|
-
*
|
|
2072
|
-
*
|
|
2073
|
-
*
|
|
2074
|
-
*
|
|
2075
|
-
*
|
|
2076
|
-
*
|
|
2077
|
-
*
|
|
2078
|
-
*
|
|
2079
|
-
*
|
|
2080
|
-
*
|
|
5346
|
+
* `computeAlbertaSchedule15`'s `issues` documents every ambiguous formula this
|
|
5347
|
+
* module resolved a judgment call on (the 015105/015133/015167 CCOGPE↔CDE
|
|
5348
|
+
* routing, the 015191 anomaly, the unresolved 015139 reference — see the
|
|
5349
|
+
* module doc comment). `schedule15Values` files whatever number the engine
|
|
5350
|
+
* actually resolved each of those lines to — it does NOT drop a line because
|
|
5351
|
+
* its formula was ambiguous — but a `{ scheduleId, values }` pair has nowhere
|
|
5352
|
+
* to carry the ambiguity flags themselves. `Schedule15FilingResult` adds
|
|
5353
|
+
* `issues` alongside the standard shape so a caller (or a reviewer) can see
|
|
5354
|
+
* both the filed numbers and the exact judgment calls behind them in one
|
|
5355
|
+
* place; it remains a valid `At1ScheduleDataLike` wherever only that narrower
|
|
5356
|
+
* shape is expected, since every required field is still present.
|
|
2081
5357
|
*/
|
|
2082
|
-
interface
|
|
2083
|
-
|
|
2084
|
-
charitable?: Schedule20Result;
|
|
2085
|
-
/** The gifts continuity (Canada/province, cultural property, ecological land). */
|
|
2086
|
-
gifts?: Schedule20Result;
|
|
2087
|
-
/** Area B — the maximum deduction calculation. */
|
|
2088
|
-
maximum?: DonationMaximumResult;
|
|
5358
|
+
interface Schedule15FilingResult extends At1ScheduleDataLike {
|
|
5359
|
+
issues: string[];
|
|
2089
5360
|
}
|
|
2090
|
-
declare function schedule20Values(input: Schedule20FilingInput): At1ScheduleData;
|
|
2091
|
-
/**
|
|
2092
|
-
* The SR&ED expenditure POOL — a deduction against income, not the investment tax
|
|
2093
|
-
* credit and not the innovation grant.
|
|
2094
|
-
*
|
|
2095
|
-
* Line numbers and the subtotal formula verified against the live form, which
|
|
2096
|
-
* states it exactly as transcribed:
|
|
2097
|
-
*
|
|
2098
|
-
* 016 = 002 − (004 + 006 + 008) + 010 + 012 + 014 + 015
|
|
2099
|
-
*
|
|
2100
|
-
* and closes the year-over-year chain in as many words: line 022 is *"the carry
|
|
2101
|
-
* forward amount for next year, line 012"*.
|
|
2102
|
-
*/
|
|
2103
|
-
declare function schedule16Values(result: AlbertaSchedule16Result): At1ScheduleData;
|
|
2104
|
-
//#endregion
|
|
2105
|
-
//#region src/t2/at1/schedules/schedule2.d.ts
|
|
2106
5361
|
/**
|
|
2107
|
-
*
|
|
2108
|
-
*
|
|
2109
|
-
*
|
|
2110
|
-
*
|
|
2111
|
-
*
|
|
2112
|
-
*
|
|
2113
|
-
*
|
|
2114
|
-
*
|
|
2115
|
-
*
|
|
2116
|
-
* AT1 emits the factor to six decimals (Line-Item-ID 000065001), so the result is
|
|
2117
|
-
* rounded to 6 dp to match the return.
|
|
5362
|
+
* Field ids per the spec transcription in the module doc comment:
|
|
5363
|
+
* EDA 001-021 CMEDB 023-033 CEE 041-083 CDE 091-143
|
|
5364
|
+
* CCOGPE 151-191 FEDE 201-233 SFEDE 241-277 (per country)
|
|
5365
|
+
* CFRE 281-317 (per country)
|
|
5366
|
+
* A pool absent from `result` (never supplied to `computeAlbertaSchedule15`)
|
|
5367
|
+
* emits NOTHING — there is no zero-filled line for a pool the corporation
|
|
5368
|
+
* does not carry, matching every other reconciliation-style AT1 schedule
|
|
5369
|
+
* builder in this package (e.g. `schedule18Values` only emits categories that
|
|
5370
|
+
* were actually computed).
|
|
2118
5371
|
*/
|
|
2119
|
-
|
|
2120
|
-
albertaGrossRevenue: number;
|
|
2121
|
-
totalGrossRevenue: number;
|
|
2122
|
-
albertaSalaries: number;
|
|
2123
|
-
totalSalaries: number;
|
|
2124
|
-
}
|
|
2125
|
-
/** Single Alberta PE, none elsewhere → all income is Alberta income. */
|
|
2126
|
-
declare const SINGLE_JURISDICTION_ALBERTA_FACTOR = 1;
|
|
2127
|
-
declare function computeAllocationFactor(input: AllocationFactorInput): number;
|
|
5372
|
+
declare function schedule15Values(result: AlbertaSchedule15Result): Schedule15FilingResult;
|
|
2128
5373
|
//#endregion
|
|
2129
5374
|
//#region src/t2/at1/engine/alberta-return.d.ts
|
|
2130
5375
|
interface AlbertaReturnInput {
|
|
@@ -2154,10 +5399,28 @@ interface AlbertaReturnInput {
|
|
|
2154
5399
|
*/
|
|
2155
5400
|
schedules?: {
|
|
2156
5401
|
smallBusinessDeduction?: Schedule1FilingInput;
|
|
2157
|
-
allocation?: Schedule2FilingInput;
|
|
2158
|
-
|
|
5402
|
+
allocation?: Schedule2FilingInput; /** Alberta other tax deductions and credits — ITC / CITC / APITC (Sch 3). */
|
|
5403
|
+
otherDeductionsCredits?: Schedule3Result; /** Alberta foreign investment income tax credit (Sch 4). */
|
|
5404
|
+
foreignInvestmentTaxCredit?: Schedule4Result$1; /** Alberta royalty tax deduction — Crown Royalty Tax Deduction pools (Sch 5). */
|
|
5405
|
+
royaltyTaxDeduction?: AlbertaSchedule5Result; /** Alberta royalty tax credit (Sch 6). */
|
|
5406
|
+
royaltyTaxCredit?: AlbertaSchedule6Result; /** Alberta royalty tax credit / deduction supplemental information (Sch 7). */
|
|
5407
|
+
royaltySupplemental?: AlbertaSchedule7Result; /** Alberta political contributions tax credit (Sch 8). */
|
|
5408
|
+
politicalContributions?: Schedule8Result;
|
|
5409
|
+
/**
|
|
5410
|
+
* Alberta SR&ED tax credit — the CREDIT, distinct from Sch 16's deduction
|
|
5411
|
+
* pool (Sch 9). `group` is the page-3 associated-group allocation detail;
|
|
5412
|
+
* supplied only when `AlbertaSchedule9Result` came from an associated
|
|
5413
|
+
* corporation with a group actually entered.
|
|
5414
|
+
*/
|
|
5415
|
+
sredTaxCredit?: {
|
|
5416
|
+
result: AlbertaSchedule9Result;
|
|
5417
|
+
group?: Schedule9GroupFilingInput;
|
|
5418
|
+
};
|
|
5419
|
+
lossCarryback?: Schedule10FilingInput; /** Alberta manufacturing and processing profits deduction — historical, pre-2001-04-01 only (Sch 11). */
|
|
5420
|
+
manufacturingProcessing?: Schedule11Result;
|
|
2159
5421
|
reconciliation?: Schedule12FilingInput;
|
|
2160
|
-
cca?: AlbertaSchedule13Result;
|
|
5422
|
+
cca?: AlbertaSchedule13Result; /** Alberta resource related deductions — eight expense-pool continuities (Sch 15). */
|
|
5423
|
+
resourceDeductions?: AlbertaSchedule15Result;
|
|
2161
5424
|
scientificResearch?: AlbertaSchedule16Result;
|
|
2162
5425
|
reserves?: AlbertaSchedule17Result;
|
|
2163
5426
|
dispositions?: AlbertaSchedule18Result;
|
|
@@ -2169,7 +5432,38 @@ interface AlbertaReturnInput {
|
|
|
2169
5432
|
* is claimed, which is right for the great majority of returns.
|
|
2170
5433
|
*/
|
|
2171
5434
|
ieg?: {
|
|
2172
|
-
/**
|
|
5435
|
+
/**
|
|
5436
|
+
* This corporation's current-year eligible SR&ED carried out IN ALBERTA
|
|
5437
|
+
* (Schedule 29 line 031). Either supply this directly, or supply
|
|
5438
|
+
* `eligible` (and optionally `at4970`) and let the pipeline derive it —
|
|
5439
|
+
* the way the live form actually works. Deriving it here is not
|
|
5440
|
+
* optional decoration: line 031 is `eligible.albertaPortion −
|
|
5441
|
+
* federalProxyAmount + albertaProxyAmount + iegReducingFederalExpenditure
|
|
5442
|
+
* + repaymentOrContractPayment`, not a preparer-typed number. Ignored
|
|
5443
|
+
* when `eligible` is supplied.
|
|
5444
|
+
*/
|
|
5445
|
+
eligibleExpenditures?: number;
|
|
5446
|
+
/**
|
|
5447
|
+
* Schedule 29 page 1 — derives line 031 from federal T661. When
|
|
5448
|
+
* `albertaPortion` / `federalProxyAmount` / `albertaProxyAmount` are
|
|
5449
|
+
* omitted here AND `at4970` is supplied, they default to the AT4970
|
|
5450
|
+
* attachment's own totals (105/111/113) — the transcription the live
|
|
5451
|
+
* form itself requires. Supplying them here overrides that default.
|
|
5452
|
+
*/
|
|
5453
|
+
eligible?: {
|
|
5454
|
+
/** Line 003 — federal qualified/current SR&ED expenditures (T661 line 559 or 557). */federalAmount: number; /** Line 005 — portion of 003 carried out in Alberta. Defaults from `at4970`'s totals. */
|
|
5455
|
+
albertaPortion?: number; /** Line 007. Defaults from `at4970`'s totals. */
|
|
5456
|
+
federalProxyAmount?: number; /** Line 009. Defaults from `at4970`'s totals. */
|
|
5457
|
+
albertaProxyAmount?: number; /** Line 011 — see `schedule29-eligible-expenditures.ts`'s Step 1 / Step 2 note. */
|
|
5458
|
+
iegReducingFederalExpenditure?: number; /** Line 025 — repayment of government assistance or a contract payment. */
|
|
5459
|
+
repaymentOrContractPayment?: number;
|
|
5460
|
+
};
|
|
5461
|
+
/**
|
|
5462
|
+
* AT4970 — Listing of Innovation Employment Grant Projects, filed as its
|
|
5463
|
+
* own attachment. Also feeds `eligible`'s defaults — see above.
|
|
5464
|
+
*/
|
|
5465
|
+
at4970?: At4970Input; /** Line 040 — primary field of science or technology, 1 to 4. */
|
|
5466
|
+
primaryFieldCode?: 1 | 2 | 3 | 4;
|
|
2173
5467
|
/**
|
|
2174
5468
|
* Every member of the associated group, INCLUDING this corporation. A group
|
|
2175
5469
|
* of one is simply a group of one — pass it anyway, so the same path computes
|
|
@@ -2209,6 +5503,8 @@ interface AlbertaReturnResult {
|
|
|
2209
5503
|
iegGroup?: IegGroupResult;
|
|
2210
5504
|
/** The formal Agreement Among Associated Corporations, when one was filed. */
|
|
2211
5505
|
iegAgreement?: IegAgreementResult;
|
|
5506
|
+
/** Schedule 29 page 1 — the eligible-expenditures derivation, when `ieg.eligible` was supplied. */
|
|
5507
|
+
iegEligibleExpenditures?: IegEligibleExpendituresResult;
|
|
2212
5508
|
/** Schedule 29 detail. */
|
|
2213
5509
|
ieg?: IegResult;
|
|
2214
5510
|
/**
|
|
@@ -2264,6 +5560,19 @@ interface At1TransmitterInfo {
|
|
|
2264
5560
|
phone: string;
|
|
2265
5561
|
email: string;
|
|
2266
5562
|
};
|
|
5563
|
+
/**
|
|
5564
|
+
* EDI071001 — amended return indicator. §3.3.6.1: optional, "1" = Yes; there
|
|
5565
|
+
* is no "2"/No value defined — the field is either "1" or OMITTED, never a
|
|
5566
|
+
* negative answer, unlike the jacket's 1/2 yes-no fields (`at1YesNo`).
|
|
5567
|
+
*/
|
|
5568
|
+
isAmended?: boolean;
|
|
5569
|
+
/**
|
|
5570
|
+
* EDI073001 — description of changes, 1-100 chars. Mandatory when
|
|
5571
|
+
* `isAmended` is true; the specification requires the line be OMITTED
|
|
5572
|
+
* entirely (not blank) when the return is not amended — enforced by
|
|
5573
|
+
* `assertAt1MandatoryComplete` and the line-item's own `get`.
|
|
5574
|
+
*/
|
|
5575
|
+
amendmentDescription?: string;
|
|
2267
5576
|
}
|
|
2268
5577
|
interface At1FilingData {
|
|
2269
5578
|
softwareCertCode: string;
|
|
@@ -4652,6 +7961,18 @@ interface FederalT2Input {
|
|
|
4652
7961
|
schedule1Deductions?: readonly Schedule1Line[];
|
|
4653
7962
|
/** Schedule 8 CCA class inputs — engine computes the deduction + recapture + terminal loss. */
|
|
4654
7963
|
ccaClasses?: readonly CcaClassInput[];
|
|
7964
|
+
/**
|
|
7965
|
+
* Class 13 (leasehold interests), the FULL Reg 1100(1)(b)/Schedule III
|
|
7966
|
+
* mechanic — per-layer capital cost and lease term, the 5-to-40-year period
|
|
7967
|
+
* floor, all of it. Separate from `ccaClasses`: a class-13/14 row THERE
|
|
7968
|
+
* only ever represents an EXISTING opening-UCC pool with no current-year
|
|
7969
|
+
* addition (see `schedule8.ts`'s `computeStraightLineOpeningBalanceClass`)
|
|
7970
|
+
* and refuses one. Supply a NEW layer here instead — this is the entry
|
|
7971
|
+
* point that has the lease-term data to amortise it correctly.
|
|
7972
|
+
*/
|
|
7973
|
+
class13?: Class13Input;
|
|
7974
|
+
/** Class 14 (limited-life intangibles), the full per-property Reg 1100(1)(c) mechanic. */
|
|
7975
|
+
class14?: Class14Input;
|
|
4655
7976
|
/**
|
|
4656
7977
|
* Schedule 6 capital-property dispositions — engine computes the taxable capital
|
|
4657
7978
|
* gain (added to income) and any current-year net capital loss (→ Schedule 4).
|
|
@@ -4885,6 +8206,10 @@ interface FederalT2Result {
|
|
|
4885
8206
|
lossCarryback?: LossCarrybackResult;
|
|
4886
8207
|
/** Schedule 8 — CCA by class + closing UCC to carry forward (when ccaClasses given). */
|
|
4887
8208
|
cca?: CcaScheduleResult;
|
|
8209
|
+
/** Schedule 8 — Class 13 leasehold layers (when `class13` given). */
|
|
8210
|
+
class13?: Class13Result;
|
|
8211
|
+
/** Schedule 8 — Class 14 limited-life properties (when `class14` given). */
|
|
8212
|
+
class14?: Class14Result;
|
|
4888
8213
|
/** Schedule 6 — capital dispositions, taxable capital gain, net capital loss (when given). */
|
|
4889
8214
|
capitalGains?: Schedule6Result;
|
|
4890
8215
|
/** Schedule 5 — provincial/territorial tax (when a single Schedule-5 province is set). */
|
|
@@ -5886,4 +9211,4 @@ interface MpDeductionResult {
|
|
|
5886
9211
|
}
|
|
5887
9212
|
declare function computeMpDeduction(input: MpDeductionInput, rates?: MpDeductionRates): MpDeductionResult;
|
|
5888
9213
|
//#endregion
|
|
5889
|
-
export { QuebecTaxResult as $, At1DispositionCategory as $a, At1ScheduleValue as $i, mealsAndEntertainmentAddBack as $n, resolveCcaRates as $o, Schedule12Adjustment as $r, ItcRecaptureItem as $t, T2CifGifi as A, computeIegGroupFigures as Aa, At1CriticalFieldMissingError as Ai, Schedule4Input as An, computeSchedule8 as Ao, PartITaxResult as Ar, computeSchedule55 as At, Co17Certification as B, DonationMaximumResult as Ba, at1YesNo as Bi, computeSchedule2 as Bn, Class14Result as Bo, CORP_TAX_RATE_BOOK as Br, computeGrip as Bt, FOREIGN_TAX_CREDIT_GROSS_UP as C, IegAllocationResult as Ca, formatRsiDate as Ci, Schedule5Result as Cn, CcaClassResult as Co, computeTaxableIncome as Cr, RateBook as Cs, computeSchedule101 as Ct, computeT2Settlement as D, allocateIegEvenly as Da, renderRsiLineItem as Di, ProvincialAllocationInput as Dn, UnsupportedCcaClassError as Do, CcpcActiveBusinessTaxInput as Dr, hasExactRateYear as Ds, normalizeSchedule88 as Dt, T2SettlementResult as E, IegLimitAllocation as Ea, renderRsiHeader as Ei, PermanentEstablishment as En, Schedule8Result as Eo, nonCapitalLossApplied as Er, extendRateBook as Es, Schedule88Result as Et, T2GifiLine as F, computeIegBaseAmount as Fa, albertaBalanceUnpaid as Fi, Part4RdtohResult as Fn, Class141AdditionalAllowanceInput as Fo, SbdInput as Fr, Schedule54Input as Ft, co17Engine as G, computeSchedule20 as Ga, AlbertaReturnResult as Gi, Schedule1Result as Gn, computeClass13 as Go, computeLossSchedule as Gr, LARGE_CORPORATION_THRESHOLD as Gt, Co17ReturnData as H, AlbertaGiftCarryforward as Ha, At1ReturnInput as Hi, Schedule1Line as Hn, LeaseholdLayerResult as Ho, resolveCorpTaxRates as Hr, Schedule43Rates as Ht, renderT2DraftReturn as I, computeIegReductionFactor as Ia, assertAt1MandatoryComplete as Ii, REFUNDABLE_PART_I_RATE as In, Class141AdditionalAllowanceResult as Io, SbdResult as Ir, Schedule54Result as It, computeQuebecReturn as J, AlbertaSchedule18Result as Ja, SINGLE_JURISDICTION_ALBERTA_FACTOR as Ji, ccaDeduction as Jn, leaseholdPeriods as Jo, CEC_DEDUCTION_RATE as Jr, computeTaxableCapital as Jt, QuebecReturnInput as K, AT1_DISPOSITION_CATEGORIES as Ka, computeAlbertaReturn as Ki, amortizationAddBack as Kn, computeClass14 as Ko, AlbertaSchedule14Input as Kr, TaxableCapitalInput as Kt, T2ReturnInput as L, AT1_DONATION_GAIN_RATE as La, assertAt1TaxPayableReconciles as Li, computePart4Rdtoh as Ln, Class14Input as Lo, computeBusinessLimit as Lr, computeSchedule54 as Lt, T2CifQuestionnaire as M, IegInput as Ma, At1MandatoryFieldMissingError as Mi, computeSchedule4Losses as Mn, CLASS_14_1_TRANSITIONAL_RATE as Mo, computePartITax as Mr, LRIP_INVESTMENT_INCOME_FACTOR as Mt, T2CifSettlement as N, IegResult as Na, At1TaxPayableMismatchError as Ni, PART_IV_RATE as Nn, Class13Input as No, BusinessLimitInput as Nr, LripDividendEvent as Nt, T2CifAddress as O, allocateIegExpenditureLimit as Oa, renderAt1NetFile as Oi, ProvincialAllocationResult as On, computeCcaClass as Oo, CcpcActiveBusinessTaxResult as Or, latestRateYear as Os, Schedule55Input as Ot, T2CifShareholder as P, computeIeg as Pa, At1TransmitterInfo as Pi, Part4RdtohInput as Pn, Class13Result as Po, BusinessLimitResult as Pr, LripEventResult as Pt, QuebecTaxInput as Q, At1CategoryTotals as Qa, At1ScheduleData as Qi, incomeTaxProvisionAddBack as Qn, isDecliningBalanceClass as Qo, computeAlbertaSchedule14 as Qr, ITC_RECAPTURE_PERIOD_YEARS as Qt, t2Engine as R, AT1_DONATION_INCOME_RATE as Ra, assertCriticalFields as Ri, Schedule2Input as Rn, Class14Property as Ro, computeSBD as Rr, GripInput as Rt, AdjustedTaxableIncomeResult as S, IegAgreementResult as Sa, formatRsiAmount as Si, Schedule5Input as Sn, CcaClassInput as So, charitableDonationsDeduction as Sr, resolveAlbertaTaxRates as Ss, Schedule101Result as St, T2SettlementInput as T, IegGroupResult as Ta, renderAt1Rsi as Ti, AllocatedProvince as Tn, Schedule8Entry as To, netCapitalLossApplied as Tr, earliestRateYear as Ts, Schedule88Input as Tt, renderCo17DraftReturn as U, Schedule20Input as Ua, at1Engine as Ui, Schedule1LineDefect as Un, MAX_LEASEHOLD_PERIODS as Uo, LossScheduleInput as Ur, Schedule43Result as Ut, Co17Identity as V, computeDonationMaximum as Va, xmlEscape as Vi, Schedule1Input as Vn, LeaseholdLayer as Vo, CorpTaxRates as Vr, Schedule43Input as Vt, Co17ReturnInput as W, Schedule20Result as Wa, AlbertaReturnInput as Wi, Schedule1NotFileableError as Wn, MIN_LEASEHOLD_PERIODS as Wo, LossScheduleResult as Wr, computeSchedule43 as Wt, QuebecEstablishment as X, At1AbilResult as Xa, AT1_SCHEDULES_WITHOUT_BUILDERS as Xi, deferredIncomeTaxProvisionAddBack as Xn, CCA_RATE_BOOK as Xo, CecIncomeInclusionDetail as Xr, Schedule31Result as Xt, QuebecAllocationResult as Y, At1AbilEntry as Ya, computeAllocationFactor as Yi, computeSchedule1 as Yn, CCA_DECLINING_BALANCE_RATES_2024 as Yo, CEC_INCLUSION_RATE as Yr, Schedule31Input as Yt, computeQuebecAllocationFactor as Z, At1CategoryResult as Za, AT1_SCHEDULES_WITH_BUILDERS as Zi, findSchedule1LineDefects as Zn, CcaRateTable as Zo, cecScheduleAppliesToTaxYear as Zr, computeSchedule31 as Zt, EifelLimitationInput as _, schedule29Values as _a, RSI_WORD_GAP as _i, computeSchedule13 as _n, AlbertaSchedule13ClassResult as _o, isSchedule5Province as _r, GeneralRateBand as _s, FederalT2Input as _t, MpDeductionRates as a, Schedule2FilingInput as aa, albertaCcaDifference as ai, computeZetm as an, AlbertaSchedule17Input as ao, EifelResult as ar, LossCarrybackResult as as, T2_CERTIFICATION_FIXTURES as at, ratioOfPermissibleExpenses as b, IegAgreementMember as ba, RsiLineItemError as bi, Schedule6Result as bn, FederalCcaClass as bo, TaxableIncomeLine as br, AB_TAX_RATE_BOOK as bs, FirstReturnEvent as bt, PART_VI_1_DEDUCTION_BANDS as c, schedule12LossDeductions as ca, albertaDispositionAdjustments as ci, BusinessLimitAllocationInput as cn, At1ReserveKind as co, ProvincialRateChange as cr, AlbertaTaxInput as cs, ConformanceSummary as ct, computePartVI1Deduction as d, schedule16Values as da, albertaTerminalLossDifference as di, computeBusinessLimitAllocation as dn, computeAlbertaSchedule17 as do, dayWeightedRate as dr, AlbertaCorporationStatus as ds, T2LineKey as dt, Schedule10FilingInput as ea, Schedule12Input as ei, ItcRecaptureItemResult as en, SECTION_34_2_GROSS_UP as eo, recaptureAddBack as er, LossContinuityInput as es, computeQuebecTax as et, partVI1DeductionMultiple as f, schedule17Values as fa, computeSchedule12 as fi, Schedule21Input as fn, AlbertaSchedule16Input as fo, PROVINCE_RATES_2024 as fr, AlbertaSbdInput as fs, T2_LINE_META as ft, EIFEL_TRANSITIONAL_RATIO as g, schedule21Values as ga, RSI_NEGATIVE_PREFIX as gi, ReserveContinuityRow as gn, AlbertaCcaOverride as go, ProvincialRate as gr, DayWeightedRateResult as gs, runConformanceSuite as gt, EIFEL_STANDARD_RATIO_FROM as h, schedule20Values as ha, RSI_DELIMITER as hi, ReserveContinuityResult as hn, computeAlbertaSchedule16 as ho, ProvinceRateTable as hr, AB_GENERAL_RATE_BANDS as hs, runConformance as ht, MpDeductionInput as i, Schedule21FilingInput as ia, albertaCapitalGainDifference as ii, ZetmResult as in, AT1_RESERVE_TOTAL_LINES as io, EifelInput as ir, LossCarrybackInput as is, resolveQuebecTaxRates as it, T2CifPartI as j, IEG_2024 as ja, At1FilingData as ji, Schedule4Result as jn, CLASS_14_1_MINIMUM_DEDUCTION as jo, computeCcpcActiveBusinessTax as jr, LRIP_INVESTMENT_CORPORATION_MULTIPLE as jt, T2CifData as k, computeIegAgreement as ka, AT1_CRITICAL_MANDATORY_FIELDS as ki, computeProvincialAllocation as kn, computeCcaSchedule as ko, PartITaxInput as kr, resolveRates as ks, Schedule55Result as kt, PartVI1DeductionBand as l, schedule12Values as la, albertaRecaptureDifference as li, BusinessLimitAllocationResult as ln, At1ReserveRowResult as lo, ProvincialRateChanges as lr, AlbertaTaxResult as ls, ExpectedSource as lt, EIFEL_STANDARD_RATIO as m, schedule1Values as ma, RSI_COLUMN_GAP as mi, computeSchedule21 as mn, assistanceFrom as mo, ProvinceCode as mr, computeAlbertaSbd as ms, formatConformanceReport as mt, MP_GROSS_REVENUE_THRESHOLD as n, Schedule1FilingInput as na, Schedule12Result as ni, computeItcRecapture as nn, AT1_RESERVE_KINDS as no, EIFEL_EFFECTIVE_FROM as nr, computeLossContinuity as ns, QC_TAX_RATE_BOOK as nt, MpDeductionResult as o, at1LineItemId as oa, albertaCcaScheduleAdjustments as oi, AssociatedMemberInput as on, AlbertaSchedule17Result as oo, EifelThresholds as or, LossCarrybackYear as os, CertificationFixture as ot, EIFEL_FIRST_YEAR_START as p, schedule18Values as pa, reconcileAlbertaNetIncome as pi, Schedule21Result as pn, AlbertaSchedule16Result as po, PROVINCE_RATE_BOOK as pr, AlbertaSbdResult as ps, foldT2Lines as pt, QuebecReturnResult as q, AlbertaSchedule18Input as qa, AllocationFactorInput as qi, assertSchedule1Fileable as qn, computeClass141AdditionalAllowance as qo, AlbertaSchedule14Result as qr, TaxableCapitalResult as qt, MP_RATES_2024 as r, Schedule20FilingInput as ra, albertaAbilDifference as ri, ZetmInput as rn, AT1_RESERVE_LINES as ro, EifelExemption as rr, LossCarrybackError as rs, QuebecTaxRates as rt, computeMpDeduction as s, schedule10Values as sa, albertaCurrentYearLoss as si, AssociatedMemberResult as sn, At1ReserveBalances as so, assessEifel as sr, computeLossCarryback as ss, ConformanceResult as st, MP_EXCLUDED_ACTIVITIES as t, Schedule12FilingInput as ta, Schedule12Line as ti, ItcRecaptureResult as tn, computeAlbertaSchedule18 as to, terminalLossDeduction as tr, LossContinuityResult as ts, QC_TAX_2024 as tt, PartVI1DeductionResult as u, schedule13Values as ua, albertaReserveDifference as ui, allocateEvenly as un, At1ReserveTable as uo, blendProvinceRateTable as ur, computeAlbertaTax as us, LineCheck as ut, EifelLimitationResult as v, schedule2Values as va, RsiHeaderInput as vi, CapitalDisposition as vn, AlbertaSchedule13Input as vo, resolveProvinceRates as vr, computeDayWeightedGeneralTax as vs, FederalT2Result as vt, computeAdjustedTaxableIncome as w, IegGroupMember as wa, formatRsiText as wi, computeSchedule5 as wn, CcaScheduleResult as wo, dividendsDeductibleS112 as wr, RateBookEntry as ws, SCHEDULE_88_MAX_URLS as wt, AdjustedTaxableIncomeInput as x, IegAgreementMemberResult as xa, RsiScheduleInput as xi, computeSchedule6 as xn, computeAlbertaSchedule13 as xo, TaxableIncomeResult as xr, AlbertaTaxRates as xs, Schedule101Input as xt, computeEifelLimitation as y, IegAgreementInput as ya, RsiLineItem as yi, DispositionResult as yn, AlbertaSchedule13Result as yo, TaxableIncomeInput as yr, AB_TAX_2024 as ys, computeFederalT2 as yt, Co17Address as z, DonationMaximumInput as za, at1TaxPayableDeductions as zi, Schedule2Result as zn, Class14PropertyResult as zo, CORP_TAX_2024 as zr, GripResult as zt };
|
|
9214
|
+
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 };
|