verified chart of accounts
This commit is contained in:
		
							parent
							
								
									1758357a0a
								
							
						
					
					
						commit
						c7aba3331b
					
				| @ -63,12 +63,13 @@ def identify_group_or_ledger(children): | |||||||
| def get_chart(chart_name): | def get_chart(chart_name): | ||||||
| 	chart = {} | 	chart = {} | ||||||
| 	if chart_name == "Standard": | 	if chart_name == "Standard": | ||||||
| 		from erpnext.accounts.doctype.account.chart_of_accounts import standard_chart_of_accounts | 		from erpnext.accounts.doctype.account.chart_of_accounts.verified import standard_chart_of_accounts | ||||||
| 		return standard_chart_of_accounts.coa | 		return standard_chart_of_accounts.coa | ||||||
| 	else: | 	else: | ||||||
| 		for fname in os.listdir(os.path.dirname(__file__)): | 		path = os.path.join(os.path.dirname(__file__), "verified") | ||||||
|  | 		for fname in os.listdir(path): | ||||||
| 			if fname.endswith(".json"): | 			if fname.endswith(".json"): | ||||||
| 				with open(os.path.join(os.path.dirname(__file__), fname), "r") as f: | 				with open(os.path.join(path, fname), "r") as f: | ||||||
| 					chart = f.read() | 					chart = f.read() | ||||||
| 					if chart and json.loads(chart).get("name") == chart_name: | 					if chart and json.loads(chart).get("name") == chart_name: | ||||||
| 						return json.loads(chart).get("tree") | 						return json.loads(chart).get("tree") | ||||||
| @ -84,9 +85,10 @@ def get_charts_for_country(country): | |||||||
| 				charts.append(content["name"]) | 				charts.append(content["name"]) | ||||||
| 
 | 
 | ||||||
| 	country_code = frappe.db.get_value("Country", country, "code") | 	country_code = frappe.db.get_value("Country", country, "code") | ||||||
| 	for fname in os.listdir(os.path.dirname(__file__)): | 	path = os.path.join(os.path.dirname(__file__), "verified") | ||||||
|  | 	for fname in os.listdir(path): | ||||||
| 		if fname.startswith(country_code) and fname.endswith(".json"): | 		if fname.startswith(country_code) and fname.endswith(".json"): | ||||||
| 			with open(os.path.join(os.path.dirname(__file__), fname), "r") as f: | 			with open(os.path.join(path, fname), "r") as f: | ||||||
| 				_get_chart_name(f.read()) | 				_get_chart_name(f.read()) | ||||||
| 
 | 
 | ||||||
| 	countries_use_OHADA_system = ["Benin", "Burkina Faso", "Cameroon", "Central African Republic", "Comoros", | 	countries_use_OHADA_system = ["Benin", "Burkina Faso", "Cameroon", "Central African Republic", "Comoros", | ||||||
|  | |||||||
| @ -1,167 +0,0 @@ | |||||||
| { |  | ||||||
|     "country_code": "in", |  | ||||||
|     "name": "Indian Chart of Accounts - Standard", |  | ||||||
| 	"is_active": "Yes", |  | ||||||
|     "tree": { |  | ||||||
|         "Assets": { |  | ||||||
|             "Current Assets": { |  | ||||||
|                 "Accounts Receivable": { |  | ||||||
|                     "Debtors": { |  | ||||||
|                         "account_type": "Receivable" |  | ||||||
|                     } |  | ||||||
|                 }, |  | ||||||
|                 "Bank Accounts": {}, |  | ||||||
|                 "Cash In Hand": { |  | ||||||
|                     "Cash - Payroll Checking": { |  | ||||||
|                         "account_type": "Cash" |  | ||||||
|                     }, |  | ||||||
|                     "Cash - Regular Checking": { |  | ||||||
|                         "account_type": "Cash" |  | ||||||
|                     }, |  | ||||||
|                     "Cash Account": { |  | ||||||
|                         "account_type": "Cash" |  | ||||||
|                     }, |  | ||||||
|                     "Petty Cash Fund": { |  | ||||||
|                         "account_type": "Cash" |  | ||||||
|                     } |  | ||||||
|                 }, |  | ||||||
|                 "Deposit Account": { |  | ||||||
|                     "Deposit Account": {} |  | ||||||
|                 }, |  | ||||||
|                 "Inventories": { |  | ||||||
| 	                "account_type": "Stock", |  | ||||||
| 					"group_or_ledger": "Group" |  | ||||||
|                 }, |  | ||||||
|                 "Other Current Assets": { |  | ||||||
|                     "Prepaid Insurance": {} |  | ||||||
|                 }, |  | ||||||
|                 "Tax Receivable": { |  | ||||||
|                     "Excise Duty Receivable": { |  | ||||||
|                         "Education Cess Receivable On Excise Duty": {}, |  | ||||||
|                         "Excise Duty Receivable": {}, |  | ||||||
|                         "Higher Education Cess Receivable On Excise Duty": {} |  | ||||||
|                     }, |  | ||||||
|                     "Sales Tax Receivable": {}, |  | ||||||
|                     "Service Tax Receivable": { |  | ||||||
|                         "Education Cess Receivable On Service Tax": {}, |  | ||||||
|                         "Higher Education Cess Receivable On Service Tax": {}, |  | ||||||
|                         "Service Tax Receivable": {} |  | ||||||
|                     }, |  | ||||||
|                     "TDS Receivable": {}, |  | ||||||
|                     "VAT Receivable": {} |  | ||||||
|                 } |  | ||||||
|             }, |  | ||||||
|             "Fixed Assets": { |  | ||||||
|                 "Air Conditionar": {}, |  | ||||||
|                 "Buildings": {}, |  | ||||||
|                 "Computer/Laptops (Assets)": {}, |  | ||||||
|                 "Equipments": {}, |  | ||||||
|                 "Furniture": {}, |  | ||||||
|                 "Land": {}, |  | ||||||
|                 "Misc Assets": {}, |  | ||||||
|                 "Vehicle": {} |  | ||||||
|             }, |  | ||||||
| 			"root_type": "Asset" |  | ||||||
|         }, |  | ||||||
|         "Liabilities": { |  | ||||||
|             "Current Liabilities": { |  | ||||||
|                 "Accounts Payable": { |  | ||||||
|                     "Creditors": { |  | ||||||
|                         "account_type": "Payable" |  | ||||||
|                     } |  | ||||||
|                 }, |  | ||||||
|                 "Duties And Taxes Payable": { |  | ||||||
|                     "Excise Duty Payable": { |  | ||||||
|                         "Education Cess Payable On Excise Duty": {}, |  | ||||||
|                         "Excise Duty Payable": {}, |  | ||||||
|                         "Higher Education Cess Payable On Excise Duty": {} |  | ||||||
|                     }, |  | ||||||
|                     "Sales Tax Payable": {}, |  | ||||||
|                     "Service Tax Payable": { |  | ||||||
|                         "Education Cess Payable On Service Tax": {}, |  | ||||||
|                         "Higher Education Cess Payable On Service Tax": {}, |  | ||||||
|                         "Service Tax Payable": {} |  | ||||||
|                     }, |  | ||||||
|                     "TDS Payable": {}, |  | ||||||
|                     "VAT Payable": {} |  | ||||||
|                 }, |  | ||||||
|                 "Loan Liabilities": { |  | ||||||
|                     "Bank OD Account": {}, |  | ||||||
|                     "Secured Loan Account": {}, |  | ||||||
|                     "Unsecured Loan Account": {} |  | ||||||
|                 }, |  | ||||||
|                 "Others Payable": { |  | ||||||
|                     "Interest Payable": {}, |  | ||||||
|                     "Notes Payable": {}, |  | ||||||
|                     "Wages Payable": {} |  | ||||||
|                 } |  | ||||||
|             }, |  | ||||||
|             "Share Holder/Owners Fund": { |  | ||||||
|                 "Capital Account": {}, |  | ||||||
|                 "Reserve And Surplus Account": {} |  | ||||||
|             }, |  | ||||||
| 			"root_type": "Liability" |  | ||||||
|         }, |  | ||||||
|         "Expense": { |  | ||||||
|             "Cost of Goods Sold": { |  | ||||||
|                 "Closing Stock": {}, |  | ||||||
|                 "Opening Stock": {}, |  | ||||||
|                 "Purchase Stock": {} |  | ||||||
|             }, |  | ||||||
|             "Direct Expense": { |  | ||||||
|                 "Computer/Laptop Accessories": {}, |  | ||||||
|                 "Electricity Expense": {}, |  | ||||||
|                 "House Keeping Expense": {}, |  | ||||||
|                 "Internet Expense": {}, |  | ||||||
|                 "News Paper And Magazine": {}, |  | ||||||
|                 "Office Rent": {}, |  | ||||||
|                 "Postage And Courier Expense": {}, |  | ||||||
|                 "Purchase Expense": {}, |  | ||||||
|                 "Salary Expense": {}, |  | ||||||
|                 "Telephone Expense": {} |  | ||||||
|             }, |  | ||||||
|             "Indirect Expense": { |  | ||||||
|                 "Bank Charges": { |  | ||||||
|                     "account_type": "Bank" |  | ||||||
|                 }, |  | ||||||
|                 "Business Promotion": {}, |  | ||||||
|                 "Diwali Bonus/Gift": {}, |  | ||||||
|                 "Entertainment Expense": {}, |  | ||||||
|                 "Foreign Exchange Loss": {}, |  | ||||||
|                 "Other Expense": { |  | ||||||
|                     "Sales Commission Expense": {}, |  | ||||||
|                     "Stationary Expense": {}, |  | ||||||
|                     "Travelling Expense": {} |  | ||||||
|                 }, |  | ||||||
|                 "Parts Purchase": {}, |  | ||||||
|                 "Professional Services": {}, |  | ||||||
|                 "Repairing Expense": {} |  | ||||||
|             }, |  | ||||||
|             "Non Operating Expenses And Loss": { |  | ||||||
|                 "Loss on Sale of Assets": {}, |  | ||||||
|                 "Write Off Expense": {} |  | ||||||
|             }, |  | ||||||
| 			"root_type": "Expense" |  | ||||||
|         }, |  | ||||||
|         "Income": { |  | ||||||
|             "Non Operating Revenues And Gains": { |  | ||||||
|                 "Foreign Exchange Profit": {}, |  | ||||||
|                 "Gain on Sale of Assets": {}, |  | ||||||
|                 "Interest Revenues": {}, |  | ||||||
|                 "Write off Income": {} |  | ||||||
|             }, |  | ||||||
|             "Operating Revenues": { |  | ||||||
|                 "Sales of Goods": { |  | ||||||
|                     "Export Sales": {}, |  | ||||||
|                     "Local Sales": {}, |  | ||||||
|                     "Retail Sales": {} |  | ||||||
|                 }, |  | ||||||
|                 "Sales of Services": { |  | ||||||
|                     "Export Services": {}, |  | ||||||
|                     "Local Services": {} |  | ||||||
|                 } |  | ||||||
|             }, |  | ||||||
| 			"root_type": "Income" |  | ||||||
|         } |  | ||||||
|     } |  | ||||||
| } |  | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user