Inventory report

This commit is contained in:
Myat Zin Wai Maw
2019-06-25 10:27:31 +06:30
parent ae9d02333c
commit 438cefcc49
4 changed files with 4 additions and 4 deletions

View File

@@ -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