major claude changes

This commit is contained in:
2026-01-28 21:55:10 -05:00
parent 3f311980db
commit 2dbd3ea53f
41 changed files with 1235 additions and 278 deletions

View File

@@ -1,3 +1,4 @@
import logging
from flask import jsonify
from sqlalchemy.sql import func
from app.reports import reports
@@ -7,14 +8,17 @@ from app.classes.customer import Customer_Customer
from app.classes.delivery import Delivery_Delivery
logger = logging.getLogger(__name__)
@reports.route("/oil/total", methods=["GET"])
def oil_total_gallons():
logger.info("GET /reports/oil/total - Calculating total oil delivered")
total_oil = db.session\
.query(func.sum(Delivery_Delivery.gallons_delivered))\
.group_by(Delivery_Delivery.id)\
.all()
return jsonify({"ok": True, "oil": total_oil }), 200
@reports.route("/customers/list", methods=["GET"])
@@ -24,6 +28,7 @@ def customer_list():
Returns account number, first name, last name, address, town, and phone number.
Ordered by last name from A to Z.
"""
logger.info("GET /reports/customers/list - Fetching customer list for reports")
customers = db.session.query(Customer_Customer).order_by(Customer_Customer.customer_last_name.asc()).all()
customer_data = [