Order payroll columns by calculation group

This commit is contained in:
gamonoid
2017-10-08 16:51:05 +02:00
parent 8d86b3c371
commit 9f7831bafe
2 changed files with 10 additions and 1 deletions

View File

@@ -297,6 +297,7 @@ PayrollColumnAdapter.method('getDataMapping', function() {
"name",
"colorder",
"calculation_hook",
"deduction_group",
"editable",
"enabled"
];
@@ -308,6 +309,7 @@ PayrollColumnAdapter.method('getHeaders', function() {
{ "sTitle": "Name"},
{ "sTitle": "Column Order"},
{ "sTitle": "Calculation Method"},
{ "sTitle": "Calculation Group"},
{ "sTitle": "Editable"},
{ "sTitle": "Enabled"}
];
@@ -334,6 +336,7 @@ PayrollColumnAdapter.method('getFormFields', function() {
[ "id", {"label":"ID","type":"hidden"}],
[ "name", {"label":"Name","type":"text","validation":""}],
[ "calculation_hook", {"label":"Predefined Calculations","type":"select2","allow-null":true,"null-label":"None","remote-source":["CalculationHook","code","name"]}],
[ "deduction_group", {"label":"Calculation Group","type":"select2","allow-null":true,"null-label":"Common","remote-source":["DeductionGroup","id","name"]}],
[ "salary_components", {"label":"Salary Components","type":"select2multi","remote-source":["SalaryComponent","id","name"]}],
[ "deductions", {"label":"Calculation Method","type":"select2multi","remote-source":["Deduction","id","name"]}],
[ "add_columns", {"label":"Columns to Add","type":"select2multi","remote-source":["PayrollColumn","id","name"]}],
@@ -347,6 +350,12 @@ PayrollColumnAdapter.method('getFormFields', function() {
];
});
PayrollColumnAdapter.method('getFilters', function() {
return [
[ "deduction_group", {"label":"Calculation Group","type":"select2","allow-null":true,"null-label":"Any","remote-source":["DeductionGroup","id","name"]}]
];
});