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": {
|
||||
|
||||
Reference in New Issue
Block a user