Updated charge close to working

This commit is contained in:
2025-09-09 18:26:08 -04:00
parent 14abc3c2b4
commit 382e12671b
4 changed files with 75 additions and 1 deletions

View File

@@ -8,6 +8,7 @@ from app.classes.delivery import (Delivery_Delivery,
)
from app.classes.service import Service_Service
from app.classes.auto import Auto_Delivery
from app.classes.transactions import Transaction
from datetime import date, timedelta, datetime
@@ -42,6 +43,8 @@ def get_sidebar_counts():
Service_Service.scheduled_date < start_of_tomorrow
).count()
transaction_count = db.session.query(Transaction).filter(Transaction.transaction_type == 0).count()
return jsonify({
"ok": True,
"counts": {
@@ -52,6 +55,7 @@ def get_sidebar_counts():
"automatic": automatic_count,
"upcoming_service": upcoming_service_count,
"today_service": today_service_count,
"transaction": transaction_count,
}
}), 200