Updated claude big changes

This commit is contained in:
2026-01-29 08:43:56 -05:00
parent 2dbd3ea53f
commit eb4740c553
24 changed files with 388 additions and 429 deletions

View File

@@ -1,7 +1,7 @@
import logging
from flask import jsonify
from app.money import money
from app import db
from app.common.responses import success_response
import datetime
from datetime import date
from app.classes.money import Money_delivery, Money_delivery_schema
@@ -47,10 +47,10 @@ def total_profit_week():
total_deliveries = total_deliveries + 1
return jsonify({"ok": True,
'total_profit': total_profit,
'total_deliveries': total_deliveries
}), 200
return success_response({
'total_profit': total_profit,
'total_deliveries': total_deliveries
})
@@ -70,9 +70,7 @@ def total_profit_year():
.all())
for f in get_total:
total_profit = total_profit + f.total_profit
return jsonify({"ok": True,
'total': total_profit
}), 200
return success_response({'total': total_profit})
@money.route("/<int:delivery_id>", methods=["GET"])
@@ -86,4 +84,4 @@ def get_money_delivery(delivery_id):
.first())
money_schema = Money_delivery_schema(many=False)
return jsonify(money_schema.dump(profit))
return success_response({"profit": money_schema.dump(profit)})