Skip to content

feat(pos): owner price override control on cart lines - #1286

Merged
itsbkm merged 2 commits into
mainfrom
feat/pos-cart-price-override
Oct 22, 2026
Merged

itsbkm merged 2 commits into
mainfrom
feat/pos-cart-price-override

Conversation

@itsbkm

@itsbkm itsbkm commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Completes the cart-time half of #1281 (the order-level override shipped in #1284).

  • Cart control: the owner sees a price button on each POS cart line, also when adding items to an open order. A dialog sets a price (0 allowed) with a required reason, or returns the line to its menu price.
  • Cart model: a line's price_override is part of its cart identity, so an overridden line never merges into a menu-price line, survives hold/resume and quantity or detail edits, and merges back with its menu-price twin when cleared. Subtotals use the override price.
  • Payload: cartItemToOrderItem (the single cart-to-order projection) sends price_override, so create, add-items, held-order placement and retries all carry it. The backend still enforces owner-only and the required reason; a held cart with an override placed by another role gets a 403.
  • Tax quote: POST /api/tax/preview accepts an optional per-item price_override: { price }, so the shown tax and total match the order that gets created.
  • Shared UI: the order-detail override modal now uses the same PriceOverrideDialog.
  • i18n: one new string (orders.overridePriceClear) in all 23 locales.

Refs #1281

Test plan

  • New tests/cart-price-override.test.ts: identity, price helper, store set/clear/merge, hold/restore, payload, edits.
  • tests/item-price-override.test.ts extended: add-items override (owner vs manager) and tax preview quoting.
  • Related suites pass locally: cart identity, variant POS surface, POS cart retry, held orders, translations, tax, orders authz, orders-search.
  • Needs CI: Playwright E2E (the cart control cannot be exercised in a browser locally).

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…mmit

The previous commit staged whole directories and picked up unrelated
uncommitted work (POS catalog sort, release gate tests, Windows uninstaller
test, releases.md). This commit restores those files to main, leaving only
the cart price override change.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@itsbkm
itsbkm enabled auto-merge (squash) October 22, 2026 14:07
@itsbkm
itsbkm merged commit 0ea6c28 into main Oct 22, 2026
22 of 23 checks passed
@itsbkm
itsbkm deleted the feat/pos-cart-price-override branch October 22, 2026 14:22
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