[test] [fix] abs(valuation_rate) for moving average
This commit is contained in:
parent
9f436a7c71
commit
14a908bdec
@ -352,12 +352,12 @@ class TestDeliveryNote(unittest.TestCase):
|
||||
|
||||
# stock value diff for source warehouse
|
||||
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"},
|
||||
"voucher_no": dn.name, "item_code": "_Test Item Home Desktop 100", "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"},
|
||||
"voucher_no": dn.name, "item_code": "_Test Item Home Desktop 100", "warehouse": "_Test Warehouse 1 - _TC"},
|
||||
"stock_value_difference")
|
||||
|
||||
self.assertEquals(abs(stock_value_difference), stock_value_difference1)
|
||||
|
@ -248,7 +248,7 @@ class update_entries_after(object):
|
||||
elif not self.valuation_rate and self.qty_after_transaction <= 0:
|
||||
self.valuation_rate = get_valuation_rate(sle.item_code, sle.warehouse, self.allow_zero_rate)
|
||||
|
||||
return abs(flt(self.valuation_rate))
|
||||
self.valuation_rate = abs(flt(self.valuation_rate))
|
||||
|
||||
def get_fifo_values(self, sle):
|
||||
incoming_rate = flt(sle.incoming_rate)
|
||||
|
Loading…
Reference in New Issue
Block a user