Skip to content

Show refunded tax on the rebate panel (0.4.2)#9

Merged
robert-moore merged 3 commits into
mainfrom
fix/rebate-tax-display
Jun 1, 2026
Merged

Show refunded tax on the rebate panel (0.4.2)#9
robert-moore merged 3 commits into
mainfrom
fix/rebate-tax-display

Conversation

@robert-moore
Copy link
Copy Markdown
Contributor

@robert-moore robert-moore commented Jun 1, 2026

A rebate is refunded with the tax paid on it. A $40 rebate on a 7% invoice refunds $42.80. The panel now shows that. The middle line is "Money back" with the actual refund and a quiet "(incl. $X tax)" note when there's tax, and the net reflects it. Untaxed invoices look the same as before: no note, and the refund equals the rebate.

The refund and tax are derived from the net the server already sends (refund = paid − net, tax = refund − rebate), so there are no new fields on RebateOffer. Needs the matching churnkey-api change where the resolved net subtracts the full refund.

0.4.2. Lint, typecheck, and the 156 unit tests pass.

On a taxed invoice the rebate is refunded with the tax paid on it, so the panel
now shows the actual cash back. The middle line reads 'Money back' with the full
refund and a quiet '(incl. $X tax)' note, and the net reflects the full refund.
Derived from the server-resolved net (refund = paid − net), so no new public
fields. No-tax invoices are unchanged — the note is hidden and the refund equals
the rebate.
amountMinor is the rebate (pre-tax), not the cash refunded — the card gets it
plus any tax. netAfterRebateMinor subtracts the full refund (rebate + tax), not
just the rebate. Doc-only; the runtime already behaves this way.
@robert-moore robert-moore merged commit 53001e6 into main Jun 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant