Show refunded tax on the rebate panel (0.4.2)#9
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.