Merge branch 'develop' into general-ledger-filters
This commit is contained in:
commit
0a926ee20d
@ -24,8 +24,13 @@ class JobOffer(Document):
|
||||
check_vacancies = frappe.get_single("HR Settings").check_vacancies
|
||||
if staffing_plan and check_vacancies:
|
||||
job_offers = self.get_job_offer(staffing_plan.from_date, staffing_plan.to_date)
|
||||
if staffing_plan.vacancies - len(job_offers) <= 0:
|
||||
frappe.throw(_("There are no vacancies under staffing plan {0}").format(frappe.bold(get_link_to_form("Staffing Plan", staffing_plan.parent))))
|
||||
|
||||
if not staffing_plan.get("vacancies") or staffing_plan.vacancies - len(job_offers) <= 0:
|
||||
error_variable = 'for ' + frappe.bold(self.designation)
|
||||
if staffing_plan.get("parent"):
|
||||
error_variable = frappe.bold(get_link_to_form("Staffing Plan", staffing_plan.parent))
|
||||
|
||||
frappe.throw(_("There are no vacancies under staffing plan {0}").format(error_variable))
|
||||
|
||||
def on_change(self):
|
||||
update_job_applicant(self.status, self.job_applicant)
|
||||
|
@ -7,27 +7,30 @@
|
||||
"field_order": [
|
||||
"salary_component",
|
||||
"abbr",
|
||||
"statistical_component",
|
||||
"column_break_3",
|
||||
"deduct_full_tax_on_selected_payroll_date",
|
||||
"amount",
|
||||
"section_break_5",
|
||||
"additional_salary",
|
||||
"statistical_component",
|
||||
"depends_on_payment_days",
|
||||
"is_tax_applicable",
|
||||
"exempted_from_income_tax",
|
||||
"is_tax_applicable",
|
||||
"column_break_11",
|
||||
"is_flexible_benefit",
|
||||
"variable_based_on_taxable_salary",
|
||||
"do_not_include_in_total",
|
||||
"deduct_full_tax_on_selected_payroll_date",
|
||||
"section_break_2",
|
||||
"condition",
|
||||
"column_break_18",
|
||||
"amount_based_on_formula",
|
||||
"formula",
|
||||
"amount",
|
||||
"do_not_include_in_total",
|
||||
"section_break_19",
|
||||
"default_amount",
|
||||
"additional_amount",
|
||||
"column_break_24",
|
||||
"tax_on_flexible_benefit",
|
||||
"tax_on_additional_salary",
|
||||
"section_break_11",
|
||||
"additional_salary",
|
||||
"condition_and_formula_help"
|
||||
"tax_on_additional_salary"
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
@ -110,9 +113,11 @@
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"collapsible": 1,
|
||||
"depends_on": "eval:doc.is_flexible_benefit != 1",
|
||||
"fieldname": "section_break_2",
|
||||
"fieldtype": "Section Break"
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Condtion and formula"
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 1,
|
||||
@ -181,23 +186,12 @@
|
||||
"label": "Tax on additional salary",
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"depends_on": "eval:doc.parenttype=='Salary Structure'",
|
||||
"fieldname": "section_break_11",
|
||||
"fieldtype": "Column Break"
|
||||
},
|
||||
{
|
||||
"depends_on": "eval:doc.parenttype=='Salary Structure'",
|
||||
"fieldname": "condition_and_formula_help",
|
||||
"fieldtype": "HTML",
|
||||
"label": "Condition and Formula Help",
|
||||
"options": "<h3>Condition and Formula Help</h3>\n\n<p>Notes:</p>\n\n<ol>\n<li>Use field <code>base</code> for using base salary of the Employee</li>\n<li>Use Salary Component abbreviations in conditions and formulas. <code>BS = Basic Salary</code></li>\n<li>Use field name for employee details in conditions and formulas. <code>Employment Type = employment_type</code><code>Branch = branch</code></li>\n<li>Use field name from Salary Slip in conditions and formulas. <code>Payment Days = payment_days</code><code>Leave without pay = leave_without_pay</code></li>\n<li>Direct Amount can also be entered based on Condtion. See example 3</li></ol>\n\n<h4>Examples</h4>\n<ol>\n<li>Calculating Basic Salary based on <code>base</code>\n<pre><code>Condition: base < 10000</code></pre>\n<pre><code>Formula: base * .2</code></pre></li>\n<li>Calculating HRA based on Basic Salary<code>BS</code> \n<pre><code>Condition: BS > 2000</code></pre>\n<pre><code>Formula: BS * .1</code></pre></li>\n<li>Calculating TDS based on Employment Type<code>employment_type</code> \n<pre><code>Condition: employment_type==\"Intern\"</code></pre>\n<pre><code>Amount: 1000</code></pre></li>\n</ol>"
|
||||
},
|
||||
{
|
||||
"fieldname": "additional_salary",
|
||||
"fieldtype": "Link",
|
||||
"label": "Additional Salary ",
|
||||
"options": "Additional Salary"
|
||||
"options": "Additional Salary",
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"default": "0",
|
||||
@ -207,11 +201,43 @@
|
||||
"fieldtype": "Check",
|
||||
"label": "Exempted from Income Tax",
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"collapsible": 1,
|
||||
"fieldname": "section_break_5",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Component properties and references ",
|
||||
"show_days": 1,
|
||||
"show_seconds": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "column_break_11",
|
||||
"fieldtype": "Column Break",
|
||||
"show_days": 1,
|
||||
"show_seconds": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "section_break_19",
|
||||
"fieldtype": "Section Break",
|
||||
"show_days": 1,
|
||||
"show_seconds": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "column_break_18",
|
||||
"fieldtype": "Column Break",
|
||||
"show_days": 1,
|
||||
"show_seconds": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "column_break_24",
|
||||
"fieldtype": "Column Break",
|
||||
"show_days": 1,
|
||||
"show_seconds": 1
|
||||
}
|
||||
],
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2020-06-22 23:21:26.300951",
|
||||
"modified": "2020-07-01 12:13:41.956495",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Payroll",
|
||||
"name": "Salary Detail",
|
||||
|
@ -123,13 +123,13 @@ frappe.ui.form.on("Salary Slip", {
|
||||
doc: frm.doc,
|
||||
callback: function(r, rt) {
|
||||
frm.refresh();
|
||||
if (frm.doc.absent_days){
|
||||
if (r.message){
|
||||
frm.fields_dict.absent_days.set_description("Unmarked Days is treated as "+ r.message +". You can can change this in " + frappe.utils.get_form_link("Payroll Settings", "Payroll Settings", true));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
frappe.ui.form.on('Salary Slip Timesheet', {
|
||||
time_sheet: function(frm, dt, dn) {
|
||||
|
@ -20,15 +20,17 @@
|
||||
"company",
|
||||
"letter_head",
|
||||
"section_break_10",
|
||||
"salary_slip_based_on_timesheet",
|
||||
"start_date",
|
||||
"end_date",
|
||||
"salary_structure",
|
||||
"column_break_18",
|
||||
"salary_slip_based_on_timesheet",
|
||||
"payroll_frequency",
|
||||
"column_break_15",
|
||||
"section_break_20",
|
||||
"total_working_days",
|
||||
"unmarked_days",
|
||||
"leave_without_pay",
|
||||
"column_break_24",
|
||||
"absent_days",
|
||||
"payment_days",
|
||||
"hourly_wages",
|
||||
@ -200,10 +202,6 @@
|
||||
"fieldtype": "Date",
|
||||
"label": "End Date"
|
||||
},
|
||||
{
|
||||
"fieldname": "column_break_15",
|
||||
"fieldtype": "Column Break"
|
||||
},
|
||||
{
|
||||
"fieldname": "salary_structure",
|
||||
"fieldtype": "Link",
|
||||
@ -490,13 +488,25 @@
|
||||
"fieldtype": "Float",
|
||||
"hidden": 1,
|
||||
"label": "Unmarked days"
|
||||
},
|
||||
{
|
||||
"fieldname": "section_break_20",
|
||||
"fieldtype": "Section Break"
|
||||
},
|
||||
{
|
||||
"fieldname": "column_break_24",
|
||||
"fieldtype": "Column Break"
|
||||
},
|
||||
{
|
||||
"fieldname": "column_break_18",
|
||||
"fieldtype": "Column Break"
|
||||
}
|
||||
],
|
||||
"icon": "fa fa-file-text",
|
||||
"idx": 9,
|
||||
"is_submittable": 1,
|
||||
"links": [],
|
||||
"modified": "2020-07-22 12:41:03.659422",
|
||||
"modified": "2020-08-11 17:37:54.274384",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Payroll",
|
||||
"name": "Salary Slip",
|
||||
|
Loading…
Reference in New Issue
Block a user