Added new account types and patch for existing
This commit is contained in:
parent
a18bf07920
commit
b93ebaebe4
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-01-30 12:49:46",
|
"creation": "2013-01-30 12:49:46",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2014-03-03 18:43:33",
|
"modified": "2014-03-07 16:26:42",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@ -140,7 +140,7 @@
|
|||||||
"fieldname": "root_type",
|
"fieldname": "root_type",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"label": "Root Type",
|
"label": "Root Type",
|
||||||
"options": "\nAsset\nLiability\nExpense\nIncome\nEquity"
|
"options": "\nAsset\nLiability\nExpense\nIncome"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Setting Account Type helps in selecting this Account in transactions.",
|
"description": "Setting Account Type helps in selecting this Account in transactions.",
|
||||||
@ -151,7 +151,7 @@
|
|||||||
"label": "Account Type",
|
"label": "Account Type",
|
||||||
"oldfieldname": "account_type",
|
"oldfieldname": "account_type",
|
||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
"options": "\nFixed Asset Account\nBank or Cash\nExpense Account\nTax\nIncome Account\nChargeable\nWarehouse",
|
"options": "Bank or Cash\nTax\nChargeable\nWarehouse\nReceivable\nPayable\nEquity\nFixed Asset\nCost of Goods Sold\nExpense Account\nIncome Account",
|
||||||
"search_index": 0
|
"search_index": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -261,7 +261,7 @@ class DocType(SellingController):
|
|||||||
frappe.throw(_("Account must be an asset account"))
|
frappe.throw(_("Account must be an asset account"))
|
||||||
|
|
||||||
def validate_fixed_asset_account(self):
|
def validate_fixed_asset_account(self):
|
||||||
"""Validate Fixed Asset Account and whether Income Account Entered Exists"""
|
"""Validate Fixed Asset and whether Income Account Entered Exists"""
|
||||||
for d in getlist(self.doclist,'entries'):
|
for d in getlist(self.doclist,'entries'):
|
||||||
item = frappe.db.sql("""select name,is_asset_item,is_sales_item from `tabItem`
|
item = frappe.db.sql("""select name,is_asset_item,is_sales_item from `tabItem`
|
||||||
where name = %s and (ifnull(end_of_life,'')='' or end_of_life = '0000-00-00'
|
where name = %s and (ifnull(end_of_life,'')='' or end_of_life = '0000-00-00'
|
||||||
@ -270,8 +270,8 @@ class DocType(SellingController):
|
|||||||
where name = %s and docstatus != 2""", d.income_account)
|
where name = %s and docstatus != 2""", d.income_account)
|
||||||
if not acc:
|
if not acc:
|
||||||
msgprint("Account: "+d.income_account+" does not exist in the system", raise_exception=True)
|
msgprint("Account: "+d.income_account+" does not exist in the system", raise_exception=True)
|
||||||
elif item and item[0][1] == 'Yes' and not acc[0][0] == 'Fixed Asset Account':
|
elif item and item[0][1] == 'Yes' and not acc[0][0] == 'Fixed Asset':
|
||||||
msgprint("Please select income head with account type 'Fixed Asset Account' as Item %s is an asset item" % d.item_code, raise_exception=True)
|
msgprint("Please select income head with account type 'Fixed Asset' as Item %s is an asset item" % d.item_code, raise_exception=True)
|
||||||
|
|
||||||
def validate_with_previous_doc(self):
|
def validate_with_previous_doc(self):
|
||||||
super(DocType, self).validate_with_previous_doc(self.tname, {
|
super(DocType, self).validate_with_previous_doc(self.tname, {
|
||||||
|
@ -193,7 +193,7 @@ erpnext.AccountsChart = Class.extend({
|
|||||||
options:'Group\nLedger', description: frappe._('Further accounts can be made under Groups,')+
|
options:'Group\nLedger', description: frappe._('Further accounts can be made under Groups,')+
|
||||||
frappe._('but entries can be made against Ledger')},
|
frappe._('but entries can be made against Ledger')},
|
||||||
{fieldtype:'Select', fieldname:'account_type', label:frappe._('Account Type'),
|
{fieldtype:'Select', fieldname:'account_type', label:frappe._('Account Type'),
|
||||||
options: ['', 'Fixed Asset Account', 'Bank or Cash', 'Expense Account', 'Tax',
|
options: ['', 'Fixed Asset', 'Bank or Cash', 'Expense Account', 'Tax',
|
||||||
'Income Account', 'Chargeable'].join('\n'),
|
'Income Account', 'Chargeable'].join('\n'),
|
||||||
description: frappe._("Optional. This setting will be used to filter in various transactions.") },
|
description: frappe._("Optional. This setting will be used to filter in various transactions.") },
|
||||||
{fieldtype:'Float', fieldname:'tax_rate', label:frappe._('Tax Rate')},
|
{fieldtype:'Float', fieldname:'tax_rate', label:frappe._('Tax Rate')},
|
||||||
|
@ -30,3 +30,4 @@ erpnext.patches.4_0.split_email_settings
|
|||||||
erpnext.patches.4_0.fix_employee_user_id
|
erpnext.patches.4_0.fix_employee_user_id
|
||||||
erpnext.patches.4_0.set_account_details
|
erpnext.patches.4_0.set_account_details
|
||||||
erpnext.patches.4_0.import_country_codes
|
erpnext.patches.4_0.import_country_codes
|
||||||
|
execute:patches.4_0.countrywise_coa
|
||||||
|
9
erpnext/patches/4_0/countrywise_coa.py
Normal file
9
erpnext/patches/4_0/countrywise_coa.py
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
import frappe
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
frappe.db.sql("""update tabAccount set account_type='Fixed Asset'
|
||||||
|
where account_type='Fixed Asset Account'""")
|
@ -227,11 +227,11 @@ class DocType:
|
|||||||
['Stock Assets','Current Assets','Group','No','','Asset',self.doc.name,''],
|
['Stock Assets','Current Assets','Group','No','','Asset',self.doc.name,''],
|
||||||
['Tax Assets','Current Assets','Group','No','','Asset',self.doc.name,''],
|
['Tax Assets','Current Assets','Group','No','','Asset',self.doc.name,''],
|
||||||
['Fixed Assets','Application of Funds (Assets)','Group','No','','Asset',self.doc.name,''],
|
['Fixed Assets','Application of Funds (Assets)','Group','No','','Asset',self.doc.name,''],
|
||||||
['Capital Equipments','Fixed Assets','Ledger','No','Fixed Asset Account','Asset',self.doc.name,''],
|
['Capital Equipments','Fixed Assets','Ledger','No','Fixed Asset','Asset',self.doc.name,''],
|
||||||
['Computers','Fixed Assets','Ledger','No','Fixed Asset Account','Asset',self.doc.name,''],
|
['Computers','Fixed Assets','Ledger','No','Fixed Asset','Asset',self.doc.name,''],
|
||||||
['Furniture and Fixture','Fixed Assets','Ledger','No','Fixed Asset Account','Asset',self.doc.name,''],
|
['Furniture and Fixture','Fixed Assets','Ledger','No','Fixed Asset','Asset',self.doc.name,''],
|
||||||
['Office Equipments','Fixed Assets','Ledger','No','Fixed Asset Account','Asset',self.doc.name,''],
|
['Office Equipments','Fixed Assets','Ledger','No','Fixed Asset','Asset',self.doc.name,''],
|
||||||
['Plant and Machinery','Fixed Assets','Ledger','No','Fixed Asset Account','Asset',self.doc.name,''],
|
['Plant and Machinery','Fixed Assets','Ledger','No','Fixed Asset','Asset',self.doc.name,''],
|
||||||
['Investments','Application of Funds (Assets)','Group','No','','Asset',self.doc.name,''],
|
['Investments','Application of Funds (Assets)','Group','No','','Asset',self.doc.name,''],
|
||||||
['Temporary Accounts (Assets)','Application of Funds (Assets)','Group','No','','Asset',self.doc.name,''],
|
['Temporary Accounts (Assets)','Application of Funds (Assets)','Group','No','','Asset',self.doc.name,''],
|
||||||
['Temporary Account (Assets)','Temporary Accounts (Assets)','Ledger','No','','Asset',self.doc.name,''],
|
['Temporary Account (Assets)','Temporary Accounts (Assets)','Ledger','No','','Asset',self.doc.name,''],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user