codacy fixes

This commit is contained in:
Ranjith 2018-05-31 12:08:14 +05:30
parent 0cb2684130
commit 590bf4ce3a
3 changed files with 5 additions and 4 deletions

View File

@ -71,13 +71,15 @@ frappe.ui.form.on('Employee Tax Exemption Declaration', {
method: "calculate_hra_exemption",
doc: frm.doc,
callback: function(r) {
frm.refresh_fields();
if (!r.exc){
frm.refresh_fields();
}
}
});
},
set_null_value(frm){
let fields = ['salary_structure_hra', 'monthly_house_rent','annual_hra', 'monthly_hra',
'total_exemption_amount', 'payroll_period'];
'total_exemption_amount', 'payroll_period'];
fields.forEach(function(field) {
frm.set_value(field, '');
});

View File

@ -6,7 +6,6 @@ from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
from frappe import _
from frappe.utils import getdate
from erpnext.hr.utils import validate_tax_declaration, calculate_eligible_hra_exemption
class EmployeeTaxExemptionDeclaration(Document):

View File

@ -6,7 +6,7 @@ from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
from frappe import _
from frappe.utils import date_diff, flt, getdate, get_first_day, get_last_day
from frappe.utils import date_diff, flt
from erpnext.hr.utils import validate_tax_declaration, calculate_eligible_hra_exemption
class EmployeeTaxExemptionProofSubmission(Document):