mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 08:54:45 +00:00
[Fix] Allow zero valuation rate if previous sle has zero valuation rate (#13432)
This commit is contained in:
committed by
Nabin Hait
parent
d17c24f969
commit
40a5a3063c
@@ -442,7 +442,7 @@ def get_valuation_rate(item_code, warehouse, voucher_type, voucher_no,
|
|||||||
last_valuation_rate = frappe.db.sql("""select valuation_rate
|
last_valuation_rate = frappe.db.sql("""select valuation_rate
|
||||||
from `tabStock Ledger Entry`
|
from `tabStock Ledger Entry`
|
||||||
where item_code = %s and warehouse = %s
|
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))
|
order by posting_date desc, posting_time desc, name desc limit 1""", (item_code, warehouse))
|
||||||
|
|
||||||
if not last_valuation_rate:
|
if not last_valuation_rate:
|
||||||
|
|||||||
Reference in New Issue
Block a user