From 8c638179505de721f6b31b7443e1bd91c3ee78aa Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Thu, 28 Mar 2024 14:13:39 -0400 Subject: [PATCH] Use free_form_number --- app/models/customer.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/customer.rb b/app/models/customer.rb index 2046aba..cb9221a 100644 --- a/app/models/customer.rb +++ b/app/models/customer.rb @@ -158,8 +158,8 @@ class Customer < ActiveRecord::Base #if not customer.name.eql? c.display_name customer.name = c.display_name customer.id = c.id - customer.phone_number = c.primary_phone.tr('^0-9', '') unless c.primary_phone.nil? - customer.mobile_phone_number = c.mobile_phone.tr('^0-9', '') unless c.mobile_phone.nil? + customer.phone_number = c.primary_phone.free_form_number.tr('^0-9', '') unless c.primary_phone.nil? + customer.mobile_phone_number = c.mobile_phone.free_form_number.tr('^0-9', '') unless c.mobile_phone.nil? customer.save_without_push #end else @@ -192,8 +192,8 @@ class Customer < ActiveRecord::Base #if not customer.name.eql? c.display_name customer.name = c.display_name customer.id = c.id - customer.phone_number = c.primary_phone.tr('^0-9', '') unless c.primary_phone.nil? - customer.mobile_phone_number = c.mobile_phone.tr('^0-9', '') unless c.mobile_phone.nil? + customer.phone_number = c.primary_phone.free_form_number.tr('^0-9', '') unless c.primary_phone.nil? + customer.mobile_phone_number = c.mobile_phone.free_form_number.tr('^0-9', '') unless c.mobile_phone.nil? customer.save_without_push #end else