Update main.py
Browse files
main.py
CHANGED
|
@@ -351,13 +351,13 @@ def financial_statement():
|
|
| 351 |
cached = doc_ref.get()
|
| 352 |
if cached.exists:
|
| 353 |
return jsonify({"report": cached.to_dict()["report"], "cached": True}), 200
|
| 354 |
-
|
| 355 |
# fetch transactions
|
| 356 |
snaps = (
|
| 357 |
fs.collection("transactions")
|
| 358 |
.where("business_id", "==", biz)
|
| 359 |
-
.where("Date", ">=", datetime.strptime(dt_start
|
| 360 |
-
.where("Date", "<=", datetime.strptime(dt_end
|
| 361 |
.stream()
|
| 362 |
)
|
| 363 |
txns = []
|
|
|
|
| 351 |
cached = doc_ref.get()
|
| 352 |
if cached.exists:
|
| 353 |
return jsonify({"report": cached.to_dict()["report"], "cached": True}), 200
|
| 354 |
+
|
| 355 |
# fetch transactions
|
| 356 |
snaps = (
|
| 357 |
fs.collection("transactions")
|
| 358 |
.where("business_id", "==", biz)
|
| 359 |
+
.where("Date", ">=", datetime.strptime(dt_start, "%d/%m/%Y"))
|
| 360 |
+
.where("Date", "<=", datetime.strptime(dt_end, "%d/%m/%Y"))
|
| 361 |
.stream()
|
| 362 |
)
|
| 363 |
txns = []
|