Test case fixed for swtiching valuation method
This commit is contained in:
parent
608bbc7850
commit
6f64a78ecf
@ -352,6 +352,21 @@ class TestDeliveryNote(unittest.TestCase):
|
||||
self.assertEquals(actual_qty, opening_qty_test_warehouse_1 + 25)
|
||||
|
||||
# stock value diff for source warehouse
|
||||
# for "_Test Item"
|
||||
stock_value_difference = frappe.db.get_value("Stock Ledger Entry",
|
||||
{"voucher_type": "Delivery Note", "voucher_no": dn.name,
|
||||
"item_code": "_Test Item", "warehouse": "_Test Warehouse - _TC"},
|
||||
"stock_value_difference")
|
||||
|
||||
# stock value diff for target warehouse
|
||||
stock_value_difference1 = frappe.db.get_value("Stock Ledger Entry",
|
||||
{"voucher_type": "Delivery Note", "voucher_no": dn.name,
|
||||
"item_code": "_Test Item", "warehouse": "_Test Warehouse 1 - _TC"},
|
||||
"stock_value_difference")
|
||||
|
||||
self.assertEquals(abs(stock_value_difference), stock_value_difference1)
|
||||
|
||||
# for "_Test Item Home Desktop 100"
|
||||
stock_value_difference = frappe.db.get_value("Stock Ledger Entry",
|
||||
{"voucher_type": "Delivery Note", "voucher_no": dn.name,
|
||||
"item_code": "_Test Item Home Desktop 100", "warehouse": "_Test Warehouse - _TC"},
|
||||
|
@ -120,7 +120,7 @@ def set_valuation_method(item_code, valuation_method):
|
||||
for warehouse in frappe.get_all("Warehouse", filters={"company": "_Test Company"}):
|
||||
update_entries_after({
|
||||
"item_code": item_code,
|
||||
"warehouse": warehouse
|
||||
"warehouse": warehouse.name
|
||||
}, allow_negative_stock=1)
|
||||
|
||||
test_dependencies = ["Item", "Warehouse"]
|
||||
|
Loading…
Reference in New Issue
Block a user