fix: linting issues

This commit is contained in:
Afshan
2021-09-21 11:09:07 +05:30
parent 9688d745f8
commit 9da6d21e75
3 changed files with 29 additions and 32 deletions

View File

@@ -5,13 +5,13 @@ frappe.ui.form.on('Process Sales Commission', {
setup: function(frm) { setup: function(frm) {
frm.set_query("department", function() { frm.set_query("department", function() {
if (!frm.doc.company) { if (!frm.doc.company) {
frappe.throw(__("Please select company first")) frappe.throw(__("Please select company first"));
} }
return { return {
filters: { filters: {
company: frm.doc.company company: frm.doc.company
} }
} };
}); });
}, },
}); });

View File

@@ -8,7 +8,7 @@ frappe.ui.form.on('Sales Commission', {
filters: [ filters: [
['name', 'in', ["Sales Order", "Sales Invoice"]] ['name', 'in', ["Sales Order", "Sales Invoice"]]
] ]
} };
}); });
}, },
refresh: function(frm) { refresh: function(frm) {
@@ -88,9 +88,6 @@ const create_payment_entry = function (frm) {
}; };
const create_additional_salary = function (frm) { const create_additional_salary = function (frm) {
if (!frm.doc.employee) {
frappe.throw(__("No employee is linked to Sales Person {0}. Please select an employee for {1} to process this Commission.").format(frappe.bold(frm.doc.sales_person), get_link_to_form("Sales Person", frm.doc.sales_person)))
}
frappe.confirm(__("Creating Additional Salary. Do you want to proceed?"), frappe.confirm(__("Creating Additional Salary. Do you want to proceed?"),
function () { function () {
frappe.call({ frappe.call({