mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-11-18 02:20:37 -05:00
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:
2 files changed
+14
-11
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user