mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-13 10:11:20 +00:00
[flat discount] implemented flat discount on client side
This commit is contained in:
@@ -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]
|
||||
]
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user