feat: pricing on v2 (platform-v2 step 6.7)
- manager src/pages/pricing: price rules, price groups, deals, discounts on the tokens, English and Greek; the rules as data in pricingLogic.js (tests/pricing.test.mjs) - routers/pricing: set-up needs pricing.manage, broadcasts pricing.changed; incomplete conditions refused (pricing.bad_condition); venue discount settings saved again (the date-as-text bug) with empty = no limit (pricing.bad_limit), old "None" tolerated - nav: Offers & pricing needs pricing.manage - tests: test_pricing_setup.py (a happy-hour rule prices a counter quote), manager.mjs e2e Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -654,7 +654,10 @@ def check_waiter_discount_limits(
|
||||
# --- Global limits from pos_settings ---
|
||||
def _gs(key):
|
||||
row = db.query(PosSettings).filter(PosSettings.key == key).first()
|
||||
return float(row.value) if row and row.value else None
|
||||
try:
|
||||
return float(row.value) if row and row.value else None
|
||||
except ValueError: # an old "None" (fixed in 6.7): no limit
|
||||
return None
|
||||
|
||||
g_max_wd_value = _gs("discounts.max_total_value_workday")
|
||||
g_max_shift_val = _gs("discounts.max_total_value_shift")
|
||||
|
||||
Reference in New Issue
Block a user