merge with staging

This commit is contained in:
Yan
2017-07-31 19:37:51 +06:30
7 changed files with 38 additions and 26 deletions

View File

@@ -400,10 +400,8 @@ class SalePayment < ApplicationRecord
rebate_arr =[]
campaign_method.each do |a|
data = {:type => a[:type], :amount => a[:amount]}
puts data
type_arr.each do |si|
if si[:type] == a[:type]
puts "steeeeeeeeeeeee"
amount = (redeem_amount / total_percentage)*si[:percentage]
actual = a[:amount] - amount
data[:amount] = actual
@@ -412,7 +410,7 @@ class SalePayment < ApplicationRecord
end
rebate_arr.push(data)
end
total_amount = rebate_prices - payparcost - overall_dis
if credit == 1