bugs fix for crm
This commit is contained in:
@@ -390,11 +390,14 @@ class SalePayment < ApplicationRecord
|
||||
total_percentage = 0
|
||||
|
||||
type_arr = []
|
||||
response["membership_campaign_data"].each do |a|
|
||||
data = {:type => a["rules_type"], :percentage => a["change_unit"].to_i * a["base_unit"].to_i}
|
||||
total_percentage = total_percentage + a["change_unit"].to_i * a["base_unit"].to_i
|
||||
|
||||
type_arr.push(data)
|
||||
# Check for present response fields
|
||||
if response["membership_campaign_data"].present?
|
||||
response["membership_campaign_data"].each do |a|
|
||||
data = {:type => a["rules_type"], :percentage => a["change_unit"].to_i * a["base_unit"].to_i}
|
||||
total_percentage = total_percentage + a["change_unit"].to_i * a["base_unit"].to_i
|
||||
|
||||
type_arr.push(data)
|
||||
end
|
||||
end
|
||||
|
||||
rebate_arr =[]
|
||||
|
||||
Reference in New Issue
Block a user