commerce: discount-aware (net) tax policy (11 tests) — Phase 5 ext
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 54s

nettax.sx — alternative to quote.sx's gross-tax default: cart-quote-net taxes
the net (post-discount) base. allocate-discount spreads the basket discount
across lines by extended-price share with a deterministic largest-remainder
pass so per-line shares sum exactly to the discount; each line taxed on its net
at its class rate. Both policies reproducible; pick per jurisdiction.
Total 239/239 across 15 suites.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-07 12:08:04 +00:00
parent 2ebe5f0c31
commit a9d8711101
6 changed files with 191 additions and 8 deletions

View File

@@ -13,9 +13,10 @@
"federation": {"pass": 12, "fail": 0},
"attribution": {"pass": 16, "fail": 0},
"payment": {"pass": 7, "fail": 0},
"window": {"pass": 19, "fail": 0}
"window": {"pass": 19, "fail": 0},
"nettax": {"pass": 11, "fail": 0}
},
"total_pass": 228,
"total_pass": 239,
"total_fail": 0,
"total": 228
"total": 239
}