From 3220ff728f59734679c6bf9d6250bfea9f9b2bfb Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Wed, 6 Apr 2022 12:45:40 -0400 Subject: [PATCH] Fixed process_estimate that I accidently broke --- app/models/estimate.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/models/estimate.rb b/app/models/estimate.rb index 4d9bf82..541f4bd 100644 --- a/app/models/estimate.rb +++ b/app/models/estimate.rb @@ -50,13 +50,13 @@ class Estimate < ActiveRecord::Base end # process an estimate into the database - def self.process_estimate(estimate) - logger.info "Processing estimate #{estimate.id}" - estimate = find_or_create_by(id: estimate.id) - estimate.doc_number = estimate.doc_number - estimate.customer_id = estimate.customer_ref.value - estimate.id = estimate.id - estimate.txn_date = estimate.txn_date + def self.process_estimate(qbo_estimate) + logger.info "Processing estimate #{qbo_estimate.id}" + estimate = find_or_create_by(id: qbo_estimate.id) + estimate.doc_number = qbo_estimate.doc_number + estimate.customer_id = qbo_estimate.customer_ref.value + estimate.id = qbo_estimate.id + estimate.txn_date = qbo_estimate.txn_date estimate.save! end