Fix: only attach invoices if document is updated

This commit is contained in:
2026-03-01 19:27:23 -05:00
parent b95a3b6623
commit 899c9878c4

View File

@@ -109,10 +109,10 @@ class SyncServiceBase
if local.changed?
local.save!
log "Updated #{@entity.name} #{remote.id}"
end
# Handle attaching documents if applicable to invoices
attach_documents(local, remote)
# Handle attaching documents if applicable to invoices
attach_documents(local, remote)
end
rescue => e
log "Failed to sync #{@entity.name} #{remote.id}: #{e.message}"