feat: invoice due date email alerts, add favicon
- Daily cron (8:00 AM) checks created and received invoices - Alerts 3 days before due date and on due date - Summary email to INVOICE_ALERT_EMAIL with grouped tables - Tracks sent alerts in invoice_alert_log to prevent duplicates - node-cron scheduler runs inside the app process - Favicon files copied from PHP project Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -601,6 +601,16 @@ enum leave_requests_status {
|
||||
cancelled
|
||||
}
|
||||
|
||||
model invoice_alert_log {
|
||||
id Int @id @default(autoincrement())
|
||||
invoice_type String @db.VarChar(20) // "created" or "received"
|
||||
invoice_id Int
|
||||
alert_type String @db.VarChar(20) // "3days" or "due"
|
||||
sent_at DateTime @default(now()) @db.DateTime(0)
|
||||
|
||||
@@unique([invoice_type, invoice_id, alert_type])
|
||||
}
|
||||
|
||||
enum received_invoices_status {
|
||||
unpaid
|
||||
paid
|
||||
|
||||
Reference in New Issue
Block a user