remove get_tax_profiles from api_controller and create tax_profiles api

This commit is contained in:
Thein Lin Kyaw
2020-07-20 00:26:47 +06:30
parent ced6a09095
commit 4e61eba843
6 changed files with 19 additions and 9 deletions

View File

@@ -5,6 +5,8 @@ class TaxProfile < ApplicationRecord
# validations
validates_presence_of :name, :rate, :group_type
scope :filter_by_group_type, -> (group_type) { where group_type: group_type }
def self.calculate_tax(group_type)
divided_value =0.0
exclusive =0.0