test: fix expected test failures
This commit is contained in:
parent
102fff24c8
commit
d130233ffc
@ -200,7 +200,6 @@ class TestStockReconciliation(ERPNextTestCase):
|
||||
|
||||
def test_stock_reco_for_batch_item(self):
|
||||
to_delete_records = []
|
||||
to_delete_serial_nos = []
|
||||
|
||||
# Add new serial nos
|
||||
item_code = "Stock-Reco-batch-Item-1"
|
||||
@ -208,20 +207,22 @@ class TestStockReconciliation(ERPNextTestCase):
|
||||
|
||||
sr = create_stock_reconciliation(item_code=item_code,
|
||||
warehouse = warehouse, qty=5, rate=200, do_not_submit=1)
|
||||
sr.save(ignore_permissions=True)
|
||||
sr.save()
|
||||
sr.submit()
|
||||
|
||||
self.assertTrue(sr.items[0].batch_no)
|
||||
batch_no = sr.items[0].batch_no
|
||||
self.assertTrue(batch_no)
|
||||
to_delete_records.append(sr.name)
|
||||
|
||||
sr1 = create_stock_reconciliation(item_code=item_code,
|
||||
warehouse = warehouse, qty=6, rate=300, batch_no=sr.items[0].batch_no)
|
||||
warehouse = warehouse, qty=6, rate=300, batch_no=batch_no)
|
||||
|
||||
args = {
|
||||
"item_code": item_code,
|
||||
"warehouse": warehouse,
|
||||
"posting_date": nowdate(),
|
||||
"posting_time": nowtime(),
|
||||
"batch_no": batch_no,
|
||||
}
|
||||
|
||||
valuation_rate = get_incoming_rate(args)
|
||||
@ -230,7 +231,7 @@ class TestStockReconciliation(ERPNextTestCase):
|
||||
|
||||
|
||||
sr2 = create_stock_reconciliation(item_code=item_code,
|
||||
warehouse = warehouse, qty=0, rate=0, batch_no=sr.items[0].batch_no)
|
||||
warehouse = warehouse, qty=0, rate=0, batch_no=batch_no)
|
||||
|
||||
stock_value = get_stock_value_on(warehouse, nowdate(), item_code)
|
||||
self.assertEqual(stock_value, 0)
|
||||
|
@ -751,6 +751,7 @@ class update_entries_after(object):
|
||||
self.wh_data.stock_value += stock_value_difference
|
||||
else:
|
||||
outgoing_rate = get_batch_incoming_rate(item_code=sle.item_code, warehouse=sle.warehouse, batch_no=sle.batch_no, posting_date=sle.posting_date, posting_time=sle.posting_time, creation=sle.creation)
|
||||
# TODO: negative stock handling
|
||||
stock_value_difference = outgoing_rate * actual_qty
|
||||
self.wh_data.stock_value += stock_value_difference
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user