feat(backend,waiter,manager): prices changed by hand are on the record
Owner 2026-11-23 (plan 6F.3). services/price_changes.py: the venue's switch orders.price_change (off | before_sending | anytime, default anytime as before), orders.price_change_reason and its quick reasons; keys ordering.prices.modify (the cart), new modify_sent (a sent or served line) and view_changes (who sees them). Every by-hand price (waiter cart, a sent line, the counter's % discount) writes a manual_price PriceEventLog row (before, after, quantity, who, approving manager, stage, reason) plus a PRICE_CHANGED audit row; before, the sent-line change overwrote the price with no record. Alembic 0047: event columns; modify_sent for everyone holding modify (and the venues' role overrides), view_changes for owners and store managers. Waiter: the reason picker when the venue asks, a sent line's price on modify_sent and the venue's switch, the line's price history. Manager: Settings -> Operation 'Prices changed by hand', the changes on the order's lines and history, Reports -> Cancellations, discounts and price changes (+ export). Counter: no discount when the venue turned price changes off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -739,6 +739,25 @@
|
||||
"spoof": "Pretend to print",
|
||||
"spoofHint": "Every print job is dropped; the apps behave as if it printed.",
|
||||
"spoofOn": "On: the printers print nothing."
|
||||
},
|
||||
"prices": {
|
||||
"title": "Prices changed by hand",
|
||||
"intro": "When staff may type a line's own price, and whether they must say why. Every change is kept: who, when, from what to what, why.",
|
||||
"when": "Staff may change a price",
|
||||
"whenHint": "Who may: \"What each role may do\" and each person's permissions.",
|
||||
"whenTip": "Never: nobody types a price, owners included. Before sending: only in the cart, before the order goes to the kitchen. Any time: also a line already sent or served (needs its own permission, \"already sent or served\").",
|
||||
"modes": {
|
||||
"off": "Never",
|
||||
"before_sending": "Before sending only",
|
||||
"anytime": "Any time"
|
||||
},
|
||||
"reason": "Ask for a reason",
|
||||
"reasonHint": "A price changed by hand can't be saved without one.",
|
||||
"reasonTip": "The reason is kept with the change and shown in the order's history and in Reports → Cancellations, discounts and price changes. The counter's % discounts don't ask: the discount says what it is.",
|
||||
"reasons": "Quick reasons",
|
||||
"reasonsHint": "Offered with one tap; staff can still type their own. None: the built-in ones.",
|
||||
"reasonItem": "Quick reason",
|
||||
"newReason": "A new quick reason…"
|
||||
}
|
||||
},
|
||||
"logs": {
|
||||
@@ -2290,7 +2309,8 @@
|
||||
"event": {
|
||||
"waiter_discount": "Discount",
|
||||
"free_item_added": "Free",
|
||||
"modifier_applied": "Price change"
|
||||
"modifier_applied": "Price change",
|
||||
"manual_price": "Price changed by hand"
|
||||
}
|
||||
},
|
||||
"orderStatus": {
|
||||
@@ -3368,7 +3388,9 @@
|
||||
"PAYMENT_OFFLINE": "Payment (offline)",
|
||||
"ORDER_CLOSED": "Closed",
|
||||
"ORDER_CANCELLED": "Cancelled",
|
||||
"ITEM_CANCELLED": "Line cancelled"
|
||||
"ITEM_CANCELLED": "Line cancelled",
|
||||
"PRICE_CHANGED": "Price changed",
|
||||
"PRICE_SET_BY_HAND": "Price set by hand (approved)"
|
||||
},
|
||||
"price": {
|
||||
"modifier_applied": "Price rule",
|
||||
@@ -3377,7 +3399,14 @@
|
||||
"deal_offer_accepted": "Deal accepted",
|
||||
"deal_offer_dismissed": "Deal declined",
|
||||
"waiter_discount": "Discount",
|
||||
"free_item_added": "Free item"
|
||||
"free_item_added": "Free item",
|
||||
"manual_price": "Price changed by hand"
|
||||
},
|
||||
"approvedBy": "approved by {{name}}",
|
||||
"stage": {
|
||||
"cart": "before sending",
|
||||
"sent": "after sending",
|
||||
"served": "after serving"
|
||||
}
|
||||
},
|
||||
"add": {
|
||||
@@ -4069,7 +4098,7 @@
|
||||
}
|
||||
},
|
||||
"misc": {
|
||||
"title": "Cancellations and discounts",
|
||||
"title": "Cancellations, discounts and price changes",
|
||||
"cancellations": "Cancellations",
|
||||
"discounts": "Discounts",
|
||||
"when": "When",
|
||||
@@ -4093,7 +4122,18 @@
|
||||
"discountTotal": "Total off",
|
||||
"alreadyOff": "already taken off the revenue",
|
||||
"times_one": "{{count}} time",
|
||||
"times_other": "{{count}} times"
|
||||
"times_other": "{{count}} times",
|
||||
"priceChanges": "Price changes",
|
||||
"priceWas": "Was",
|
||||
"priceNow": "Became",
|
||||
"stage": "When",
|
||||
"changedBy": "Changed by",
|
||||
"approvedBy": "Approved by",
|
||||
"changes": "Prices changed",
|
||||
"changesValue": "Difference",
|
||||
"changesValueTip": "What the changes added (+) or took off (−), for each line's quantity at the time of the change.",
|
||||
"changesCount_one": "{{count}} change",
|
||||
"changesCount_other": "{{count}} changes"
|
||||
},
|
||||
"tech": {
|
||||
"title": "Technical",
|
||||
|
||||
Reference in New Issue
Block a user