Merge pull request #14047 from rohitwaghchaure/enterprise_s_minor_changes

HR Fixes
This commit is contained in:
rohitwaghchaure 2018-05-15 16:30:18 +05:30 committed by GitHub
commit 9cf250ccba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 9 deletions

View File

@ -200,6 +200,14 @@ def get_data():
{
"type": "doctype",
"name": "Employee Promotion",
},
{
"type": "doctype",
"name": "Employee Separation"
},
{
"type": "doctype",
"name": "Employee Onboarding"
}
]
},

View File

@ -11,14 +11,20 @@ frappe.ui.form.on('Employee Tax Exemption Declaration', {
}
});
frm.set_query('payroll_period', function() {
if(frm.doc.employee && frm.doc.company){
const fields = {'employee': 'Employee', 'company': 'Company'};
for (let [field, label] of Object.entries(fields)) {
if (!frm.doc[field]) {
frappe.msgprint(__("Please select {0}", [label]))
}
};
if (frm.doc.employee && frm.doc.company){
return {
filters: {
'company': frm.doc.company
}
}
}else {
frappe.msgprint(__("Please select Employee"));
}
});
frm.set_query('exemption_sub_category', 'declarations', function() {

View File

@ -42,6 +42,7 @@
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
@ -67,12 +68,13 @@
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
@ -102,6 +104,7 @@
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
@ -133,6 +136,7 @@
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
@ -163,6 +167,7 @@
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
@ -192,6 +197,7 @@
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
@ -223,6 +229,7 @@
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}
],
@ -236,7 +243,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2018-05-10 13:26:25.241545",
"modified": "2018-05-15 16:16:46.075493",
"modified_by": "Administrator",
"module": "HR",
"name": "Employee Tax Exemption Declaration",
@ -245,7 +252,6 @@
"permissions": [
{
"amend": 1,
"apply_user_permissions": 0,
"cancel": 1,
"create": 1,
"delete": 1,
@ -265,7 +271,6 @@
},
{
"amend": 1,
"apply_user_permissions": 0,
"cancel": 1,
"create": 1,
"delete": 1,
@ -285,7 +290,6 @@
},
{
"amend": 1,
"apply_user_permissions": 0,
"cancel": 1,
"create": 1,
"delete": 1,
@ -305,7 +309,6 @@
},
{
"amend": 1,
"apply_user_permissions": 0,
"cancel": 1,
"create": 1,
"delete": 1,