Make billed estimates read-only

An estimate that's Converted or Closed in QuickBooks, or linked to an invoice, opens read-only and is
refused on save (this includes redmine_qbo_lineitems' estimates once invoiced). Its page lists the
invoices it's on. Estimates cache their status so lists show View instead of Edit for them.

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 08:34:41 -04:00
1 parent 4732c32409
commit 3304fce92f
10 files changed
+45 -23

No files matched your search

+1 -1
View File
@@ -29,7 +29,7 @@ module RedmineQboBilling
# Estimates in these states can still be imported (Converted/Closed ones are already invoiced, Rejected ones lost)
OPEN_ESTIMATE_STATUSES = ['', 'Pending', 'Accepted'].freeze
# How QuickBooks marks an invoiced estimate: Converted when it made the invoice, Closed when closed by hand
BILLED_ESTIMATE_STATUSES = %w[Converted Closed].freeze
BILLED_ESTIMATE_STATUSES = EstimateWriter::BILLED_STATUSES
# How far back to look for billable time if QuickBooks won't filter time activities by customer
TIME_LOOKBACK = 400