Send an estimate's lines with status changes

QuickBooks refused the Accepted update with "At least 1 line item is required": a sparse estimate update
still needs its lines. Status changes (Accepted when issues are created, Closed when an invoice is saved)
now go through EstimateWriter.status_update, which sends the estimate's lines back exactly as QuickBooks
returned them, so nothing else changes.

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 12:47:09 -04:00
1 parent 6ac0e27cb2
commit 66d96c9e4c
2 files changed
+14 -11

No files matched your search

+1 -6
View File
@@ -270,12 +270,7 @@ module RedmineQboBilling
# Already Converted or Closed is left as QuickBooks set it
next if estimate.nil? || BILLED_ESTIMATE_STATUSES.include?(estimate.txn_status.to_s)
update = Quickbooks::Model::Estimate.new
update.id = estimate.id
update.sync_token = estimate.sync_token
update.customer_ref = estimate.customer_ref
update.txn_status = 'Closed'
service.update(update, sparse: true)
service.update(writer.status_update(estimate, 'Closed'), sparse: true)
end
EstimateSyncService.new.sync_by_id(id)
rescue StandardError => e