Skip to content

Commit

Permalink
[Fix] Allow zero valuation rate if previous sle has zero valuation ra…
Browse files Browse the repository at this point in the history
…te (#13432)
  • Loading branch information
rohitwaghchaure authored and nabinhait committed Apr 2, 2018
1 parent d17c24f commit 40a5a30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion erpnext/stock/stock_ledger.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 40a5a30

Please sign in to comment.