Merge branch 'r-1902001-01' into foodcourt

This commit is contained in:
Thein Lin Kyaw
2020-07-19 19:44:59 +06:30
17 changed files with 240 additions and 146 deletions

View File

@@ -4,10 +4,11 @@ class TaxProfile < ApplicationRecord
default_scope { order('order_by asc') }
# validations
validates_presence_of :name, :rate, :group_type
def self.calculate_tax(group_type)
divided_value =0.0
exclusive =0.0
tax_profiles = TaxProfile.where(group_type: group_type,tax_type: 'Percentage')
tax_profiles = TaxProfile.where(group_type: group_type, tax_type: 'Percentage')
if !tax_profiles.empty?
tax_profiles.each do |tax|
#include or execulive