mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-07 23:22:52 +00:00
test: test case to check disable last purchase rate
This commit is contained in:
@@ -411,7 +411,9 @@ def get_basic_details(args, item, overwrite_warehouse=True):
|
||||
args.stock_qty = out.stock_qty
|
||||
|
||||
# calculate last purchase rate
|
||||
if args.get("doctype") in purchase_doctypes:
|
||||
if args.get("doctype") in purchase_doctypes and not frappe.db.get_single_value(
|
||||
"Buying Settings", "disable_last_purchase_rate"
|
||||
):
|
||||
from erpnext.buying.doctype.purchase_order.purchase_order import item_last_purchase_rate
|
||||
|
||||
out.last_purchase_rate = item_last_purchase_rate(
|
||||
|
||||
Reference in New Issue
Block a user