change tax profile structure

This commit is contained in:
phyusin
2018-07-25 17:19:00 +06:30
parent 2be9ff0613
commit 94a65a749f
6 changed files with 85 additions and 69 deletions

View File

@@ -87,7 +87,9 @@ class Origami::CustomersController < BaseOrigamiController
@crm_customer = Customer.new
@count_customer = Customer.count_customer
@taxes = TaxProfile.where(:group_type => 'cashier')
# @taxes = TaxProfile.where(:group_type => 'cashier')
@taxes = TaxProfile.unscoped.select("id, (CONCAT(name,'(',(SELECT name FROM lookups WHERE lookup_type='tax_profiles' AND value=group_type),')')) as name")
.order("group_type ASC,order_by ASC")
# if flash["errors"]
# @crm_customer.valid?
# end