tax profiles
This commit is contained in:
@@ -40,23 +40,7 @@ class Origami::QuickServiceController < ApplicationController
|
||||
end
|
||||
end
|
||||
end
|
||||
divided_value =0
|
||||
exclusive =0
|
||||
tax_profiles = TaxProfile.where(group_type: "quick_service")
|
||||
if !tax_profiles.empty?
|
||||
tax_profiles.each do |tax|
|
||||
#include or execulive
|
||||
if tax.inclusive
|
||||
tax_incl_exec = "inclusive"
|
||||
rate = tax.rate
|
||||
divided_value += (100 + rate)/rate
|
||||
else
|
||||
exclusive +=tax.rate / 100
|
||||
end
|
||||
end
|
||||
end
|
||||
@inclusive_tax =divided_value
|
||||
@exclusive_tax =exclusive
|
||||
@inclusive_tax,@exclusive_tax =TaxProfile.calculate_tax("quick_service")
|
||||
render "origami/addorders/detail"
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user