Pull from master
This commit is contained in:
@@ -4,10 +4,11 @@ class StockJournal < ApplicationRecord
|
||||
STOCK_CHECK_TRANS = "stock_check"
|
||||
|
||||
def self.add_to_journal(item, balance, stock_message, inventory_definition) # item => saleObj | balance => Stock journal
|
||||
journal = StockJournal.new
|
||||
journal.credit = balance
|
||||
|
||||
balance = calculate_balance(balance, item.qty)
|
||||
|
||||
journal = StockJournal.new
|
||||
|
||||
journal.item_code = item.item_instance_code
|
||||
journal.inventory_definition_id = inventory_definition.id
|
||||
journal.debit = item.qty
|
||||
|
||||
Reference in New Issue
Block a user