[Fix] Allow zero valuation rate if previous sle has zero valuation rate (#13432)

This commit is contained in:
rohitwaghchaure 2018-04-02 10:14:49 +05:30 committed by Nabin Hait
parent d17c24f969
commit 40a5a3063c

View File

@ -442,7 +442,7 @@ def get_valuation_rate(item_code, warehouse, voucher_type, voucher_no,
last_valuation_rate = frappe.db.sql("""select valuation_rate
from `tabStock Ledger Entry`
where item_code = %s and warehouse = %s
and valuation_rate > 0
and valuation_rate >= 0
order by posting_date desc, posting_time desc, name desc limit 1""", (item_code, warehouse))
if not last_valuation_rate: