fix for customer tax

This commit is contained in:
Yan
2017-08-10 13:38:39 +06:30
parent dd6cffec68
commit fb8c67f058
4 changed files with 11 additions and 8 deletions

View File

@@ -65,6 +65,7 @@ class Crm::CustomersController < BaseCrmController
# GET /crm/customers/1/edit
def edit
@customer = Customer.find(params[:id])
end
# POST /crm/customers
@@ -78,7 +79,7 @@ class Crm::CustomersController < BaseCrmController
if @crm_customers.save
# update tax profile
customer = Customer.find(@crm_customers.customer_id)
customer.update_attributes(tax_profiles: params[:customer][:tax_profiles].to_json)
customer.update_attributes(tax_profiles: params[:customer][:tax_profiles])
name = customer_params[:name]
phone = customer_params[:contact_no]
email = customer_params[:email]