mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-08 08:54:23 -05:00
Fixed customer typo
This commit is contained in:
@@ -147,16 +147,17 @@ class Customer < ActiveRecord::Base
|
|||||||
# customers = service.query(query)
|
# customers = service.query(query)
|
||||||
#end
|
#end
|
||||||
|
|
||||||
customers.each do |customer|
|
customers.each do |c|
|
||||||
customer = Customer.find_or_create_by(id: customer.id)
|
logger.info "Processing customer #{c.id}"
|
||||||
if customer.active?
|
customer = Customer.find_or_create_by(id: c.id)
|
||||||
if not customer.name.eql? customer.display_name
|
if c.active?
|
||||||
customer.name = customer.display_name
|
if not customer.name.eql? c.display_name
|
||||||
customer.id = customer.id
|
customer.name = c.display_name
|
||||||
|
customer.id = c.id
|
||||||
customer.save_without_push
|
customer.save_without_push
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if not customer.new_record?
|
if not c.new_record?
|
||||||
customer.delete
|
customer.delete
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user