Pull from master
This commit is contained in:
@@ -36,10 +36,10 @@ class StockCheckItem < ApplicationRecord
|
||||
def self.get_transaction(from, to, item_code)
|
||||
transaction = all
|
||||
if !from.nil? && !to.nil?
|
||||
transaction = transaction.where('created_at between ? and ?', from, to)
|
||||
transaction = transaction.where('created_at between ? and ?', from, to).order("item_code asc, different desc")
|
||||
end
|
||||
if item_code.present?
|
||||
transaction = transaction.where(item_code: item_code)
|
||||
transaction = transaction.where(item_code: item_code).order("item_code asc, different desc")
|
||||
end
|
||||
transaction
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user