diff --git a/erpnext/venue/doctype/item_booking/item_booking.py b/erpnext/venue/doctype/item_booking/item_booking.py index e3a1151b73201e0c221c95d833a05ea6422dba02..4e0fb95b190754c5d98854cd01f4c27fb241290d 100644 --- a/erpnext/venue/doctype/item_booking/item_booking.py +++ b/erpnext/venue/doctype/item_booking/item_booking.py @@ -48,6 +48,8 @@ from erpnext.venue.utils import get_linked_customers if TYPE_CHECKING: from typing import Callable, TypeVar + from erpnext.selling.doctype.quotation.quotation import Quotation + class schedule_line_t(TypedDict): start_time: str end_time: str @@ -1482,9 +1484,7 @@ def clear_draft_bookings(): @frappe.whitelist() def make_quotation(source_name, target_doc=None): def set_missing_values(source, target): - from erpnext.controllers.accounts_controller import get_default_taxes_and_charges - - quotation = frappe.get_doc(target) + quotation: "Quotation" = frappe.get_doc(target) quotation.order_type = "Maintenance" company_currency = frappe.get_cached_value("Company", quotation.company, "default_currency") @@ -1517,14 +1517,8 @@ def make_quotation(source_name, target_doc=None): }, ) - # get default taxes - taxes = get_default_taxes_and_charges( - "Sales Taxes and Charges Template", company=quotation.company - ) - if taxes.get("taxes"): - quotation.update(taxes) - quotation.run_method("set_missing_values") + quotation.run_method("set_other_charges") quotation.run_method("calculate_taxes_and_totals") doclist = get_mapped_doc(