Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/rule-decisions.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ A row that names a pull request is in the code of that branch until it merges.
| A145 | 2026-11-27 | Form 8908 / Form 3800 | Form 8908 gives a homebuilder a credit for each new energy efficient home sold or leased; line 7 adds the same credit passed through on partnership and S corporation K-1s (code AM). With K-1s that show cents, is each K-1 rounded before the add, or only the total? | Form 1040 instructions: "include cents when adding the amounts and round off only the total" (`irs-1040-inst-2025::sec::rounding-off-to-whole::b01`). | Line 8 goes to Form 3800 line 1p (`irs-8908-face-2025::sec::face-page-2::b01`), whose Part V lists each pass-through entity's credit by its EIN, one whole-dollar amount each (`irs-3800-inst-2025::sec::part-v-3::b01`). | Text B, the same rule as row A96 (Form 8846 line 5) and Form 8826 line 7: each K-1 rounds first, so line 8 equals Form 3800 line 1p. | At most $1 for each K-1. | `federal/8908/resolveInfo.ts` | Silent: the statute sets no rounding. |
| A146 | 2026-11-27 | Form 8908 | Items A to C ask, for each home the builder claims, whether the builder built it, had a basis in it and had it certified before the sale. One of several homes answers No. Is the credit lost for every home, or only for that one? | The items: "For each home for which you are claiming the credit, ..." (`irs-8908-inst-2025::sec::specific-instructions::b01`). | The form: "If you answered 'No' to question A, B, or C, STOP, you cannot claim the credit" (`irs-8908-face-2025::sec::face-page-1::b02`). | Text A: a home that answers No is not claimed, and the items show Yes for the homes that are. The form stops only when no home is left. The credit is "for each qualified new energy efficient home" (`irs-8908-inst-2025::sec::purpose-of-form::b01`), so one home that fails does not take the others' credit away. | Yes: in the made-up taxpayer `edelle`, a house that was not certified in time loses its $2,500, not the whole $20,000. | `federal/8908/resolveInfo.ts` | 45L(a)(1): supports. The credit is "the applicable amount for each qualified new energy efficient home". |
| A147 | 2026-11-28 | FTB 3503 / Schedule P (540) | FTB 3503 gives a California credit of 55% of the value of land given with the Wildlife Conservation Board's approval. On Schedule P (540) it is one of the Section B2 credits that share the tax left, one after another. Where does it go in that order? | Section B2: "Generally, it is to your advantage to apply credits with limited carryovers before credits with no limitation on carryover. However, you may apply credits with no limitation on carryover first, if that is to your advantage" (`ca-540-sched-p-inst-2025::sec::section-b2-instructions::b01`). | FTB 3503: a credit from 2015 on carries over "15 years or until exhausted" (`ca-3503-form-2025::sec::f-carryover::b01`); the low-income housing credit is "required to be applied after any business credits are applied" (`ca-540-sched-p-inst-2025::sec::how-to-compute-the-limitation::b01`); the enterprise zone and TTA carryovers have 10 years (A90 to A92). | After the motion picture, enterprise zone and TTA credits, before the research, orphan drug and low-income housing credits: a limited carryover goes before an unlimited one, and the longer 15-year carryover after the 10-year ones. One order for every return. | None in the made-up taxpayer `kari` (one credit). Only when the tax left cannot cover all: with a $10,000 TTA carryover, $20,000 of this credit and $25,000 of tax, the TTA credit takes $10,000 and this credit $15,000 (the other order: $20,000 and $5,000). | `state/ca/3503/creditUsed.ts` | Silent on the order. R&TC 17053.30(d)(2) sets the 15-year carryover (`ca-rtc-2025::sec::s17053.30::d`). |
| A148 | 2026-11-28 | FTB 3547, Schedule P (540) | FTB 3547 gives a business that hauls donated food to a charity a California credit of half the transport costs (code 204); it offsets tax in Schedule P (540) Section A2, next to FTB 3541's motion picture credits and FTB 3807's LAMBRA credit. In what order are they used? | Section A2: "complete column (a) through column (d) for each credit in each section before going to the next section" (`ca-540-sched-p-inst-2025::sec::section-a2-instructions::b01`): no order inside the section. | Section B2's general rule, credits "with limited carryovers before credits with no limitation" (`::section-b2-instructions::b01`): this credit carries over "until exhausted" (`ca-3547-form-2025::sec::g-carryover::b01`), the film (A75) and LAMBRA (A82) credits for 9 and 10 years. | Text B: code 204 takes the line after the film and LAMBRA credits. One order for every return. | Only when the tax over TMT cannot cover every Section A2 credit; the part of code 204 not used carries over with no limit. In `padan` it is the only Section A2 credit. | `state/ca/3547/creditUsed.ts` | Not in the library: California law. R&TC 17053.12(d) (`ca-rtc-2025::sec::s17053.12::d`): the carryover runs "until the credit has been exhausted". |

The last column names the subdivision read in the law library. Rows A33 to A57 were added after the check, so their last column is the author's note, not a read of the statute. On the day of the check the library held the statute only (the regulations were added after it): no regulations, no California law, and no statutory notes, so no effective date was checked. Row 12 was marked for research; section 55(b)(1)(A) settles it: the tentative minimum tax "shall be reduced by the alternative minimum tax foreign tax credit".

Expand Down
1 change: 1 addition & 0 deletions engine/src/facts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export * from "./kinds/blindness.js";
export * from "./kinds/business.js";
export * from "./kinds/businessLossLimit.js";
export * from "./kinds/businessPropertySale.js";
export * from "./kinds/caAgTransport.js";
export * from "./kinds/caAmtCaliforniaAmounts.js";
export * from "./kinds/caCaliforniaAmounts.js";
export * from "./kinds/caChildUnearnedIncome.js";
Expand Down
103 changes: 103 additions & 0 deletions engine/src/facts/kinds/caAgTransport.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
/*
* FTB 3547, the donated agricultural products transportation credit: 50% of
* the costs of transporting agricultural products donated to a nonprofit
* charitable organization (ca-3547-form-2025::sec::b-description::b01), for a
* taxpayer "engaged in the business of processing, distributing, or selling
* agricultural products" (::c-qualifications::b01). The donee gives the
* taxpayer a certificate, which the taxpayer keeps (::c-qualifications::b01),
* so no document comes with it: the taxpayer states the costs from the trip
* records and the certificate.
*
* Three inputs: the taxpayer's own transportation costs (line 1), one fact per
* entity that passed a credit through on a Schedule K-1 (100S, 541, 565 or
* 568) (line 3), and last year's carryover (line 5). The California K-1
* itself is not in the engine: the credit is stated as the K-1 prints it.
*/

type FactRow = { key: string; value: unknown; category: string };

/*
* "You may determine eligible transportation costs in either of the following
* ways: $.14 (fourteen cents) per mile; The actual transportation expenses"
* (ca-3547-form-2025::sec::d-definitions::b01).
*/
export type CaAgTransportMethod = "mileage" | "actual";

/*
* Where the federal return deducted the same costs: "Any deduction allowed for
* these same costs must be reduced by the amount of credit figured"
* (ca-3547-form-2025::sec::d-definitions::b04). A business expense on
* Schedule C or Schedule F, or no deduction at all.
*/
export type CaAgTransportDeductedOn = "schedule_c" | "schedule_f" | "not_deducted";

/* Line 1 (ca-3547-form-2025::sec::line-1::b01). */
export interface CaAgTransportCostsFactValue {
method: CaAgTransportMethod;
/*
* Mileage method: "the total miles connected with transporting the donated
* agricultural product" (::line-1::b01), the taxpayer's share when the trips
* were shared. 0 when none.
*/
miles?: number;
/*
* Actual method: the transportation costs paid or incurred, with parking
* fees and tolls, without depreciation and insurance (::d-definitions::b01);
* the taxpayer's share "in proportion to their respective share of the
* expenses paid or incurred" (::line-1::b01).
*/
actualCosts?: number;
deductedOn: CaAgTransportDeductedOn;
/*
* The costs were paid by a single member LLC that is disregarded for tax
* purposes. The credit's use is then limited to the tax on that LLC's income
* (::d-definitions::b03), which the engine does not figure. Absent: the
* taxpayer paid them directly.
*/
throughDisregardedSmllc?: boolean;
}

/* Line 3: one entity's pass-through credit (ca-3547-form-2025::sec::line-3-pass-through-donated-agricultural-products-transportation::b01). */
export interface CaAgTransportPassThroughFactValue {
/* The entity's name, for the schedule the line asks for. */
entityName: string;
/* The entity's identification number. */
entityId: string;
/* The credit as the Schedule K-1 (100S, 541, 565 or 568) reports it. */
credit: number;
}

export interface CaAgTransportPassThroughFact {
key: string;
value: CaAgTransportPassThroughFactValue;
}

export const CA_AG_TRANSPORT_KEYS = {
/* Line 1: a CaAgTransportCostsFactValue. */
costs: "ca_ag_transport.costs",
/* Line 5: the 2024 FTB 3547 line 8, "Credit carryover from a prior year" (the form). A number; 0 when none. */
carryover: "prior_year.ca_ag_transport_credit_carryover",
} as const;

const PASS_THROUGH_CATEGORY = "state_local_tax";
const PASS_THROUGH_PREFIX = "ca_ag_transport_pass_through.";

export function makeCaAgTransportPassThroughFactKey(entitySlug: string): string {
return `${PASS_THROUGH_PREFIX}${entitySlug}`;
}

export function isCaAgTransportPassThroughFactKey(key: string): boolean {
const parts = key.split(".");
return parts.length === 2 && `${parts[0]}.` === PASS_THROUGH_PREFIX && parts[1] !== "";
}

/* Every pass-through credit fact, in the order recorded. */
export function getCaAgTransportPassThroughFacts(
facts: ReadonlyArray<FactRow>,
): CaAgTransportPassThroughFact[] {
return facts
.filter(
(row) => row.category === PASS_THROUGH_CATEGORY && isCaAgTransportPassThroughFactKey(row.key),
)
.map((row) => ({ key: row.key, value: row.value as CaAgTransportPassThroughFactValue }));
}
Loading
Loading