feat: 5-tier pricing, market ticker integration, and delivery stats
Major update spanning pricing, market data, and analytics: - Pricing: Replace single-price service fees with 5-tier pricing for same-day, prime, and emergency deliveries across create/edit/finalize - Market: Add Ticker_Price and CompanyPrice models with endpoints for live commodity prices (HO, CL, RB) and competitor price tracking - Stats: Add daily/weekly/monthly gallons endpoints with multi-year comparison and YoY totals for the stats dashboard - Delivery: Add map and history endpoints, fix finalize null-driver crash - Schema: Change fill_location from INTEGER to VARCHAR(250), add pre_load normalization for customer updates, fix admin auth check Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -59,6 +59,11 @@ class Delivery_Delivery(db.Model):
|
||||
same_day = db.Column(db.INTEGER)
|
||||
emergency = db.Column(db.INTEGER)
|
||||
|
||||
# Pricing tier selection (1-5) for each service type
|
||||
pricing_tier_same_day = db.Column(db.INTEGER, default=1)
|
||||
pricing_tier_prime = db.Column(db.INTEGER, default=1)
|
||||
pricing_tier_emergency = db.Column(db.INTEGER, default=1)
|
||||
|
||||
# cash = 0
|
||||
# credit = 1
|
||||
# credit/cash = 2
|
||||
|
||||
Reference in New Issue
Block a user