mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-29 06:38:24 +00:00
Merge branch 'version-13-hotfix' into merged-v13-hotfix-into-pre-release
This commit is contained in:
@@ -108,6 +108,9 @@ class Company(NestedSet):
|
||||
frappe.flags.country_change = True
|
||||
self.create_default_accounts()
|
||||
self.create_default_warehouses()
|
||||
|
||||
if not frappe.db.get_value("Cost Center", {"is_group": 0, "company": self.name}):
|
||||
self.create_default_cost_center()
|
||||
|
||||
if frappe.flags.country_change:
|
||||
install_country_fixtures(self.name, self.country)
|
||||
@@ -117,9 +120,6 @@ class Company(NestedSet):
|
||||
from erpnext.setup.setup_wizard.operations.install_fixtures import install_post_company_fixtures
|
||||
install_post_company_fixtures(frappe._dict({'company_name': self.name}))
|
||||
|
||||
if not frappe.db.get_value("Cost Center", {"is_group": 0, "company": self.name}):
|
||||
self.create_default_cost_center()
|
||||
|
||||
if not frappe.local.flags.ignore_chart_of_accounts:
|
||||
self.set_default_accounts()
|
||||
if self.default_cash_account:
|
||||
|
||||
@@ -124,7 +124,8 @@ def make_taxes_and_charges_template(company_name, doctype, template):
|
||||
account_data = tax_row.get('account_head')
|
||||
tax_row_defaults = {
|
||||
'category': 'Total',
|
||||
'charge_type': 'On Net Total'
|
||||
'charge_type': 'On Net Total',
|
||||
'cost_center': frappe.db.get_value('Company', company_name, 'cost_center')
|
||||
}
|
||||
|
||||
if doctype == 'Purchase Taxes and Charges Template':
|
||||
|
||||
Reference in New Issue
Block a user