Merge branch 'stable' of github.com:webnotes/erpnext into stable
diff --git a/erpnext/patches/jan_mar_2012/account_type_patch.py b/erpnext/patches/jan_mar_2012/account_type_patch.py
new file mode 100644
index 0000000..63326ae
--- /dev/null
+++ b/erpnext/patches/jan_mar_2012/account_type_patch.py
@@ -0,0 +1,11 @@
+def execute():
+ import webnotes
+ webnotes.conn.sql("""update `tabAccount`
+ set account_type = 'Chargeable'
+ where account_name in ('CENVAT Capital Goods', 'CENVAT Service Tax', 'CENVAT Service Tax Cess 1', 'CENVAT Service Tax Cess 2')
+ """)
+ webnotes.conn.sql("""update tabAccount
+ set account_type = 'Tax'
+ where account_name in ('P L A', 'P L A - Cess Portion', 'VAT', 'TDS (Advertisement)', 'TDS (Commission)',
+ 'TDS (Contractor)', 'TDS (Interest)', 'TDS (Rent)', 'TDS (Salary)')
+ """)
diff --git a/erpnext/patches/patch_list.py b/erpnext/patches/patch_list.py
index 262b7f7..cbe10c7 100644
--- a/erpnext/patches/patch_list.py
+++ b/erpnext/patches/patch_list.py
@@ -70,4 +70,9 @@
'patch_file': 'map_conversion_rate',
'description': "Maps conversion rate in doctype mappers PO-PR and PO-PV"
},
+ {
+ 'patch_module': 'patches.jan_mar_2012',
+ 'patch_file': 'account_type_patch',
+ 'description': 'mentioed account type for some tax accounts'
+ }
]
diff --git a/erpnext/setup/doctype/company/company.py b/erpnext/setup/doctype/company/company.py
index a163870..1b06374 100644
--- a/erpnext/setup/doctype/company/company.py
+++ b/erpnext/setup/doctype/company/company.py
@@ -95,11 +95,11 @@
]
acc_list_india = [
- ['CENVAT Capital Goods','Tax Assets','Ledger','No','','Debit',self.doc.name,''],
+ ['CENVAT Capital Goods','Tax Assets','Ledger','No','Chargeable','Debit',self.doc.name,''],
['CENVAT','Tax Assets','Ledger','No','Chargeable','Debit',self.doc.name,''],
- ['CENVAT Service Tax','Tax Assets','Ledger','No','','Debit',self.doc.name,''],
- ['CENVAT Service Tax Cess 1','Tax Assets','Ledger','No','','Debit',self.doc.name,''],
- ['CENVAT Service Tax Cess 2','Tax Assets','Ledger','No','','Debit',self.doc.name,''],
+ ['CENVAT Service Tax','Tax Assets','Ledger','No','Chargeable','Debit',self.doc.name,''],
+ ['CENVAT Service Tax Cess 1','Tax Assets','Ledger','No','Chargeable','Debit',self.doc.name,''],
+ ['CENVAT Service Tax Cess 2','Tax Assets','Ledger','No','Chargeable','Debit',self.doc.name,''],
['CENVAT Edu Cess','Tax Assets','Ledger','No','Chargeable','Debit',self.doc.name,''],
['CENVAT SHE Cess','Tax Assets','Ledger','No','Chargeable','Debit',self.doc.name,''],
['Excise Duty 4','Tax Assets','Ledger','No','Tax','Debit',self.doc.name,'4.00'],
@@ -108,8 +108,8 @@
['Excise Duty 14','Tax Assets','Ledger','No','Tax','Debit',self.doc.name,'14.00'],
['Excise Duty Edu Cess 2','Tax Assets','Ledger','No','Tax','Debit',self.doc.name,'2.00'],
['Excise Duty SHE Cess 1','Tax Assets','Ledger','No','Tax','Debit',self.doc.name,'1.00'],
- ['P L A','Tax Assets','Ledger','No','','Debit',self.doc.name,''],
- ['P L A - Cess Portion','Tax Assets','Ledger','No','','Debit',self.doc.name,''],
+ ['P L A','Tax Assets','Ledger','No','Tax','Debit',self.doc.name,''],
+ ['P L A - Cess Portion','Tax Assets','Ledger','No','Tax','Debit',self.doc.name,''],
['Edu. Cess on Excise','Duties and Taxes','Ledger','No','Tax','Credit',self.doc.name,'2.00'],
['Edu. Cess on Service Tax','Duties and Taxes','Ledger','No','Tax','Credit',self.doc.name,'2.00'],
['Edu. Cess on TDS','Duties and Taxes','Ledger','No','Tax','Credit',self.doc.name,'2.00'],
@@ -122,13 +122,13 @@
['SHE Cess on Service Tax','Duties and Taxes','Ledger','No','Tax','Credit',self.doc.name,'1.00'],
['SHE Cess on TDS','Duties and Taxes','Ledger','No','Tax','Credit',self.doc.name,'1.00'],
['Professional Tax','Duties and Taxes','Ledger','No','','Credit',self.doc.name,''],
- ['VAT','Duties and Taxes','Ledger','No','','Credit',self.doc.name,''],
- ['TDS (Advertisement)','Duties and Taxes','Ledger','No','','Credit',self.doc.name,''],
- ['TDS (Commission)','Duties and Taxes','Ledger','No','','Credit',self.doc.name,''],
- ['TDS (Contractor)','Duties and Taxes','Ledger','No','','Credit',self.doc.name,''],
- ['TDS (Interest)','Duties and Taxes','Ledger','No','','Credit',self.doc.name,''],
- ['TDS (Rent)','Duties and Taxes','Ledger','No','','Credit',self.doc.name,''],
- ['TDS (Salary)','Duties and Taxes','Ledger','No','','Credit',self.doc.name,'']
+ ['VAT','Duties and Taxes','Ledger','No','Tax','Credit',self.doc.name,''],
+ ['TDS (Advertisement)','Duties and Taxes','Ledger','No','Tax','Credit',self.doc.name,''],
+ ['TDS (Commission)','Duties and Taxes','Ledger','No','Tax','Credit',self.doc.name,''],
+ ['TDS (Contractor)','Duties and Taxes','Ledger','No','Tax','Credit',self.doc.name,''],
+ ['TDS (Interest)','Duties and Taxes','Ledger','No','Tax','Credit',self.doc.name,''],
+ ['TDS (Rent)','Duties and Taxes','Ledger','No','Tax','Credit',self.doc.name,''],
+ ['TDS (Salary)','Duties and Taxes','Ledger','No','Tax','Credit',self.doc.name,'']
]
# load common account heads
for d in acc_list_common:
diff --git a/erpnext/utilities/doctype/trash_control/trash_control.py b/erpnext/utilities/doctype/trash_control/trash_control.py
index 644a278..228160e 100644
--- a/erpnext/utilities/doctype/trash_control/trash_control.py
+++ b/erpnext/utilities/doctype/trash_control/trash_control.py
@@ -26,7 +26,7 @@
# -----------
def get_masters(self):
mlist = []
- res = sql("select distinct t1.name from tabDocType t1, tabDocPerm t2 where ifnull(t1.allow_trash, 0) = 1 and (ifnull(t2.write, 0) = 1 or ifnull(t2.create, 0) = 1) and t2.role in %s and t2.parent = t1.name and t1.module not in ('DocType','Application Internal','Recycle Bin','Development','Testing','Testing System','Test') ORDER BY t1.name" % cstr(tuple(webnotes.user.get_roles())))
+ res = sql("select distinct t1.name from tabDocType t1, tabDocPerm t2 where ifnull(t1.allow_trash, 0) = 1 and (ifnull(t2.write, 0) = 1 or ifnull(t2.create, 0) = 1) and t2.role in (%s) and t2.parent = t1.name and t1.module not in ('DocType','Application Internal','Recycle Bin','Development','Testing','Testing System','Test') ORDER BY t1.name" % ("'"+"', '".join(webnotes.user.get_roles())+"'"))
for r in res:
mlist.append(r[0])
return mlist
@@ -56,4 +56,4 @@
for r in arg[k]:
sql("update `tab%s` set docstatus = 0, modified = '%s', trash_reason = '' where name = '%s'" % (k, now(), r))
dt_obj = get_obj(k,r)
- if hasattr(dt_obj, 'on_restore'): dt_obj.on_restore()
\ No newline at end of file
+ if hasattr(dt_obj, 'on_restore'): dt_obj.on_restore()