mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-20 09:49:58 +00:00
fix: remove redundant conversion_rate
This commit is contained in:
@@ -6,8 +6,6 @@ from frappe import _
|
||||
from frappe.model.document import Document
|
||||
from frappe.model.mapper import get_mapped_doc
|
||||
|
||||
from erpnext.setup.utils import get_exchange_rate
|
||||
|
||||
|
||||
@frappe.whitelist()
|
||||
def make_quotation(source_name: str, target_doc: str | Document | None = None):
|
||||
@@ -31,11 +29,7 @@ def make_quotation(source_name: str, target_doc: str | Document | None = None):
|
||||
target_doc.selling_price_list = price_list
|
||||
if currency:
|
||||
target_doc.currency = currency
|
||||
company_currency = frappe.get_cached_value("Company", target_doc.company, "default_currency")
|
||||
if target_doc.company and target_doc.currency != company_currency:
|
||||
target_doc.conversion_rate = get_exchange_rate(
|
||||
target_doc.currency, company_currency, target_doc.transaction_date, "for_selling"
|
||||
)
|
||||
|
||||
target_doc.run_method("set_missing_values")
|
||||
target_doc.run_method("set_other_charges")
|
||||
target_doc.run_method("calculate_taxes_and_totals")
|
||||
|
||||
Reference in New Issue
Block a user