update member discount

This commit is contained in:
Aung Myo
2017-09-14 17:36:00 +06:30
parent 90681cddcc
commit e878a6387e
14 changed files with 1055 additions and 932 deletions

View File

@@ -107,7 +107,17 @@ class SaleItem < ApplicationRecord
return price,type
end
# Check for Card Payment
def self.get_sale_payments_by_card(sale_payments)
# Check for Card Payment
sale_payments.each do |sp|
if sp.payment_method == "jcb" || sp.payment_method == "mpu" || sp.payment_method == "visa" || sp.payment_method == "master"
return true;
end
end
end
# def self.get_overall_discount(sale_id)
# price = 0.0
# item=SaleItem.where("product_code=?", sale_id)