Inventory report
This commit is contained in:
@@ -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