if price list not found, set default selling/ buying price list from settings (#13259)
This commit is contained in:
parent
3dea6589d7
commit
69d9f51dbb
@ -141,7 +141,10 @@ def set_price_list(out, party, party_type, given_price_list):
|
||||
price_list = get_default_price_list(party)
|
||||
|
||||
if not price_list:
|
||||
price_list = given_price_list
|
||||
if party.doctype == "Customer":
|
||||
price_list = frappe.db.get_single_value('Selling Settings', 'selling_price_list')
|
||||
else:
|
||||
price_list = frappe.db.get_single_value('Buying Settings', 'buying_price_list')
|
||||
|
||||
if price_list:
|
||||
out.price_list_currency = frappe.db.get_value("Price List", price_list, "currency")
|
||||
|
Loading…
x
Reference in New Issue
Block a user