feat(invoicing): TAM-6897: fixed-price medications spec and test cases#10109
feat(invoicing): TAM-6897: fixed-price medications spec and test cases#10109tcaiger wants to merge 3 commits into
Conversation
|
🦸 Review Hero Summary No issues found. Looks good! Below consensus threshold (3 unique issues not confirmed by majority)
|
|
🦸 Review Hero (could not post inline comments — showing here instead)
[BES Requirements] The
[BES Requirements] The response shape of the
[BES Requirements] Plan says "no TypeORM migration" because invoicing has no mobile models. However, the test-cases doc (line 77) says "The
[BES Requirements] The
[Design & Architecture] The
[Design & Architecture]
[Design & Architecture] The refactoring from |
|
🦸 Review Hero Summary Below consensus threshold (9 unique issues not confirmed by majority)
Local fix prompt (copy to your coding agent)Fix these issues identified on the pull request. One commit per issue fixed.
|
|
Android builds 📱
|
🍹
|
4890222 to
a6afe59
Compare
…s of quantity Flag a medication on a price list so it is charged as a flat fee (price x 1) instead of price x quantity. Per-unit stays the default; only medications honour the flag. - Schema: is_fixed_price on invoice_price_list_items; is_fixed_price_final snapshot on invoice_items (set at finalisation so a finalised line stays fixed/per-unit independent of later price-list edits). - Calc: single quantity-to-1 gate in getInvoiceItemTotalPrice via isFixedPriceItem; discount, insurance coverage, net cost and totals all inherit it. Finalised lines key off priceFinal so they can't be flipped. - Import: per-cell `f` prefix (f2.00) and a code-first `:fixed` column default in the price-list matrix loader; literal headers always resolve first. - Export: re-emits the per-cell `f` marker for a lossless round-trip. - API: price-list-item endpoint returns isFixedPrice + product category so the form applies fixed pricing before save. - dbt source models updated; specs under specs/invoicing/. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
bfa141a to
fb6cba6
Compare
Temporary copy of the xlsx ESM fs-binding fix so reference-data export/import works locally on this branch. The real fix is in its own PR (#10145); drop this commit once that merges to main and reaches this branch. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…at import Reverses the earlier "store the flag on any product" behaviour. The importer now checks the product category: - an explicit `f`-prefixed cell on a non-medication is an import error - a `:fixed` column default silently skips non-medication rows (imported as a plain per-unit price) Threads the product into the matrix loader's valueExtractor and lets it return a specific error message. Updates spec and import test cases. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Changes
Adds the spec and verification checklist for fixed-price medications (TAM-6897): flag a medication in a price list so it is charged as a flat fee regardless of dispensed quantity, instead of price × quantity.
This PR is docs only —
docs/specs/invoicing/fixed-price-medications.md(acceptance criteria + technical design) anddocs/specs/invoicing/fixed-price-medications-test-cases.md(test checklist). It captures the resolved import/export syntax (per-cellfmarker,:fixedcolumn default), the pricing/discount/insurance behaviour, and scope boundaries ahead of implementation. No code changes.Auto-Deploy
Options
Tests
Review Hero
.github/review-hero/suppressions.yml. Also runs automatically at the end of any auto-fix run.Remember to...