check changable tax on/off settings and customer tax profiles calculation

This commit is contained in:
phyusin
2018-08-02 14:13:05 +06:30
parent 5b94a4604b
commit 444ecb9c68
10 changed files with 184 additions and 105 deletions

View File

@@ -271,6 +271,20 @@ class Origami::PaymentsController < BaseOrigamiController
if !@lookup_pdf.nil?
@pdf_view = @lookup_pdf.value
end
#for changable on/off
@changable_tax = true
lookup_changable_tax = Lookup.collection_of('changable_tax')
if !lookup_changable_tax.empty?
lookup_changable_tax.each do |changable_tax|
if changable_tax[0].downcase == "change"
if changable_tax[1] == '0'
@changable_tax = false
end
end
end
end
@shop = shop_detail #show shop info
@customer_lists = Customer.where("customer_id = 'CUS-000000000001' or customer_id = 'CUS-000000000002'")