diff --git a/app/controllers/origami/payments_controller.rb b/app/controllers/origami/payments_controller.rb index 6c487d66..4224629b 100755 --- a/app/controllers/origami/payments_controller.rb +++ b/app/controllers/origami/payments_controller.rb @@ -102,6 +102,7 @@ class Origami::PaymentsController < BaseOrigamiController printer = Printer::ReceiptPrinter.new(print_settings) + #TODO :: KBZPAY ( QR ) # On/Off setting ( show or not qr ) # qrCode = "00020101021202021110500346KBZ005ab0ed5c1ed09d1c4585ff1313170389160831435294600062000040732kp1e78f7efddca190042638341afb88d50200006KBZPay0106KBZPay5303MMK5802MM62170813PAY_BY_QRCODE64060002my6304FBBD" diff --git a/app/models/inventory_definition.rb b/app/models/inventory_definition.rb index f56de536..189d8dc7 100755 --- a/app/models/inventory_definition.rb +++ b/app/models/inventory_definition.rb @@ -102,7 +102,7 @@ class InventoryDefinition < ApplicationRecord OR mii.item_instance_name LIKE ? OR mc.name LIKE ?","%#{filter}%","%#{filter}%","%#{filter}%", "%#{filter}%","%#{filter}%","%#{filter}%","%#{filter}%") .group("mi.menu_category_id,inventory_definitions.item_code") - .order("acc.title desc,mi.menu_category_id desc,balance ASC") + .order("mi.name asc,acc.title desc,mi.menu_category_id desc,balance ASC") end end diff --git a/app/models/stock_check_item.rb b/app/models/stock_check_item.rb index 05ee98a7..67e8b3aa 100755 --- a/app/models/stock_check_item.rb +++ b/app/models/stock_check_item.rb @@ -15,7 +15,7 @@ class StockCheckItem < ApplicationRecord end def self.find_journal(item_code) - journal = StockJournal.where('item_code=?', item_code).order('created_at desc').take + journal = StockJournal.where('item_code=?', item_code).order("id DESC").first if journal return journal.id, journal.balance else diff --git a/config/puma.rb b/config/puma.rb index fd89392f..a0dae8b3 100755 --- a/config/puma.rb +++ b/config/puma.rb @@ -1,6 +1,6 @@ application_path="#{File.expand_path("../..", __FILE__)}" directory application_path -#environment ENV.fetch("RAILS_ENV") { "production" } +environment ENV.fetch("RAILS_ENV") { "production" } environment "production" pidfile "#{application_path}/tmp/puma/pid" state_path "#{application_path}/tmp/puma/state"