Chart of accounts added for Singapore and some other fixes

This commit is contained in:
Nabin Hait 2016-01-06 12:32:39 +05:30
parent a40c6282a1
commit ea8bc8ecb0
31 changed files with 638 additions and 272 deletions

View File

@ -23,6 +23,8 @@ class Account(Document):
frappe.db.get_value("Company", self.company, "abbr")
def validate(self):
if frappe.local.flags.allow_unverified_charts:
return
self.validate_parent()
self.validate_root_details()
self.set_root_and_report_type()

View File

@ -8,7 +8,7 @@ from unidecode import unidecode
def create_charts(chart_name, company):
chart = get_chart(chart_name)
if chart:
accounts = []
@ -40,9 +40,9 @@ def create_charts(chart_name, company):
"account_currency": frappe.db.get_value("Company", company, "default_currency")
})
if root_account:
if root_account or frappe.local.flags.allow_unverified_charts:
account.flags.ignore_mandatory = True
account.insert()
accounts.append(account_name_in_db)
@ -67,13 +67,17 @@ def get_chart(chart_name):
from erpnext.accounts.doctype.account.chart_of_accounts.verified import standard_chart_of_accounts
return standard_chart_of_accounts.get()
else:
path = os.path.join(os.path.dirname(__file__), "verified")
for fname in os.listdir(path):
if fname.endswith(".json"):
with open(os.path.join(path, fname), "r") as f:
chart = f.read()
if chart and json.loads(chart).get("name") == chart_name:
return json.loads(chart).get("tree")
folders = ("verified",)
if frappe.local.flags.allow_unverified_charts:
folders = ("verified", "unverified")
for folder in folders:
path = os.path.join(os.path.dirname(__file__), folder)
for fname in os.listdir(path):
if fname.endswith(".json"):
with open(os.path.join(path, fname), "r") as f:
chart = f.read()
if chart and json.loads(chart).get("name") == chart_name:
return json.loads(chart).get("tree")
@frappe.whitelist()
def get_charts_for_country(country):
@ -82,11 +86,7 @@ def get_charts_for_country(country):
def _get_chart_name(content):
if content:
content = json.loads(content)
if frappe.local.flags.allow_unverified_charts:
charts.append(content["name"])
elif content and content.get("is_active", "No") == "Yes" and content.get("disabled", "No") == "No":
if content and content.get("disabled", "No") == "No":
charts.append(content["name"])
country_code = frappe.db.get_value("Country", country, "code")

View File

@ -1,7 +1,6 @@
{
"country_code": "at",
"name": "Austria - Chart of Accounts",
"is_active": "Yes",
"tree": {
"Summe Abschreibungen und Aufwendungen": {
"7010 bis 7080 Abschreibungen auf das Anlageverm\u00f6gen (ausgenommen Finanzanlagen)": {},

View File

@ -1,7 +1,6 @@
{
"country_code": "be",
"name": "Belgian PCMN",
"disabled": "Yes",
"tree": {
"CLASSE 1": {
"BENEFICE (PERTE) REPORTE(E)": {

View File

@ -1,7 +1,6 @@
{
"country_code": "br",
"name": "Planilha de Contas Brasileira",
"is_active": "No",
"tree": {
"ATIVO": {
"CIRCULANTE": {

View File

@ -1,7 +1,6 @@
{
"country_code": "ca",
"name": "Chart of Accounts for english-speaking provinces",
"is_active": "Yes",
"tree": {
"ASSETS": {
"CURRENT ASSETS": {

View File

@ -1,7 +1,6 @@
{
"country_code": "ca",
"name": "Plan comptable pour les provinces francophones",
"is_active": "Yes",
"tree": {
"ACTIF": {
"ACTIFS COURANTS": {

View File

@ -1,7 +1,6 @@
{
"country_code": "ch",
"name": "Plan comptable STERCHI",
"is_active": "Yes",
"disabled": "Yes",
"tree": {
"Actif": {

View File

@ -1,7 +1,6 @@
{
"country_code": "co",
"name": "Unique Account Chart - PUC",
"is_active": "Yes",
"tree": {
"ACTIVO": {
"DEUDORES": {

View File

@ -1,7 +1,6 @@
{
"country_code": "cr",
"name": "Costa Rica - Company 0",
"is_active": "Yes",
"tree": {
"0-Activo": {
"0-Activo circulante": {

View File

@ -1,7 +1,6 @@
{
"country_code": "cr",
"name": "Costa Rica - Company 1",
"is_active": "Yes",
"tree": {
"xActivo": {
"root_type": "Asset",

View File

@ -1,7 +1,7 @@
{
"country_code": "de",
"name": "Deutscher Kontenplan SKR04",
"is_active": "Yes",
"disabled": "Yes",
"tree": {
"Bilanz - Aktiva": {
"Anlageverm\u00f6gen": {

View File

@ -1,7 +1,6 @@
{
"country_code": "de",
"name": "Deutscher Kontenplan SKR03",
"is_active": "No",
"disabled": "Yes",
"tree": {
"Aktiva": {

View File

@ -1,6 +1,7 @@
{
"country_code": "es",
"name": "PGCE com\u00fan",
"disabled": "Yes",
"tree": {
"Acreedores y deudores por operaciones comerciales": {
"Acreedores varios": {

View File

@ -1,7 +1,6 @@
{
"country_code": "et",
"name": "Ethiopia Tax and Account Chart Template",
"is_active": "Yes",
"tree": {
"ASSETS": {
"Cash and Cash Equivalents": {

View File

@ -1,7 +1,6 @@
{
"country_code": "gt",
"name": "Plantilla de cuentas de Guatemala (sencilla)",
"is_active": "Yes",
"tree": {
"Activo": {
"Activo Corriente": {

View File

@ -1,7 +1,6 @@
{
"country_code": "hn",
"name": "Plantilla de cuentas de Honduras (sencilla)",
"is_active": "Yes",
"tree": {
"Activo": {
"Activo Corriente": {

View File

@ -1,6 +1,7 @@
{
"country_code": "lu",
"name": "PCMN Luxembourg",
"disabled": "Yes",
"tree": {
"TOTAL CLASSES 1 A 5": {
"CLASSE 1 - COMPTES DE CAPITAUX, DE PROVISIONS ET DE DETTES FINANCIERES": {

View File

@ -1,7 +1,6 @@
{
"country_code": "pa",
"name": "Plan de Cuentas",
"is_active": "Yes",
"tree": {
"ACTIVOS": {
"Activo Fijo": {

View File

@ -1,6 +1,7 @@
{
"country_code": "ro",
"name": "Romania - Chart of Accounts",
"disabled": "Yes",
"tree": {
"CONTURI FINANCIARE": {
"CONTURI DE BILANT": {

View File

@ -1,223 +0,0 @@
{
"country_code": "sg",
"name": "Singapore Chart of Accounts",
"is_active": "Yes",
"tree": {
"Assets": {
"Cash and cash equivalents": {
"Cash on hand": {
"account_type": "Cash"
},
"Client trust account": {
"account_type": "Cash"
},
"Current": {
"account_type": "Bank"
},
"Money market": {
"account_type": "Cash"
},
"Rents held in trust": {
"account_type": "Cash"
},
"Savings": {
"account_type": "Cash"
},
"account_type": "Cash"
},
"Current assets": {
"Allowance for bad debts": {},
"Development costs": {},
"Employee cash advances": {},
"Inventory": {},
"Investments - other": {},
"Loans to officers": {},
"Loans to others": {},
"Loans to shareholders": {},
"Other Current Assets": {},
"Prepaid expenses": {},
"Retainage": {},
"Undeposited funds": {}
},
"Non-current assets": {
"Accumulated amortization of non-current assets": {},
"Available-for-sale financial assets": {},
"Deferred tax": {},
"Goodwill": {},
"Intangible Assets": {},
"Investments": {},
"Lease Buyout": {},
"Licences": {},
"Organisational costs": {},
"Other intangible assets": {},
"Other non-current assets": {},
"Prepayments and accrued income": {},
"Security Deposits": {}
},
"Property, plant and equipment": {
"Accumulated amortisation": {},
"Accumulated depletion": {},
"Accumulated depreciation": {},
"Buildings": {},
"Depletable assets": {},
"Furniture and fixtures": {},
"Leasehold improvements": {},
"Machinery and equipment": {},
"Other Assets": {},
"Vehicles": {}
},
"Purchase Tax Receivable": {
"Purchase Tax Account 0% EP": {},
"Purchase Tax Account 0% ME": {},
"Purchase Tax Account 0% NR": {},
"Purchase Tax Account 0% OP": {},
"Purchase Tax Account 0% ZP": {},
"Purchase Tax Account 7% BL": {},
"Purchase Tax Account 7% IM": {},
"Purchase Tax Account 7% TX-E33": {},
"Purchase Tax Account 7% TX-N33": {},
"Purchase Tax Account 7% TX-RE": {},
"Purchase Tax Account 7% TX7": {},
"Purchase Tax Account MES": {}
},
"Trade and other receivable": {
"Other Receivable Account": {
"account_type": "Receivable"
},
"Trade Receivable Account": {
"account_type": "Receivable"
},
"account_type": "Receivable"
},
"root_type": "Asset"
},
"Liabilities": {
"Current liabilities": {
"Client Trust Accounts - Liabilities": {},
"Current Tax Liability": {},
"Current portion of employee benefits obligations": {},
"Current portion of obligations under finance leases": {},
"GST Payable": {},
"Insurance Payable": {},
"Interest payables": {},
"Line of Credit": {},
"Loan Payable": {},
"Payroll Clearing": {},
"Payroll liabilities": {},
"Prepaid Expenses Payable": {},
"Provision for warranty obligations": {},
"Rents in trust - Liability": {},
"Short term borrowings": {}
},
"Equity": {
"Accumulated Adjustment": {},
"Opening Balance Equity": {},
"Ordinary shares": {},
"Owner's Equity": {},
"Paid-in capital or surplus": {},
"Partner's Equity": {},
"Preferred shares": {},
"Retained Earnings": {},
"Share capital": {},
"Treasury Shares": {}
},
"Non-current liabilities": {
"Accruals and Deferred Income": {},
"Bank loans": {},
"Long term borrowings": {},
"Long term employee benefit obligations": {},
"Notes Payable": {},
"Obligations under finance leases": {},
"Other non-current liabilities": {},
"Shareholder Notes Payable": {}
},
"Sale Tax Payables": {
" Sales Tax Account 0% ES33": {},
"Sales Tax Account 0% ESN33": {},
"Sales Tax Account 0% OS": {},
"Sales Tax Account 0% ZR": {},
"Sales Tax Account 7% DS": {},
"Sales Tax Account 7% SR": {}
},
"Trade and other payables": {
"Other Payable Account": {
"account_type": "Payable"
},
"Trade Payable Account": {
"account_type": "Payable"
},
"account_type": "Payable"
},
"root_type": "Liability"
},
"Cost of sales": {
"Cost of Good Sold": {
"Cost of Labour - COS": {},
"Equipment rental - COS": {},
"Freight and delivery - COS": {},
"Other costs of sales - COS": {},
"Supplies and materials - COS": {}
},
"root_type": "Expense"
},
"Income": {
"Other revenue": {
"Dividend revenue": {},
"Gain/loss on sale of fixed assets or investments": {},
"Interest earned": {},
"Other investment revenue": {},
"Other miscellaneous revenue": {},
"Tax-exempt interest": {}
},
"Revenue": {
"Discounts/refunds given": {},
"Non-profit revenue": {},
"Other primary revenue": {},
"Sales of product revenue": {},
"Service/fee revenue": {},
"Unapplied cash payment income": {}
},
"root_type": "Income"
},
"Indirect Expenses": {
"Expenses": {
"Administrative expenses": {},
"Advertising/promotional": {},
"Auto": {},
"Bad debts": {},
"Bank charges": {},
"Charitable contributions": {},
"Cost of labour": {},
"Distribution costs": {},
"Dues and subscriptions": {},
"Entertainment": {},
"Equipment rental": {},
"Finance costs": {},
"Insurance": {},
"Interest paid": {},
"Legal and professional fees": {},
"Meals and entertainment": {},
"Other miscellaneous service cost": {},
"Payroll expenses": {},
"Promotional meals": {},
"Rent or lease of buildings": {},
"Repair and maintenance": {},
"Shipping, freight, and delivery": {},
"Supplies": {},
"Taxes paid": {},
"Travel": {},
"Travel meals": {},
"Unapplied cash bill payment expense": {},
"Utilities": {}
},
"Other Expenses": {
"Amortisation": {},
"Depreciation": {},
"Exchange Gain or Loss": {},
"Other Expense": {},
"Penalties and settlements": {}
},
"root_type": "Expense"
}
}
}

View File

@ -1,6 +1,7 @@
{
"country_code": "si",
"name": "Kontni na\u010drt za gospodarske dru\u017ebe",
"disabled": "Yes",
"tree": {
"DOLGORO\u010cNA SREDSTVA": {
"DANA DOLGORO\u010cNA POSOJILA IN TERJATVE ZA NEVPLA\u010cANI VPOKLICANI KAPITAL": {

View File

@ -1,7 +1,6 @@
{
"country_code": "th",
"name": "Thailand Chart of Accounts",
"is_active": "Yes",
"tree": {
"Assets": {
"Account Receivable": {},

View File

@ -1,7 +1,6 @@
{
"country_code": "uy",
"name": "Plan de Cuentas",
"is_active": "Yes",
"tree": {
"ACTIVO": {
"ACTIVO CORRIENTE": {

View File

@ -1,7 +1,6 @@
{
"country_code": "ae",
"name": "U.A.E Chart of Accounts",
"is_active": "Yes",
"tree": {
"Assets": {
"Current Assets": {

View File

@ -1,7 +1,6 @@
{
"country_code": "gt",
"name": "Cuentas de Guatemala",
"is_active": "Yes",
"tree": {
"Activos": {
"Activo Corriente": {

View File

@ -1,7 +1,6 @@
{
"country_code": "in",
"name": "Chart of Accounts - India",
"is_active": "Yes",
"tree": {
"Application of Funds (Assets)": {
"Current Assets": {

View File

@ -1,7 +1,6 @@
{
"country_code": "ni",
"name": "Catalogo de Cuentas Nicaragua",
"is_active": "Yes",
"tree": {
"Activo": {
"Activo Corriente": {

View File

@ -0,0 +1,273 @@
{
"country_code": "sg",
"name": "Singapore Default Chart of Accounts",
"tree": {
"Assets": {
"Current assets": {
"Accounts Receivable": {
"Credit Cards": {
"AMEX Receivable": {},
"CUP Receivale": {},
"MC Receivable": {},
"NETS Receivable": {},
"VISA Receivable": {}
},
"Debtors": {
"account_type": "Receivable"
}
},
"Bank Accounts": {
"Paypal Account": {
"account_type": "Bank"
},
"account_type": "Bank"
},
"Cash in Hand": {
"Cash in Transit": {
"account_type": "Cash"
},
"Petty Cash": {
"account_type": "Cash"
}
},
"Loans and Advances-Assets": {
"Prepayments": {}
},
"Securities and Deposits": {
"Bank Guarantees": {},
"Bank Deposits": {},
"Rental Deposits": {}
},
"Stock Assets": {
"account_type": "Stock",
"is_group": 1
},
"Tax Assets": {
"GST-Input": {}
}
},
"Non-current assets": {
"Fixed Assets": {
"Accumulated Depreciation": {
"AccDep-Equipment-ICT": {},
"AccDep-Furniture and Fixtures": {},
"AccDep-Equipment-Office": {},
"AccDep-Motor Vehicle": {},
"AccDep-Plant and Machinery": {}
},
"Equipment-ICT": {},
"Furniture and Fixtures": {},
"Equipment-Office": {},
"Motor Vehicle": {},
"Plant and Machinery": {}
},
"Non-Fixed Assets": {
"Goodwill": {},
"Investments": {
"Investments-Associated Company": {},
"Investments-Subsidiary": {}
}
},
"Shares": {
"Shares-Quoted": {},
"Shares-Unquoted": {}
}
},
"Temporary Accunts": {
"Temporary Opening": {
"account_type": "Temporary"
}
},
"root_type": "Asset"
},
"Liabilities": {
"Current liabilities": {
"Accounts Payable": {
"Creditors":{
"account_type": "Payable"
}
},
"Duties and Taxes": {
"account_type": "Tax",
"Deferred Tax Liabilities-Current": {},
"GST-Output": {},
"Income Tax Payable": {}
},
"Loans-Current": {
"Amount Owing to Directors": {},
"Bank Overdaft Account": {},
"Secured Loans": {},
"Unsecured Loans": {}
},
"Provision and Accruals": {
"Accruals": {
"Accr-CPF": {},
"Accr-Sundry": {},
"Accr-Withholding Tax": {}
},
"Provisions": {
"Prov-Audit Fee": {},
"Prov-Others": {},
"Prov-Tax Fee": {},
"Prov-Bonus": {
"Prov-Bonus-Executive": {},
"Prov-Bonus-Non Executive": {}
}
}
},
"Sponsorship Funds": {},
"Stock Liabilities": {
"Stock Received But Not Billed": {
"account_type": "Stock Received But Not Billed"
}
}
},
"Non-current liabilities": {
"Deferred Tax Liabilities": {},
"Loans-Non Current": {}
},
"Capital Account": {
"Reserves and Surplus": {},
"Shareholder Funds": {}
},
"root_type": "Liability"
},
"Equity": {
"Share Capital": {},
"Current Year Earnings": {},
"Proposed Dividends": {},
"Retained Earnings": {},
"root_type": "Equity"
},
"Income": {
"Direct Income": {
"Management Income": {},
"Sales Income": {}
},
"Indirect Income": {
"Government Grants": {},
"Interest Income": {
"Current Account Interest Earned": {},
"Fixed Deposit Interest Earned": {}
},
"Other Income": {},
"Service Charges": {}
},
"root_type": "Income"
},
"Expenses": {
"Expenses-Administrative": {
"Audit Fees": {},
"Bank charges and interest": {},
"Currency Exchange Differences": {},
"Insurance": {},
"Interest on Loan": {},
"Legal and Professional Fees": {},
"Loss on Disposal of FA": {},
"Postal and Courier Charges": {},
"Printing and Stationery": {},
"Secretarial Fees": {},
"Tax Agent Fees": {}
},
"Expenses-Direct": {
"Cost of Goods Sold": {
"account_type": "Cost of Goods Sold"
},
"Cost of Sales": {},
"Expenses Included in Valuation": {
"account_type": "Expenses Included In Valuation"
},
"Stock Adjustment": {
"account_type": "Stock Adjustment"
}
},
"Expenses-Marketing": {
"Advertising and Promotion": {},
"Graphic Design Fees": {},
"Internet Marketing": {}
},
"Expenses-Operating": {
"Cleaning Costs": {},
"Commission Charges": {
"Comm-Credit Card": {},
"Comm-NETS": {},
"Comm-Paypal": {}
},
"Communication Costs": {
"Internet Connection": {},
"Telephone Costs": {}
},
"Entertainment Expenses": {},
"General Expenses": {},
"Licence Fees": {},
"Rental Costs": {
"Rental-Premises": {},
"Rental-Equipment": {},
"Rental-Storage": {}
},
"Repairs and Maintenance": {
"R&M-ICT": {},
"R&M-Building": {},
"R&M-Fixtures & Furniture": {},
"R&M-Office": {},
"R&M-Plant & Machinery": {}
},
"Service Fees": {},
"Subscription Fees": {
"Publication Subscriptions": {},
"TV Subscriptions": {}
},
"Travel Expenses": {},
"Utilities": {
"Utility-Electricity": {},
"Utility-Gas": {},
"Utility-Refuse Removal": {},
"Utility-Water": {}
}
},
"Expenses-Other": {
"Bad Debts Written Off": {},
"Depreciation": {
"Dep-ICT Equipment": {},
"Dep-Fixtures & Furniture": {},
"Dep-Motor Vehicle": {},
"Dep-Office Equipment": {},
"Dep-Plant & Machinery": {},
"Dep-Renovation": {}
},
"Donations": {},
"Round Off": {},
"Tax Expenses": {
"Tax Expenses": {}
}
},
"Expenses-Staff": {
"Bonuses": {
"Bonus-Executive": {},
"Bonus-Non Executive": {},
"Bonus-Performance": {}
},
"CPF": {},
"Directors Fees": {},
"FWL": {},
"Incentives": {},
"Medical Expenses": {},
"Salaries": {
"Casual Labour": {},
"Salary-Executive": {},
"Salary-Non Executive-Full Time": {},
"Salary-Non Executive-Part Time": {}
},
"SDF": {},
"Security Expenses": {},
"Staff Advertising": {},
"Staff Commission Paid": {},
"Staff Meals": {},
"Staff Training": {},
"Staff Transport": {},
"Staff Welfare": {}
},
"root_type": "Expense"
}
}
}

View File

@ -0,0 +1,343 @@
{
"country_code": "sg",
"name": "Singapore F&B Chart of Accounts",
"tree": {
"Assets": {
"Current assets": {
"Accounts Receivable": {
"Credit Cards": {
"AMEX Receivable": {},
"CUP Receivale": {},
"MC Receivable": {},
"NETS Receivable": {},
"VISA Receivable": {}
},
"Debtors": {
"account_type": "Receivable"
}
},
"Bank Accounts": {
"Paypal Account": {
"account_type": "Bank"
},
"account_type": "Bank"
},
"Cash in Hand": {
"Cash in Transit": {
"account_type": "Cash"
},
"Petty Cash": {
"account_type": "Cash"
}
},
"Loans and Advances-Assets": {
"Prepayments": {}
},
"Securities and Deposits": {
"Bank Guarantees": {},
"Bank Deposits": {},
"Rental Deposits": {}
},
"Stock Assets": {
"account_type": "Stock",
"is_group": 1
},
"Tax Assets": {
"GST-Input": {}
}
},
"Non-current assets": {
"Fixed Assets": {
"Accumulated Depreciation": {
"AccDep-Equipment-AV": {},
"AccDep-Equipment-Bar": {},
"AccDep-Equipment-ICT": {},
"AccDep-Equipment-Electrical": {},
"AccDep-Furniture and Fixtures": {},
"AccDep-Equipment-Kitchen": {},
"AccDep-Equipment-Lighting": {},
"AccDep-Equipment-Office": {},
"AccDep-Motor Vehicle": {},
"AccDep-Plant and Machinery": {},
"AccDep-Renovation": {}
},
"Equipment-AV": {},
"Equipment-Bar": {},
"Equipment-ICT": {},
"Equipment-Electrical": {},
"Furniture and Fixtures": {},
"Equipment-Kitchen": {},
"Equipment-Lighting": {},
"Equipment-Office": {},
"Motor Vehicle": {},
"Plant and Machinery": {},
"Renovation": {}
},
"Non-Fixed Assets": {
"Goodwill": {},
"Investments": {
"Investments-Associated Company": {},
"Investments-Subsidiary": {}
}
},
"Shares": {
"Shares-Quoted": {},
"Shares-Unquoted": {}
}
},
"Temporary Accunts": {
"Temporary Opening": {
"account_type": "Temporary"
}
},
"root_type": "Asset"
},
"Liabilities": {
"Current liabilities": {
"Accounts Payable": {
"Creditors":{
"account_type": "Payable"
}
},
"Duties and Taxes": {
"account_type": "Tax",
"Deferred Tax Liabilities-Current": {},
"GST-Output": {},
"Income Tax Payable": {}
},
"Loans-Current": {
"Amount Owing to Directors": {},
"Bank Overdaft Account": {},
"Secured Loans": {},
"Unsecured Loans": {}
},
"Provision and Accruals": {
"Accruals": {
"Accr-CPF": {},
"Accr-Incentives": {},
"Accr-OCR Employee Card": {},
"Accr-Paypal Credit": {},
"Accr-Sundry": {},
"Accr-Tips": {},
"Accr-Withholding Tax": {}
},
"Provisions": {
"Prov-Audit Fee": {},
"Prov-Others": {},
"Prov-Tax Fee": {},
"Prov-Bonus": {
"Prov-Bonus-Executive": {},
"Prov-Bonus-Non Executive": {}
}
}
},
"Sponsorship Funds": {},
"Stock Liabilities": {
"Stock Received But Not Billed": {
"account_type": "Stock Received But Not Billed"
}
}
},
"Non-current liabilities": {
"Deferred Tax Liabilities": {},
"Loans-Non Current": {}
},
"Capital Account": {
"Reserves and Surplus": {},
"Shareholder Funds": {}
},
"root_type": "Liability"
},
"Equity": {
"Share Capital": {},
"Current Year Earnings": {},
"Proposed Dividends": {},
"Retained Earnings": {},
"root_type": "Equity"
},
"Income": {
"Direct Income": {
"Management Income": {},
"Sales Income": {
"Sales-Food": {},
"Sales-Beverage": {},
"Sales-Events and Functions": {},
"Sales-Merchandise": {},
"Sales-Pool Tables": {},
"Sales-Tobacco": {},
"Sales-Rental": {}
}
},
"Indirect Income": {
"Government Grants": {},
"Interest Income": {
"Current Account Interest Earned": {},
"Fixed Deposit Interest Earned": {}
},
"Other Income": {},
"Service Charges": {}
},
"root_type": "Income"
},
"Expenses": {
"Expenses-Administrative": {
"Admin Management Fees": {},
"Audit Fees": {},
"Auto": {},
"Bank charges and interest": {},
"Currency Exchange Differences": {},
"Insurance": {},
"Interest on Loan": {},
"Legal and Professional Fees": {},
"Loss on Disposal of FA": {},
"Postal and Courier Charges": {},
"Printing and Stationery": {},
"Secretarial Fees": {},
"Tax Agent Fees": {}
},
"Expenses-Direct": {
"Cost of Goods Sold": {
"account_type": "Cost of Goods Sold"
},
"Cost of Sales": {
"COS-Food": {},
"COS-Beverage": {},
"COS-Tobacco": {},
"COS-Events and Functions": {},
"COS-Merchandise": {}
},
"Expenses Included in Valuation": {
"account_type": "Expenses Included In Valuation"
},
"Stock Adjustment": {
"account_type": "Stock Adjustment"
}
},
"Expenses-Marketing": {
"Advertising and Promotion": {},
"Graphic Design Fees": {},
"Internet Marketing": {
"Marketing-Social Media": {},
"Marketing-Website": {}
}
},
"Expenses-Operating": {
"Cleaning Costs": {
"Cleaning-Kitchen": {},
"Cleaning-Laundry": {},
"Cleaning-Outlet": {}
},
"Commission Charges": {
"Comm-Credit Card": {},
"Comm-NETS": {},
"Comm-Paypal": {}
},
"Communication Costs": {
"Internet Connection": {},
"Telephone Costs": {}
},
"Disposals": {
"Disposals-Food": {},
"Disposals-Beverage": {},
"Disposals-Merchandise": {},
"Disposals-Others": {}
},
"Entertainment Expenses": {
"DJ Costs": {},
"Live Band Costs": {},
"Recorded Music Costs": {}
},
"FoC Accounts": {
"FoC-ENT": {},
"FoC-OC": {}
},
"General Expenses": {},
"Landscaping Costs": {},
"Licence Fees": {},
"Operational Supplies": {
"Supplies-Bar": {},
"Supplies-Guest": {},
"Supplies-Kitchen": {},
"Supplies-Restaurant": {},
"Supplies-Stewarding": {}
},
"Rental Costs": {
"Rental-Premises": {},
"Rental-Equipment": {},
"Rental-Storage": {}
},
"Repairs and Maintenance": {
"R&M-ICT": {},
"R&M-AV": {},
"R&M-Building": {},
"R&M-Electrical & Lighting": {},
"R&M-Fixtures & Furniture": {},
"R&M-Kitchen & Bar": {},
"R&M-Office": {},
"R&M-Plant & Machinery": {}
},
"Service Fees": {},
"Subscription Fees": {
"Publication Subscriptions": {},
"TV Subscriptions": {}
},
"Travel Expenses": {},
"Utilities": {
"Utility-Electricity": {},
"Utility-Gas": {},
"Utility-Refuse Removal": {},
"Utility-Water": {}
}
},
"Expenses-Other": {
"Bad Debts Written Off": {},
"Depreciation": {
"Dep-AV Equipment": {},
"Dep-Bar Equipment": {},
"Dep-ICT Equipment": {},
"Dep-Electrical Equipment": {},
"Dep-Fixtures & Furniture": {},
"Dep-Kitchen Equipment": {},
"Dep-Lighting Equipment": {},
"Dep-Motor Vehicle": {},
"Dep-Office Equipment": {},
"Dep-Plant & Machinery": {},
"Dep-Renovation": {}
},
"Donations": {},
"Round Off": {},
"Tax Expenses": {
"Tax Expenses": {}
}
},
"Expenses-Staff": {
"Bonuses": {
"Bonus-Executive": {},
"Bonus-Non Executive": {},
"Bonus-Performance": {}
},
"CPF": {},
"Directors Fees": {},
"FWL": {},
"Incentives": {},
"Medical Expenses": {},
"Salaries": {
"Casual Labour": {},
"Salary-Executive": {},
"Salary-Non Executive-Full Time": {},
"Salary-Non Executive-Part Time": {}
},
"SDF": {},
"Security Expenses": {},
"Staff Advertising": {},
"Staff Commission Paid": {},
"Staff Meals": {},
"Staff Training": {},
"Staff Transport": {},
"Staff Uniforms": {},
"Staff Welfare": {}
},
"root_type": "Expense"
}
}
}

View File

@ -101,19 +101,6 @@ class Company(Document):
frappe.db.set(self, "default_payable_account", frappe.db.get_value("Account",
{"company": self.name, "account_type": "Payable"}))
def add_acc(self, lst):
account = frappe.get_doc({
"doctype": "Account",
"freeze_account": "No",
"company": self.name
})
for d in self.fld_dict.keys():
account.set(d, (d == 'parent_account' and lst[self.fld_dict[d]]) and lst[self.fld_dict[d]] +' - '+ self.abbr or lst[self.fld_dict[d]])
if not account.parent_account:
account.flags.ignore_mandatory = True
account.insert()
def set_default_accounts(self):
self._set_default_account("default_cash_account", "Cash")
self._set_default_account("default_bank_account", "Bank")