mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-17 16:38:41 +00:00
fix: set currency and price list before computing quotation totals
This commit is contained in:
@@ -23,9 +23,6 @@ def make_quotation(source_name: str, target_doc: str | Document | None = None):
|
||||
)
|
||||
|
||||
target_doc.quotation_to = "Customer"
|
||||
target_doc.run_method("set_missing_values")
|
||||
target_doc.run_method("set_other_charges")
|
||||
target_doc.run_method("calculate_taxes_and_totals")
|
||||
|
||||
price_list, currency = frappe.db.get_value(
|
||||
"Customer", {"name": source_name}, ["default_price_list", "default_currency"]
|
||||
@@ -39,7 +36,9 @@ def make_quotation(source_name: str, target_doc: str | Document | None = None):
|
||||
target_doc.conversion_rate = get_exchange_rate(
|
||||
target_doc.currency, company_currency, target_doc.transaction_date, "for_selling"
|
||||
)
|
||||
target_doc.run_method("calculate_taxes_and_totals")
|
||||
target_doc.run_method("set_missing_values")
|
||||
target_doc.run_method("set_other_charges")
|
||||
target_doc.run_method("calculate_taxes_and_totals")
|
||||
|
||||
return target_doc
|
||||
|
||||
|
||||
Reference in New Issue
Block a user