fix: linting issues
This commit is contained in:
@@ -22,8 +22,7 @@ class SalesCommission(Document):
|
|||||||
frappe.throw(_("Total Commission Amount should be greater than 0"))
|
frappe.throw(_("Total Commission Amount should be greater than 0"))
|
||||||
|
|
||||||
def validate_salary_component(self):
|
def validate_salary_component(self):
|
||||||
if self.pay_via_salary and not frappe.db.get_single_value(
|
if self.pay_via_salary and not frappe.db.get_single_value("Payroll Settings", "salary_component_for_sales_commission"):
|
||||||
"Payroll Settings", "salary_component_for_sales_commission"):
|
|
||||||
frappe.throw(_("Please set {0} in {1}").format(frappe.bold("Salary Component for Sales Commission"), get_link_to_form("Payroll Settings", "Payroll Settings")))
|
frappe.throw(_("Please set {0} in {1}").format(frappe.bold("Salary Component for Sales Commission"), get_link_to_form("Payroll Settings", "Payroll Settings")))
|
||||||
|
|
||||||
def on_submit(self):
|
def on_submit(self):
|
||||||
|
|||||||
@@ -7,4 +7,4 @@ frappe.listview_settings['Sales Commission'] = {
|
|||||||
return [__(doc.status), "red", "status,=," + doc.status];
|
return [__(doc.status), "red", "status,=," + doc.status];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
Reference in New Issue
Block a user