feat(connect): the site side of online orders: fee line, customer's time, price check
Plan phase 3S, step S.5. - Pull: an online order keeps the customer's time (orders.requested_for, None = as soon as possible) and delivery area; quick options are stored in the site's entry shape; items get their cost snapshot. - The delivery fee is its own order line: a system product (products.system_key "delivery_fee", lifecycle "system", sold nowhere; services/system_products.py), created on first use in the venue's language with the VAT group most products use. Added printed and served, so kitchen tickets and the KDS never see it; paid at the counter with the items, counted in the shift, on the fiscal receipt with its VAT group. Never listed in the catalogue (products list, export, edit endpoints → 404) and never added by hand. - Price check (services/online_check.py): each line priced as the snapshot prices it, at the order's time, and the fee through the same engine with the site's rules and the cloud's area id; differences kept on orders.online_price_diff and shown. The customer pays what the cloud charged. - Counter: time chip (or as soon as possible), area, fee line, price warning; takeaway is its own kind (was shown as "at the venue") and finishes as "collected". KDS cards show the online reference and the time; kitchen tickets print the reference, the type and the time. - Manager: Online ordering → "The fee on the receipt" (name, VAT group; PUT /api/connect/fees/fee-product, fees.vat_group_unknown); the online orders page shows the time, area and price warning. - Migration 0019. Tests: tests/test_online_site_side.py (6), terminal unit test, e2e (terminal: fee, time, warning, paid in full; manager: fee line settings). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -102,6 +102,7 @@
|
||||
"area_not_found": "Η περιοχή διανομής {{area_id}} δεν βρέθηκε.",
|
||||
"rule_not_found": "Ο κανόνας χρέωσης {{rule_id}} δεν βρέθηκε.",
|
||||
"area_in_use": "Αυτή η περιοχή χρησιμοποιείται από κανόνες χρέωσης: {{rules}}. Αλλάξτε πρώτα αυτούς τους κανόνες.",
|
||||
"order_invalid": "Η νέα σειρά πρέπει να περιέχει κάθε κανόνα μία φορά."
|
||||
"order_invalid": "Η νέα σειρά πρέπει να περιέχει κάθε κανόνα μία φορά.",
|
||||
"vat_group_unknown": "Η ομάδα ΦΠΑ {{vat_group_id}} δεν είναι μία από τις ομάδες της φορολογικής μηχανής."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -541,5 +541,18 @@
|
||||
},
|
||||
"asap": "«Το συντομότερο»",
|
||||
"asapHint": "Όσο είναι ανοιχτά, οι πελάτες μπορούν να παραγγείλουν και για το συντομότερο."
|
||||
},
|
||||
"onlineOrders": {
|
||||
"for": "Για {{when}}",
|
||||
"asap": "Το συντομότερο",
|
||||
"priceDiff": "Χρεώθηκε {{charged}} online· με τις τωρινές τιμές του καταστήματος θα ήταν {{here}}. Ο πελάτης πληρώνει όσο χρεώθηκε."
|
||||
},
|
||||
"feeProduct": {
|
||||
"title": "Τα μεταφορικά στην απόδειξη",
|
||||
"intro": "Τα μεταφορικά μιας παραγγελίας διανομής είναι ξεχωριστή γραμμή στον λογαριασμό και στη φορολογική απόδειξη. Δώστε της όνομα και ομάδα ΦΠΑ.",
|
||||
"name": "Όνομα στον λογαριασμό και την απόδειξη",
|
||||
"vat": "Ομάδα ΦΠΑ",
|
||||
"vatNone": "Χωρίς ομάδα ΦΠΑ",
|
||||
"noGroups": "Ορίστε τις ομάδες ΦΠΑ της φορολογικής μηχανής στις Ρυθμίσεις → Φορολογικά για να διαλέξετε εδώ."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,8 @@
|
||||
"done": "✓ Έτοιμη"
|
||||
},
|
||||
"batch": "Παρτίδα {{n}}",
|
||||
"noCourse": "Χωρίς πιάτο"
|
||||
"noCourse": "Χωρίς πιάτο",
|
||||
"for": "για {{time}}"
|
||||
},
|
||||
"channel": {
|
||||
"here": "Εδώ",
|
||||
@@ -310,7 +311,8 @@
|
||||
"pick": "Επιλέξτε μια παραγγελία για να τη δείτε",
|
||||
"type": {
|
||||
"delivery": "Διανομή",
|
||||
"dine_in": "Στο κατάστημα"
|
||||
"dine_in": "Στο κατάστημα",
|
||||
"takeaway": "Παραλαβή"
|
||||
},
|
||||
"status": {
|
||||
"pending_acceptance": "Περιμένει απάντηση",
|
||||
@@ -332,11 +334,13 @@
|
||||
},
|
||||
"payAnd": {
|
||||
"delivered": "Είσπραξη {{amount}} · παραδόθηκε",
|
||||
"served": "Είσπραξη {{amount}} · σερβιρίστηκε"
|
||||
"served": "Είσπραξη {{amount}} · σερβιρίστηκε",
|
||||
"collected": "Είσπραξη {{amount}} · παραλήφθηκε"
|
||||
},
|
||||
"mark": {
|
||||
"delivered": "Παραδόθηκε",
|
||||
"served": "Σερβιρίστηκε"
|
||||
"served": "Σερβιρίστηκε",
|
||||
"collected": "Παραλήφθηκε"
|
||||
},
|
||||
"rejectTitle": "Απόρριψη αυτής της παραγγελίας;",
|
||||
"rejectBody": "Ο πελάτης βλέπει τον λόγο στη σελίδα της παραγγελίας του.",
|
||||
@@ -349,7 +353,22 @@
|
||||
"other": "Άλλος λόγος…"
|
||||
},
|
||||
"keep": "Να μείνει",
|
||||
"rejectConfirm": "Απόρριψη παραγγελίας"
|
||||
"rejectConfirm": "Απόρριψη παραγγελίας",
|
||||
"asap": "Το συντομότερο",
|
||||
"for": "Για {{when}}",
|
||||
"diff": {
|
||||
"title": "Οι τιμές διαφέρουν από του καταστήματος",
|
||||
"body": "Ο πελάτης χρεώθηκε {{charged}} online (και πληρώνει αυτό)· με τις σημερινές τιμές εδώ θα ήταν {{here}}.",
|
||||
"fee": "Μεταφορικά",
|
||||
"reason": {
|
||||
"price": "{{online}} online, {{here}} εδώ",
|
||||
"not_sold": "{{online}} online, δεν πωλείται πλέον online εδώ",
|
||||
"option": "{{online}} online, μια επιλογή δεν υπάρχει πλέον εδώ",
|
||||
"fee_price": "{{online}} online, {{here}} εδώ",
|
||||
"fee_area": "{{online}} online, η περιοχή δεν εξυπηρετείται πλέον",
|
||||
"fee_minimum": "{{online}} online, κάτω από την ελάχιστη παραγγελία εδώ"
|
||||
}
|
||||
}
|
||||
},
|
||||
"receipts": {
|
||||
"scope": {
|
||||
|
||||
@@ -102,6 +102,7 @@
|
||||
"area_not_found": "Delivery area {{area_id}} not found.",
|
||||
"rule_not_found": "Fee rule {{rule_id}} not found.",
|
||||
"area_in_use": "This area is used by fee rules: {{rules}}. Change those rules first.",
|
||||
"order_invalid": "The new order must list every rule once."
|
||||
"order_invalid": "The new order must list every rule once.",
|
||||
"vat_group_unknown": "VAT group {{vat_group_id}} isn't one of the fiscal machine's groups."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -541,5 +541,18 @@
|
||||
},
|
||||
"asap": "\"As soon as possible\"",
|
||||
"asapHint": "While open, customers can also order for as soon as possible."
|
||||
},
|
||||
"onlineOrders": {
|
||||
"for": "For {{when}}",
|
||||
"asap": "As soon as possible",
|
||||
"priceDiff": "Charged {{charged}} online; at the venue's prices now it would be {{here}}. The customer pays what they were charged."
|
||||
},
|
||||
"feeProduct": {
|
||||
"title": "The fee on the receipt",
|
||||
"intro": "A delivery order's fee is its own line on the bill and the fiscal receipt. Name it and choose its VAT group.",
|
||||
"name": "Name on the bill and receipt",
|
||||
"vat": "VAT group",
|
||||
"vatNone": "No VAT group",
|
||||
"noGroups": "Set up the fiscal machine's VAT groups in Settings → Fiscal to pick one here."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,8 @@
|
||||
"done": "✓ Done"
|
||||
},
|
||||
"batch": "Round {{n}}",
|
||||
"noCourse": "No course"
|
||||
"noCourse": "No course",
|
||||
"for": "for {{time}}"
|
||||
},
|
||||
"channel": {
|
||||
"here": "Here",
|
||||
@@ -310,7 +311,8 @@
|
||||
"pick": "Pick an order to see it",
|
||||
"type": {
|
||||
"delivery": "Delivery",
|
||||
"dine_in": "At the venue"
|
||||
"dine_in": "At the venue",
|
||||
"takeaway": "Takeaway"
|
||||
},
|
||||
"status": {
|
||||
"pending_acceptance": "Waiting for an answer",
|
||||
@@ -332,11 +334,13 @@
|
||||
},
|
||||
"payAnd": {
|
||||
"delivered": "Take {{amount}} · delivered",
|
||||
"served": "Take {{amount}} · served"
|
||||
"served": "Take {{amount}} · served",
|
||||
"collected": "Take {{amount}} · collected"
|
||||
},
|
||||
"mark": {
|
||||
"delivered": "Mark as delivered",
|
||||
"served": "Mark as served"
|
||||
"served": "Mark as served",
|
||||
"collected": "Mark as collected"
|
||||
},
|
||||
"rejectTitle": "Reject this order?",
|
||||
"rejectBody": "The customer sees the reason on their order page.",
|
||||
@@ -349,7 +353,22 @@
|
||||
"other": "Other reason…"
|
||||
},
|
||||
"keep": "Keep it",
|
||||
"rejectConfirm": "Reject order"
|
||||
"rejectConfirm": "Reject order",
|
||||
"asap": "As soon as possible",
|
||||
"for": "For {{when}}",
|
||||
"diff": {
|
||||
"title": "Prices differ from the venue's",
|
||||
"body": "The customer was charged {{charged}} online (and pays that); at today's prices here it would be {{here}}.",
|
||||
"fee": "Delivery fee",
|
||||
"reason": {
|
||||
"price": "{{online}} online, {{here}} here",
|
||||
"not_sold": "{{online}} online, not sold online here any more",
|
||||
"option": "{{online}} online, an extra no longer exists here",
|
||||
"fee_price": "{{online}} online, {{here}} here",
|
||||
"fee_area": "{{online}} online, the area isn't served here any more",
|
||||
"fee_minimum": "{{online}} online, below the minimum here"
|
||||
}
|
||||
}
|
||||
},
|
||||
"receipts": {
|
||||
"scope": {
|
||||
|
||||
Reference in New Issue
Block a user