Fixed process_estimate that I accidently broke

This commit is contained in:
2022-04-06 12:45:40 -04:00
committed by GitHub
parent d8d1942673
commit 3220ff728f

View File

@@ -50,13 +50,13 @@ class Estimate < ActiveRecord::Base
end end
# process an estimate into the database # process an estimate into the database
def self.process_estimate(estimate) def self.process_estimate(qbo_estimate)
logger.info "Processing estimate #{estimate.id}" logger.info "Processing estimate #{qbo_estimate.id}"
estimate = find_or_create_by(id: estimate.id) estimate = find_or_create_by(id: qbo_estimate.id)
estimate.doc_number = estimate.doc_number estimate.doc_number = qbo_estimate.doc_number
estimate.customer_id = estimate.customer_ref.value estimate.customer_id = qbo_estimate.customer_ref.value
estimate.id = estimate.id estimate.id = qbo_estimate.id
estimate.txn_date = estimate.txn_date estimate.txn_date = qbo_estimate.txn_date
estimate.save! estimate.save!
end end