Updated charge close to working
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user