Read NFC
This commit is contained in:
@@ -36,7 +36,7 @@ class StockJournal < ApplicationRecord
|
||||
end
|
||||
|
||||
def self.from_stock_check(item,shop)
|
||||
stock_journal = StockJournal.where("shop_code='#{shop.shop_code}' and item_code=?", item.item_code).order("id DESC").first
|
||||
stock_journal = StockJournal.where("item_code=?", item.item_code).order("id DESC").first
|
||||
if stock_journal.nil?
|
||||
old_blance = 0
|
||||
inventory_definition_id = InventoryDefinition.find_by_item_code_and_shop_code(item.item_code,shop.shop_code).id
|
||||
@@ -79,7 +79,7 @@ class StockJournal < ApplicationRecord
|
||||
end
|
||||
|
||||
def self.delete_stock_journal(item_code,shop)
|
||||
self.where("item_code=? and shop_code='#{shop.shop_code}'", item_code).delete_all
|
||||
self.where("item_code=?", item_code).delete_all
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user