Repository navigation
feat: owner-only manual item price override with price exceptions report - #1284
Conversation
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
@coderabbitai review |
|
Summary
PATCH /api/orders/:id/items/:itemId/price(price, requiredreason) lets the owner sell one line at any non-negative price, including0for a complimentary item. Works on lines already sent to the kitchen; the kitchen ticket and KDS are unaffected. The sameprice_overrideobject is accepted on lines when an order is created or items are added.orders.item.price_override. Other roles get403; the control is hidden for them in the Orders screen.price_overridden,original_unit_price,price_override_reason,price_overridden_by,price_overridden_attoorder_items(forward-only, existing rows untouched). The first menu price is kept across repeated overrides, and a quantity edit carries the flag to the replacement line.unit_price, so they show the selling price.409), and on completed or cancelled orders.item_price_overriddenaudit entry.GET /api/reports/price-exceptionsand a dashboard card list order, item, menu price, billed price, difference, who, when, and reason for the selected store-timezone date range.Not included
price_overrideat create time; the cart UI touches held orders and retry-attempt persistence and is better as its own PR.Closes #1281
Test plan
tests/item-price-override.test.ts(42 checks): owner/manager/cashier access, validation, totals, audit, quantity-edit carry-over, create-time override, paid/cancelled blocking, report contents and permission.🤖 Generated with Claude Code