mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-04-02 08:21:57 -04:00
removed uneeded comments
This commit is contained in:
@@ -84,23 +84,14 @@ class EstimateSyncService
|
|||||||
log "Persisting estimate #{remote.id}"
|
log "Persisting estimate #{remote.id}"
|
||||||
local = Estimate.find_or_initialize_by(id: remote.id)
|
local = Estimate.find_or_initialize_by(id: remote.id)
|
||||||
|
|
||||||
#if remote.txn_status?
|
local.doc_number = remote.doc_number
|
||||||
local.doc_number = remote.doc_number
|
local.txn_date = remote.txn_date
|
||||||
local.txn_date = remote.txn_date
|
local.customer = Customer.find_by(id: remote.customer_ref&.value)
|
||||||
local.customer = Customer.find_by(id: remote.customer_ref&.value)
|
|
||||||
|
|
||||||
if local.changed?
|
if local.changed?
|
||||||
local.save
|
local.save
|
||||||
log "Updated estimate #{remote.id}"
|
log "Updated estimate #{remote.id}"
|
||||||
end
|
end
|
||||||
|
|
||||||
# TODO handle deleted estimates
|
|
||||||
#else
|
|
||||||
# if local.persisted?
|
|
||||||
# local.destroy
|
|
||||||
# log "Deleted estimate #{remote.id}"
|
|
||||||
# end
|
|
||||||
# end
|
|
||||||
rescue => e
|
rescue => e
|
||||||
log "Failed to sync estimate #{remote.id}: #{e.message}"
|
log "Failed to sync estimate #{remote.id}: #{e.message}"
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user