update crm and bill
This commit is contained in:
@@ -48,7 +48,22 @@ class Crm::CustomersController < BaseCrmController
|
||||
|
||||
#get customer amount
|
||||
@customer = Customer.find(params[:id])
|
||||
@response = Customer.get_membership_transactions(@customer)
|
||||
@response = Customer.get_membership_transactions(@customer)
|
||||
# get member information
|
||||
total = Customer.get_member_account(@customer)
|
||||
|
||||
|
||||
@balance = 0.00
|
||||
@accountable_type = ''
|
||||
if total["status"]==true
|
||||
total["data"].each do |res|
|
||||
if res["accountable_type"] == "RebateAccount" || res["accountable_type"] == "RebatebonusAccount"
|
||||
@balance += res["balance"]
|
||||
# @accountable_type = res["accountable_type"]
|
||||
@accountable_type = "Rebate Balance"
|
||||
end
|
||||
end
|
||||
end
|
||||
# @response = ""
|
||||
#end customer amount
|
||||
|
||||
|
||||
Reference in New Issue
Block a user