Merge branch 'r-1902001-01-dev' of gitlab.com:code2lab/SXRestaurant into r-1902001-01-dev
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user