mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 17:04:47 +00:00
Salary Copmonent - Default flexible componnent
This commit is contained in:
@@ -1001,7 +1001,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2018-05-16 12:27:03.005070",
|
"modified": "2018-05-15 18:53:09.115910",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "HR",
|
"module": "HR",
|
||||||
"name": "Salary Component",
|
"name": "Salary Component",
|
||||||
|
|||||||
@@ -11,16 +11,16 @@ from frappe.model.naming import append_number_if_name_exists
|
|||||||
class SalaryComponent(Document):
|
class SalaryComponent(Document):
|
||||||
def validate(self):
|
def validate(self):
|
||||||
self.validate_abbr()
|
self.validate_abbr()
|
||||||
self.validate_flexi_defualt()
|
self.validate_flexi_default()
|
||||||
|
|
||||||
def validate_flexi_defualt(self):
|
def validate_flexi_defualt(self):
|
||||||
if self.is_flexible_benefit and self.is_pro_rata_applicable and self.flexi_defualt:
|
if self.is_flexible_benefit and self.is_pro_rata_applicable and self.flexi_default:
|
||||||
salary_component = frappe.db.exists(
|
salary_component = frappe.db.exists(
|
||||||
'Salary Component',
|
'Salary Component',
|
||||||
{
|
{
|
||||||
'is_flexible_benefit': 1,
|
'is_flexible_benefit': 1,
|
||||||
'is_pro_rata_applicable': 1,
|
'is_pro_rata_applicable': 1,
|
||||||
'flexi_defualt': 1
|
'flexi_default': 1
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
if salary_component and salary_component != self.name:
|
if salary_component and salary_component != self.name:
|
||||||
|
|||||||
Reference in New Issue
Block a user