|
|
|
|
@@ -81,11 +81,12 @@ class Company(Document):
|
|
|
|
|
chart = frappe.get_doc("Chart of Accounts", self.chart_of_accounts)
|
|
|
|
|
chart.create_accounts(self.name)
|
|
|
|
|
|
|
|
|
|
def add_acc(self,lst):
|
|
|
|
|
def add_acc(self, lst):
|
|
|
|
|
account = frappe.get_doc({
|
|
|
|
|
"doctype": "Account",
|
|
|
|
|
"freeze_account": "No",
|
|
|
|
|
"master_type": "",
|
|
|
|
|
"company": self.name
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
for d in self.fld_dict.keys():
|
|
|
|
|
@@ -182,77 +183,77 @@ class Company(Document):
|
|
|
|
|
'group_or_ledger': 2,
|
|
|
|
|
'account_type': 3,
|
|
|
|
|
'report_type': 4,
|
|
|
|
|
'company': 5,
|
|
|
|
|
'tax_rate': 6
|
|
|
|
|
'tax_rate': 5,
|
|
|
|
|
'root_type': 6
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
acc_list_common = [
|
|
|
|
|
[_('Application of Funds (Assets)'),'','Group','','Balance Sheet',self.name,''],
|
|
|
|
|
[_('Current Assets'),_('Application of Funds (Assets)'),'Group','','Balance Sheet',self.name,''],
|
|
|
|
|
[_('Accounts Receivable'),_('Current Assets'),'Group','','Balance Sheet',self.name,''],
|
|
|
|
|
[_('Bank Accounts'),_('Current Assets'),'Group','Bank','Balance Sheet',self.name,''],
|
|
|
|
|
[_('Cash In Hand'),_('Current Assets'),'Group','Cash','Balance Sheet',self.name,''],
|
|
|
|
|
[_('Cash'),_('Cash In Hand'),'Ledger','Cash','Balance Sheet',self.name,''],
|
|
|
|
|
[_('Loans and Advances (Assets)'),_('Current Assets'),'Group','','Balance Sheet',self.name,''],
|
|
|
|
|
[_('Securities and Deposits'),_('Current Assets'),'Group','','Balance Sheet',self.name,''],
|
|
|
|
|
[_('Earnest Money'),_('Securities and Deposits'),'Ledger','','Balance Sheet',self.name,''],
|
|
|
|
|
[_('Stock Assets'),_('Current Assets'),'Group','Stock','Balance Sheet',self.name,''],
|
|
|
|
|
[_('Tax Assets'),_('Current Assets'),'Group','','Balance Sheet',self.name,''],
|
|
|
|
|
[_('Fixed Assets'),_('Application of Funds (Assets)'),'Group','','Balance Sheet',self.name,''],
|
|
|
|
|
[_('Capital Equipments'),_('Fixed Assets'),'Ledger','Fixed Asset','Balance Sheet',self.name,''],
|
|
|
|
|
[_('Computers'),_('Fixed Assets'),'Ledger','Fixed Asset','Balance Sheet',self.name,''],
|
|
|
|
|
[_('Furniture and Fixture'),_('Fixed Assets'),'Ledger','Fixed Asset','Balance Sheet',self.name,''],
|
|
|
|
|
[_('Office Equipments'),_('Fixed Assets'),'Ledger','Fixed Asset','Balance Sheet',self.name,''],
|
|
|
|
|
[_('Plant and Machinery'),_('Fixed Assets'),'Ledger','Fixed Asset','Balance Sheet',self.name,''],
|
|
|
|
|
[_('Investments'),_('Application of Funds (Assets)'),'Group','','Balance Sheet',self.name,''],
|
|
|
|
|
[_('Temporary Accounts (Assets)'),_('Application of Funds (Assets)'),'Group','','Balance Sheet',self.name,''],
|
|
|
|
|
[_('Temporary Account (Assets)'),_('Temporary Accounts (Assets)'),'Ledger','','Balance Sheet',self.name,''],
|
|
|
|
|
[_('Expenses'),'','Group','Expense Account','Profit and Loss',self.name,''],
|
|
|
|
|
[_('Direct Expenses'),_('Expenses'),'Group','Expense Account','Profit and Loss',self.name,''],
|
|
|
|
|
[_('Stock Expenses'),_('Direct Expenses'),'Group','Expense Account','Profit and Loss',self.name,''],
|
|
|
|
|
[_('Cost of Goods Sold'),_('Stock Expenses'),'Ledger','Expense Account','Profit and Loss',self.name,''],
|
|
|
|
|
[_('Stock Adjustment'),_('Stock Expenses'),'Ledger','Stock Adjustment','Profit and Loss',self.name,''],
|
|
|
|
|
[_('Expenses Included In Valuation'), _("Stock Expenses"), 'Ledger', 'Expenses Included In Valuation', 'Profit and Loss', self.name, ''],
|
|
|
|
|
[_('Indirect Expenses'), _('Expenses'),'Group','Expense Account','Profit and Loss',self.name,''],
|
|
|
|
|
[_('Marketing Expenses'), _('Indirect Expenses'),'Ledger','Chargeable','Profit and Loss',self.name,''],
|
|
|
|
|
[_('Sales Expenses'), _('Indirect Expenses'),'Ledger','Expense Account','Profit and Loss',self.name,''],
|
|
|
|
|
[_('Administrative Expenses'), _('Indirect Expenses'),'Ledger','Expense Account','Profit and Loss',self.name,''],
|
|
|
|
|
[_('Charity and Donations'), _('Indirect Expenses'),'Ledger','Expense Account','Profit and Loss',self.name,''],
|
|
|
|
|
[_('Commission on Sales'), _('Indirect Expenses'),'Ledger','Expense Account','Profit and Loss',self.name,''],
|
|
|
|
|
[_('Travel Expenses'), _('Indirect Expenses'),'Ledger','Expense Account','Profit and Loss',self.name,''],
|
|
|
|
|
[_('Entertainment Expenses'), _('Indirect Expenses'),'Ledger','Expense Account','Profit and Loss',self.name,''],
|
|
|
|
|
[_('Depreciation'), _('Indirect Expenses'),'Ledger','Expense Account','Profit and Loss',self.name,''],
|
|
|
|
|
[_('Freight and Forwarding Charges'), _('Indirect Expenses'),'Ledger','Chargeable','Profit and Loss',self.name,''],
|
|
|
|
|
[_('Legal Expenses'), _('Indirect Expenses'),'Ledger','Expense Account','Profit and Loss',self.name,''],
|
|
|
|
|
[_('Miscellaneous Expenses'), _('Indirect Expenses'),'Ledger','Chargeable','Profit and Loss',self.name,''],
|
|
|
|
|
[_('Office Maintenance Expenses'), _('Indirect Expenses'),'Ledger','Expense Account','Profit and Loss',self.name,''],
|
|
|
|
|
[_('Office Rent'), _('Indirect Expenses'),'Ledger','Expense Account','Profit and Loss',self.name,''],
|
|
|
|
|
[_('Postal Expenses'), _('Indirect Expenses'),'Ledger','Expense Account','Profit and Loss',self.name,''],
|
|
|
|
|
[_('Print and Stationary'), _('Indirect Expenses'),'Ledger','Expense Account','Profit and Loss',self.name,''],
|
|
|
|
|
[_('Rounded Off'), _('Indirect Expenses'),'Ledger','Expense Account','Profit and Loss',self.name,''],
|
|
|
|
|
[_('Salary') ,_('Indirect Expenses'),'Ledger','Expense Account','Profit and Loss',self.name,''],
|
|
|
|
|
[_('Telephone Expenses') ,_('Indirect Expenses'),'Ledger','Expense Account','Profit and Loss',self.name,''],
|
|
|
|
|
[_('Utility Expenses') ,_('Indirect Expenses'),'Ledger','Expense Account','Profit and Loss',self.name,''],
|
|
|
|
|
[_('Income'),'','Group','','Profit and Loss',self.name,''],
|
|
|
|
|
[_('Direct Income'),_('Income'),'Group','Income Account','Profit and Loss',self.name,''],
|
|
|
|
|
[_('Sales'),_('Direct Income'),'Ledger','Income Account','Profit and Loss',self.name,''],
|
|
|
|
|
[_('Service'),_('Direct Income'),'Ledger','Income Account','Profit and Loss',self.name,''],
|
|
|
|
|
[_('Indirect Income'),_('Income'),'Group','Income Account','Profit and Loss',self.name,''],
|
|
|
|
|
[_('Source of Funds (Liabilities)'),'','Group','','Balance Sheet',self.name,''],
|
|
|
|
|
[_('Capital Account'),_('Source of Funds (Liabilities)'),'Group','','Balance Sheet',self.name,''],
|
|
|
|
|
[_('Reserves and Surplus'),_('Capital Account'),'Ledger','','Balance Sheet',self.name,''],
|
|
|
|
|
[_('Shareholders Funds'),_('Capital Account'),'Ledger','','Balance Sheet',self.name,''],
|
|
|
|
|
[_('Current Liabilities'),_('Source of Funds (Liabilities)'),'Group','','Balance Sheet',self.name,''],
|
|
|
|
|
[_('Accounts Payable'),_('Current Liabilities'),'Group','','Balance Sheet',self.name,''],
|
|
|
|
|
[_('Stock Liabilities'),_('Current Liabilities'),'Group','','Balance Sheet',self.name,''],
|
|
|
|
|
[_('Stock Received But Not Billed'), _('Stock Liabilities'), 'Ledger', 'Stock Received But Not Billed', 'Balance Sheet', self.name, ''],
|
|
|
|
|
[_('Duties and Taxes'),_('Current Liabilities'),'Group','','Balance Sheet',self.name,''],
|
|
|
|
|
[_('Loans (Liabilities)'),_('Current Liabilities'),'Group','','Balance Sheet',self.name,''],
|
|
|
|
|
[_('Secured Loans'),_('Loans (Liabilities)'),'Group','','Balance Sheet',self.name,''],
|
|
|
|
|
[_('Unsecured Loans'),_('Loans (Liabilities)'),'Group','','Balance Sheet',self.name,''],
|
|
|
|
|
[_('Bank Overdraft Account'),_('Loans (Liabilities)'),'Group','','Balance Sheet',self.name,''],
|
|
|
|
|
[_('Temporary Accounts (Liabilities)'),_('Source of Funds (Liabilities)'),'Group','','Balance Sheet',self.name,''],
|
|
|
|
|
[_('Temporary Account (Liabilities)'),_('Temporary Accounts (Liabilities)'),'Ledger','','Balance Sheet',self.name,'']
|
|
|
|
|
[_('Application of Funds (Assets)'),'','Group','','Balance Sheet','', 'Asset'],
|
|
|
|
|
[_('Current Assets'),_('Application of Funds (Assets)'),'Group','','Balance Sheet','', 'Asset'],
|
|
|
|
|
[_('Accounts Receivable'),_('Current Assets'),'Group','','Balance Sheet','', 'Asset'],
|
|
|
|
|
[_('Bank Accounts'),_('Current Assets'),'Group','Bank','Balance Sheet','', 'Asset'],
|
|
|
|
|
[_('Cash In Hand'),_('Current Assets'),'Group','Cash','Balance Sheet','', 'Asset'],
|
|
|
|
|
[_('Cash'),_('Cash In Hand'),'Ledger','Cash','Balance Sheet','', 'Asset'],
|
|
|
|
|
[_('Loans and Advances (Assets)'),_('Current Assets'),'Group','','Balance Sheet','', 'Asset'],
|
|
|
|
|
[_('Securities and Deposits'),_('Current Assets'),'Group','','Balance Sheet','', 'Asset'],
|
|
|
|
|
[_('Earnest Money'),_('Securities and Deposits'),'Ledger','','Balance Sheet','', 'Asset'],
|
|
|
|
|
[_('Stock Assets'),_('Current Assets'),'Group','Stock','Balance Sheet','', 'Asset'],
|
|
|
|
|
[_('Tax Assets'),_('Current Assets'),'Group','','Balance Sheet','', 'Asset'],
|
|
|
|
|
[_('Fixed Assets'),_('Application of Funds (Assets)'),'Group','','Balance Sheet','', 'Asset'],
|
|
|
|
|
[_('Capital Equipments'),_('Fixed Assets'),'Ledger','Fixed Asset','Balance Sheet','', 'Asset'],
|
|
|
|
|
[_('Computers'),_('Fixed Assets'),'Ledger','Fixed Asset','Balance Sheet','', 'Asset'],
|
|
|
|
|
[_('Furniture and Fixture'),_('Fixed Assets'),'Ledger','Fixed Asset','Balance Sheet','', 'Asset'],
|
|
|
|
|
[_('Office Equipments'),_('Fixed Assets'),'Ledger','Fixed Asset','Balance Sheet','', 'Asset'],
|
|
|
|
|
[_('Plant and Machinery'),_('Fixed Assets'),'Ledger','Fixed Asset','Balance Sheet','', 'Asset'],
|
|
|
|
|
[_('Investments'),_('Application of Funds (Assets)'),'Group','','Balance Sheet','', 'Asset'],
|
|
|
|
|
[_('Temporary Accounts (Assets)'),_('Application of Funds (Assets)'),'Group','','Balance Sheet','', 'Asset'],
|
|
|
|
|
[_('Temporary Account (Assets)'),_('Temporary Accounts (Assets)'),'Ledger','','Balance Sheet','', 'Asset'],
|
|
|
|
|
[_('Expenses'),'','Group','Expense Account','Profit and Loss','', 'Expense'],
|
|
|
|
|
[_('Direct Expenses'),_('Expenses'),'Group','Expense Account','Profit and Loss','', 'Expense'],
|
|
|
|
|
[_('Stock Expenses'),_('Direct Expenses'),'Group','Expense Account','Profit and Loss','', 'Expense'],
|
|
|
|
|
[_('Cost of Goods Sold'),_('Stock Expenses'),'Ledger','Expense Account','Profit and Loss','', 'Expense'],
|
|
|
|
|
[_('Stock Adjustment'),_('Stock Expenses'),'Ledger','Stock Adjustment','Profit and Loss','', 'Expense'],
|
|
|
|
|
[_('Expenses Included In Valuation'), _("Stock Expenses"), 'Ledger', 'Expenses Included In Valuation', 'Profit and Loss', '', 'Expense'],
|
|
|
|
|
[_('Indirect Expenses'), _('Expenses'),'Group','Expense Account','Profit and Loss','', 'Expense'],
|
|
|
|
|
[_('Marketing Expenses'), _('Indirect Expenses'),'Ledger','Chargeable','Profit and Loss','', 'Expense'],
|
|
|
|
|
[_('Sales Expenses'), _('Indirect Expenses'),'Ledger','Expense Account','Profit and Loss','', 'Expense'],
|
|
|
|
|
[_('Administrative Expenses'), _('Indirect Expenses'),'Ledger','Expense Account','Profit and Loss','', 'Expense'],
|
|
|
|
|
[_('Charity and Donations'), _('Indirect Expenses'),'Ledger','Expense Account','Profit and Loss','', 'Expense'],
|
|
|
|
|
[_('Commission on Sales'), _('Indirect Expenses'),'Ledger','Expense Account','Profit and Loss','', 'Expense'],
|
|
|
|
|
[_('Travel Expenses'), _('Indirect Expenses'),'Ledger','Expense Account','Profit and Loss','', 'Expense'],
|
|
|
|
|
[_('Entertainment Expenses'), _('Indirect Expenses'),'Ledger','Expense Account','Profit and Loss','', 'Expense'],
|
|
|
|
|
[_('Depreciation'), _('Indirect Expenses'),'Ledger','Expense Account','Profit and Loss','', 'Expense'],
|
|
|
|
|
[_('Freight and Forwarding Charges'), _('Indirect Expenses'),'Ledger','Chargeable','Profit and Loss','', 'Expense'],
|
|
|
|
|
[_('Legal Expenses'), _('Indirect Expenses'),'Ledger','Expense Account','Profit and Loss','', 'Expense'],
|
|
|
|
|
[_('Miscellaneous Expenses'), _('Indirect Expenses'),'Ledger','Chargeable','Profit and Loss','', 'Expense'],
|
|
|
|
|
[_('Office Maintenance Expenses'), _('Indirect Expenses'),'Ledger','Expense Account','Profit and Loss','', 'Expense'],
|
|
|
|
|
[_('Office Rent'), _('Indirect Expenses'),'Ledger','Expense Account','Profit and Loss','', 'Expense'],
|
|
|
|
|
[_('Postal Expenses'), _('Indirect Expenses'),'Ledger','Expense Account','Profit and Loss','', 'Expense'],
|
|
|
|
|
[_('Print and Stationary'), _('Indirect Expenses'),'Ledger','Expense Account','Profit and Loss','', 'Expense'],
|
|
|
|
|
[_('Rounded Off'), _('Indirect Expenses'),'Ledger','Expense Account','Profit and Loss','', 'Expense'],
|
|
|
|
|
[_('Salary') ,_('Indirect Expenses'),'Ledger','Expense Account','Profit and Loss','', 'Expense'],
|
|
|
|
|
[_('Telephone Expenses') ,_('Indirect Expenses'),'Ledger','Expense Account','Profit and Loss','', 'Expense'],
|
|
|
|
|
[_('Utility Expenses') ,_('Indirect Expenses'),'Ledger','Expense Account','Profit and Loss','', 'Expense'],
|
|
|
|
|
[_('Income'),'','Group','','Profit and Loss','', 'Income'],
|
|
|
|
|
[_('Direct Income'),_('Income'),'Group','Income Account','Profit and Loss','', 'Income'],
|
|
|
|
|
[_('Sales'),_('Direct Income'),'Ledger','Income Account','Profit and Loss','', 'Income'],
|
|
|
|
|
[_('Service'),_('Direct Income'),'Ledger','Income Account','Profit and Loss','', 'Income'],
|
|
|
|
|
[_('Indirect Income'),_('Income'),'Group','Income Account','Profit and Loss','', 'Income'],
|
|
|
|
|
[_('Source of Funds (Liabilities)'),'','Group','','Balance Sheet','', 'Income'],
|
|
|
|
|
[_('Capital Account'),_('Source of Funds (Liabilities)'),'Group','','Balance Sheet','', 'Liability'],
|
|
|
|
|
[_('Reserves and Surplus'),_('Capital Account'),'Ledger','','Balance Sheet','', 'Liability'],
|
|
|
|
|
[_('Shareholders Funds'),_('Capital Account'),'Ledger','','Balance Sheet','', 'Liability'],
|
|
|
|
|
[_('Current Liabilities'),_('Source of Funds (Liabilities)'),'Group','','Balance Sheet','', 'Liability'],
|
|
|
|
|
[_('Accounts Payable'),_('Current Liabilities'),'Group','','Balance Sheet','', 'Liability'],
|
|
|
|
|
[_('Stock Liabilities'),_('Current Liabilities'),'Group','','Balance Sheet','', 'Liability'],
|
|
|
|
|
[_('Stock Received But Not Billed'), _('Stock Liabilities'), 'Ledger', 'Stock Received But Not Billed', 'Balance Sheet', '', 'Liability'],
|
|
|
|
|
[_('Duties and Taxes'),_('Current Liabilities'),'Group','','Balance Sheet','', 'Liability'],
|
|
|
|
|
[_('Loans (Liabilities)'),_('Current Liabilities'),'Group','','Balance Sheet','', 'Liability'],
|
|
|
|
|
[_('Secured Loans'),_('Loans (Liabilities)'),'Group','','Balance Sheet','', 'Liability'],
|
|
|
|
|
[_('Unsecured Loans'),_('Loans (Liabilities)'),'Group','','Balance Sheet','', 'Liability'],
|
|
|
|
|
[_('Bank Overdraft Account'),_('Loans (Liabilities)'),'Group','','Balance Sheet','', 'Liability'],
|
|
|
|
|
[_('Temporary Accounts (Liabilities)'),_('Source of Funds (Liabilities)'),'Group','','Balance Sheet','', 'Liability'],
|
|
|
|
|
[_('Temporary Account (Liabilities)'),_('Temporary Accounts (Liabilities)'),'Ledger','','Balance Sheet','', 'Liability']
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
# load common account heads
|
|
|
|
|
|