mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-29 09:54:47 +00:00
fix : only set price list if it exists for customer
This commit is contained in:
@@ -258,7 +258,10 @@ def make_quotation(source_name, target_doc=None):
|
|||||||
target_doc.run_method("set_other_charges")
|
target_doc.run_method("set_other_charges")
|
||||||
target_doc.run_method("calculate_taxes_and_totals")
|
target_doc.run_method("calculate_taxes_and_totals")
|
||||||
|
|
||||||
target_doc.selling_price_list = frappe.get_doc("Customer",source_name).default_price_list
|
price_list = frappe.get_value("Customer",source_name, 'default_price_list')
|
||||||
|
if price_list:
|
||||||
|
target_doc.selling_price_list = price_list
|
||||||
|
|
||||||
return target_doc
|
return target_doc
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
|
|||||||
Reference in New Issue
Block a user