diff --git a/erpnext/accounts/doctype/accounts_settings/accounts_settings.py b/erpnext/accounts/doctype/accounts_settings/accounts_settings.py index 4ebe3e8cb34..e75b8ad1710 100644 --- a/erpnext/accounts/doctype/accounts_settings/accounts_settings.py +++ b/erpnext/accounts/doctype/accounts_settings/accounts_settings.py @@ -35,7 +35,6 @@ BUYING_DOCTYPES = [ ] - class AccountsSettings(Document): # begin: auto-generated types # This code is auto-generated. Do not modify anything in this block. @@ -193,11 +192,13 @@ class AccountsSettings(Document): frappe.db.sql(f"drop procedure if exists {InitSQLProceduresForAR.init_procedure_name}") frappe.db.sql(f"drop procedure if exists {InitSQLProceduresForAR.allocate_procedure_name}") + def toggle_accounting_dimension_sections(hide): accounting_dimension_doctypes = frappe.get_hooks("accounting_dimension_doctypes") for doctype in accounting_dimension_doctypes: create_property_setter_for_hiding_field(doctype, "accounting_dimensions_section", hide) + def toggle_sales_discount_section(hide): for doctype in SELLING_DOCTYPES + BUYING_DOCTYPES: meta = frappe.get_meta(doctype) @@ -206,12 +207,14 @@ def toggle_sales_discount_section(hide): if meta.has_field("discount_and_margin"): create_property_setter_for_hiding_field(doctype, "discount_and_margin", hide) + def toggle_loyalty_point_program_section(hide): for doctype in SELLING_DOCTYPES: meta = frappe.get_meta(doctype) if meta.has_field("loyalty_points_redemption"): create_property_setter_for_hiding_field(doctype, "loyalty_points_redemption", hide) + def create_property_setter_for_hiding_field(doctype, field_name, hide): make_property_setter( doctype, @@ -220,4 +223,4 @@ def create_property_setter_for_hiding_field(doctype, field_name, hide): hide, "Check", validate_fields_for_doctype=False, - ) \ No newline at end of file + ) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 16e0c524c28..b6261cc5707 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -62,18 +62,23 @@ class SalesInvoice(SellingController): from typing import TYPE_CHECKING if TYPE_CHECKING: + from frappe.types import DF + from erpnext.accounts.doctype.item_wise_tax_detail.item_wise_tax_detail import ItemWiseTaxDetail from erpnext.accounts.doctype.payment_schedule.payment_schedule import PaymentSchedule from erpnext.accounts.doctype.pricing_rule_detail.pricing_rule_detail import PricingRuleDetail from erpnext.accounts.doctype.sales_invoice_advance.sales_invoice_advance import SalesInvoiceAdvance from erpnext.accounts.doctype.sales_invoice_item.sales_invoice_item import SalesInvoiceItem from erpnext.accounts.doctype.sales_invoice_payment.sales_invoice_payment import SalesInvoicePayment - from erpnext.accounts.doctype.sales_invoice_timesheet.sales_invoice_timesheet import SalesInvoiceTimesheet - from erpnext.accounts.doctype.sales_taxes_and_charges.sales_taxes_and_charges import SalesTaxesandCharges + from erpnext.accounts.doctype.sales_invoice_timesheet.sales_invoice_timesheet import ( + SalesInvoiceTimesheet, + ) + from erpnext.accounts.doctype.sales_taxes_and_charges.sales_taxes_and_charges import ( + SalesTaxesandCharges, + ) from erpnext.accounts.doctype.tax_withholding_entry.tax_withholding_entry import TaxWithholdingEntry from erpnext.selling.doctype.sales_team.sales_team import SalesTeam from erpnext.stock.doctype.packed_item.packed_item import PackedItem - from frappe.types import DF account_for_change_amount: DF.Link | None additional_discount_account: DF.Link | None @@ -193,7 +198,22 @@ class SalesInvoice(SellingController): shipping_address: DF.TextEditor | None shipping_address_name: DF.Link | None shipping_rule: DF.Link | None - status: DF.Literal["", "Draft", "Return", "Credit Note Issued", "Submitted", "Paid", "Partly Paid", "Unpaid", "Unpaid and Discounted", "Partly Paid and Discounted", "Overdue and Discounted", "Overdue", "Cancelled", "Internal Transfer"] + status: DF.Literal[ + "", + "Draft", + "Return", + "Credit Note Issued", + "Submitted", + "Paid", + "Partly Paid", + "Unpaid", + "Unpaid and Discounted", + "Partly Paid and Discounted", + "Overdue and Discounted", + "Overdue", + "Cancelled", + "Internal Transfer", + ] subscription: DF.Link | None tax_category: DF.Link | None tax_id: DF.Data | None diff --git a/erpnext/buying/doctype/supplier/supplier.py b/erpnext/buying/doctype/supplier/supplier.py index 7d07213dbc6..3146246fc1c 100644 --- a/erpnext/buying/doctype/supplier/supplier.py +++ b/erpnext/buying/doctype/supplier/supplier.py @@ -27,12 +27,17 @@ class Supplier(TransactionBase): from typing import TYPE_CHECKING if TYPE_CHECKING: - from erpnext.accounts.doctype.allowed_to_transact_with.allowed_to_transact_with import AllowedToTransactWith - from erpnext.accounts.doctype.party_account.party_account import PartyAccount - from erpnext.buying.doctype.customer_number_at_supplier.customer_number_at_supplier import CustomerNumberAtSupplier - from erpnext.utilities.doctype.portal_user.portal_user import PortalUser from frappe.types import DF + from erpnext.accounts.doctype.allowed_to_transact_with.allowed_to_transact_with import ( + AllowedToTransactWith, + ) + from erpnext.accounts.doctype.party_account.party_account import PartyAccount + from erpnext.buying.doctype.customer_number_at_supplier.customer_number_at_supplier import ( + CustomerNumberAtSupplier, + ) + from erpnext.utilities.doctype.portal_user.portal_user import PortalUser + accounts: DF.Table[PartyAccount] allow_purchase_invoice_creation_without_purchase_order: DF.Check allow_purchase_invoice_creation_without_purchase_receipt: DF.Check diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index d4a4577d8a0..0fa49edcb8c 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1751,6 +1751,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe "base_total_cost", "base_scrap_material_cost", "base_rounding_adjustment", + "base_totals_section", ], company_currency ); @@ -1774,6 +1775,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe "rounding_adjustment", "raw_material_cost", "total_cost", + "totals_section", ], this.frm.doc.currency ); diff --git a/erpnext/selling/doctype/customer/customer.py b/erpnext/selling/doctype/customer/customer.py index e306814027d..d5e44e41a7f 100644 --- a/erpnext/selling/doctype/customer/customer.py +++ b/erpnext/selling/doctype/customer/customer.py @@ -34,13 +34,18 @@ class Customer(TransactionBase): from typing import TYPE_CHECKING if TYPE_CHECKING: - from erpnext.accounts.doctype.allowed_to_transact_with.allowed_to_transact_with import AllowedToTransactWith + from frappe.types import DF + + from erpnext.accounts.doctype.allowed_to_transact_with.allowed_to_transact_with import ( + AllowedToTransactWith, + ) from erpnext.accounts.doctype.party_account.party_account import PartyAccount from erpnext.selling.doctype.customer_credit_limit.customer_credit_limit import CustomerCreditLimit from erpnext.selling.doctype.sales_team.sales_team import SalesTeam - from erpnext.selling.doctype.supplier_number_at_customer.supplier_number_at_customer import SupplierNumberAtCustomer + from erpnext.selling.doctype.supplier_number_at_customer.supplier_number_at_customer import ( + SupplierNumberAtCustomer, + ) from erpnext.utilities.doctype.portal_user.portal_user import PortalUser - from frappe.types import DF account_manager: DF.Link | None accounts: DF.Table[PartyAccount] diff --git a/erpnext/selling/doctype/selling_settings/selling_settings.py b/erpnext/selling/doctype/selling_settings/selling_settings.py index d7322a48256..775b5844c3e 100644 --- a/erpnext/selling/doctype/selling_settings/selling_settings.py +++ b/erpnext/selling/doctype/selling_settings/selling_settings.py @@ -10,6 +10,7 @@ from frappe.custom.doctype.property_setter.property_setter import make_property_ from frappe.model.document import Document from frappe.utils import cint + class SellingSettings(Document): # begin: auto-generated types # This code is auto-generated. Do not modify anything in this block. @@ -181,12 +182,16 @@ class SellingSettings(Document): validate_fields_for_doctype=False, ) + def toggle_tracking_sales_commissions_section(hide): - from erpnext.accounts.doctype.accounts_settings.accounts_settings import create_property_setter_for_hiding_field, SELLING_DOCTYPES + from erpnext.accounts.doctype.accounts_settings.accounts_settings import ( + SELLING_DOCTYPES, + create_property_setter_for_hiding_field, + ) for doctype in SELLING_DOCTYPES: meta = frappe.get_meta(doctype) if meta.has_field("commission_section"): create_property_setter_for_hiding_field(doctype, "commission_section", hide) if meta.has_field("sales_team_section"): - create_property_setter_for_hiding_field(doctype, "sales_team_section", hide) \ No newline at end of file + create_property_setter_for_hiding_field(doctype, "sales_team_section", hide)