Add invoice void with ledger reversal, required reason, and voided badge
Deploy to LXC / deploy (push) Successful in 1m56s
Validate / validate (push) Successful in 48s

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-17 15:18:35 +07:00
parent 0906a448b3
commit 5ff4f07ff4
3 changed files with 112 additions and 3 deletions
+5 -1
View File
@@ -432,7 +432,8 @@ export const invoiceStatusEnum = pgEnum('invoice_status', [
'sent',
'paid',
'overdue',
'cancelled'
'cancelled',
'voided'
]);
export const invoices = pgTable(
@@ -460,6 +461,8 @@ export const invoices = pgTable(
}),
notes: text('notes'),
pdfPath: text('pdf_path'),
voidedAt: timestamp('voided_at', { withTimezone: true }),
voidReason: text('void_reason'),
createdAt: timestamp('created_at', { withTimezone: true }).notNull().defaultNow(),
updatedAt: timestamp('updated_at', { withTimezone: true }).notNull().defaultNow()
},
@@ -1199,6 +1202,7 @@ export const companyLogEventEnum = pgEnum('company_log_event', [
'invoice_created',
'invoice_sent',
'invoice_paid',
'invoice_voided',
'integration_connected',
'integration_disconnected',
'transaction_matched',