edit for shop_code query

This commit is contained in:
Thein Lin Kyaw
2020-01-13 15:28:26 +06:30
parent bad46cf02c
commit d379c05298
32 changed files with 58 additions and 115 deletions

View File

@@ -87,8 +87,9 @@ class Origami::CustomersController < BaseOrigamiController
@count_customer = Customer.count_customer
# @taxes = TaxProfile.where(:group_type => 'cashier')
@taxes = TaxProfile.unscope(:order).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")
@taxes = TaxProfile.unscope(:order).select("tax_profiles.id, CONCAT(tax_profiles.name, '(', lookups.name, ')') as name")
.joins(:lookup)
.order("group_type ASC, order_by ASC")
# if flash["errors"]
# @crm_customer.valid?
# end