[flat discount] implemented flat discount on client side

This commit is contained in:
Akhilesh Darjee
2013-12-25 19:46:20 +05:30
parent 63aa5fd673
commit c53dbc7cdf
7 changed files with 162 additions and 57 deletions

View File

@@ -97,7 +97,8 @@ cur_frm.fields_dict['default_sales_cost_center'].get_query = function(doc) {
cur_frm.fields_dict['item_tax'].grid.get_field("tax_type").get_query = function(doc, cdt, cdn) {
return{
filters:[
['Account', 'account_type', 'in', 'Tax, Chargeable'],
['Account', 'account_type', 'in',
'Tax, Chargeable, Income Account, Expense Account'],
['Account', 'docstatus', '!=', 2]
]
}

View File

@@ -154,8 +154,8 @@ class DocType(DocListController, WebsiteGenerator):
if d.tax_type:
account_type = webnotes.conn.get_value("Account", d.tax_type, "account_type")
if account_type not in ['Tax', 'Chargeable']:
msgprint("'%s' is not Tax / Chargeable Account" % d.tax_type, raise_exception=1)
if account_type not in ['Tax', 'Chargeable', 'Income Account', 'Expense Account']:
msgprint("'%s' is not Tax / Chargeable / Income / Expense Account" % d.tax_type, raise_exception=1)
else:
if d.tax_type in check_list:
msgprint("Rate is entered twice for: '%s'" % d.tax_type, raise_exception=1)