mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 00:44:45 +00:00
fix: currency not fetched on quotation creation (#20996)
This commit is contained in:
@@ -268,9 +268,11 @@ 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")
|
||||||
|
|
||||||
price_list = frappe.get_value("Customer", source_name, 'default_price_list')
|
price_list, currency = frappe.db.get_value("Customer", {'name': source_name}, ['default_price_list', 'default_currency'])
|
||||||
if price_list:
|
if price_list:
|
||||||
target_doc.selling_price_list = price_list
|
target_doc.selling_price_list = price_list
|
||||||
|
if currency:
|
||||||
|
target_doc.currency = currency
|
||||||
|
|
||||||
return target_doc
|
return target_doc
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user