Show invoice statuses

Invoices get a status badge on the customer page's invoice list and the invoice page: Paid, Partially
paid, Overdue, Open or Voided (zero total), worked out from the total, balance and due date like
QuickBooks' invoice list (RedmineQboBilling::InvoiceStatus; QuickBooks keeps no status on invoices).
The list uses the cached balance and due date; the invoice page uses QuickBooks' current figures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
This commit is contained in:
Claude committed 2026-10-31 14:10:11 -04:00
1 parent 0d35cffb83
commit 03af3457ab
7 files changed
+81 -5

No files matched your search

+7
View File
@@ -22,4 +22,11 @@ class Invoice < QboBaseModel
doc_number
end
# Paid, partially paid, overdue, open or voided, from the cached total, balance and due date
# (RedmineQboBilling::InvoiceStatus); nil when the balance isn't cached
def status(today: User.current.today)
RedmineQboBilling::InvoiceStatus.status(total: self[:total_amount], balance: self[:balance],
due_date: self[:due_date], today: today)
end
end