Initial commit

This commit is contained in:
2026-04-07 12:31:22 +05:30
commit 510fba47b5
54 changed files with 2964 additions and 0 deletions

61
docs/sample_email.txt Normal file
View File

@@ -0,0 +1,61 @@
Subject: Daily Digest - YYYY-MM-DD
From: Workolik Team <no-reply@example.com>
To: alice@example.com, bob@example.com
Hello Tucker Fresh,
Heres your daily digest of posted transactions.
Per-store summary (stacked lines: total — event id status):
Porters Liquor Claremont - PC
- Journal: 3,881.24 — 2904783 ✅
- Banking Journal: 0.00 — —
- Account Sales: 2,116.55 — 188210 ✅
- Account Payments: 980.00 — 188050 ✅
Porters Iluka - IP
- Journal: 540.00 — 2905100 ✅
- Banking Journal: 0.00 — —
- Account Sales: 320.00 — 188305 ✅
- Account Payments: 0.00 — —
Cellarbrations at Morris Place - ML
- Journal: 1,592.10 — 2904783 ✅
- Banking Journal: 50.00 — 99001 ⚠️
- Account Sales: 560.00 — 188210 ✅
- Account Payments: 0.00 — —
Cellarbrations at Lynwood - CL (Store 4)
- Journal: 225.00 — 2906000 ✅
- Banking Journal: 0.00 — —
- Account Sales: Nill
- Account Payments: Nill
Cellarbrations at Nicholson Road - NL
- Journal: 410.75 — 2907000 ✅
- Banking Journal: 0.00 — —
- Account Sales: 120.00 — 188500 ✅
- Account Payments: 0.00 — —
Cellarbrations at Lynwood - CL (Store 6)
- Journal: 300.00 — 2908000 ✅
- Banking Journal: 0.00 — —
- Account Sales: Nill
- Account Payments: Nill
Thank you for staying updated with us.
Best regards,
Workolik Team
---
How this mail is triggered (summary):
1) scheduler_standalone.py runs a daily job at 20:00 IST (Asia/Kolkata).
2) It calls app_core/services/daily_report.py:main().
3) That loads the full-day data, builds HTML via MailerService.build_email_html()
including the per-store totals and Event IDs matrix, then sends via SMTP.
4) Recipients from REPORT_RECIPIENTS; duplicate sends are avoided by DB check
against email_logs.date_for.