mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-09 00:01:18 +00:00
feat(Payroll): compute Year to Date for Salary Slip components
This commit is contained in:
committed by
Deepesh Garg
parent
ca966601a2
commit
10c069588f
@@ -9,6 +9,7 @@
|
||||
"abbr",
|
||||
"column_break_3",
|
||||
"amount",
|
||||
"year_to_date",
|
||||
"section_break_5",
|
||||
"additional_salary",
|
||||
"statistical_component",
|
||||
@@ -226,11 +227,19 @@
|
||||
{
|
||||
"fieldname": "column_break_24",
|
||||
"fieldtype": "Column Break"
|
||||
},
|
||||
{
|
||||
"description": "Total amount spent on this salary component from the beginning of the year (payroll or fiscal) to the current payroll date.",
|
||||
"fieldname": "year_to_date",
|
||||
"fieldtype": "Currency",
|
||||
"label": "Year To Date",
|
||||
"options": "currency",
|
||||
"read_only": 1
|
||||
}
|
||||
],
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2020-11-25 13:12:41.081106",
|
||||
"modified": "2021-01-13 17:33:19.184195",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Payroll",
|
||||
"name": "Salary Detail",
|
||||
|
||||
@@ -138,11 +138,11 @@ frappe.ui.form.on("Salary Slip", {
|
||||
},
|
||||
|
||||
change_grid_labels: function(frm) {
|
||||
frm.set_currency_labels(["amount", "default_amount", "additional_amount", "tax_on_flexible_benefit",
|
||||
"tax_on_additional_salary"], frm.doc.currency, "earnings");
|
||||
let fields = ["amount", "year_to_date", "default_amount", "additional_amount", "tax_on_flexible_benefit",
|
||||
"tax_on_additional_salary"];
|
||||
|
||||
frm.set_currency_labels(["amount", "default_amount", "additional_amount", "tax_on_flexible_benefit",
|
||||
"tax_on_additional_salary"], frm.doc.currency, "deductions");
|
||||
frm.set_currency_labels(fields, frm.doc.currency, "earnings");
|
||||
frm.set_currency_labels(fields, frm.doc.currency, "deductions");
|
||||
},
|
||||
|
||||
refresh: function(frm) {
|
||||
|
||||
Reference in New Issue
Block a user