mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-08 17:04:23 -05:00
Fixed process_estimate that I accidently broke
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user