Added formatter to column Stunden: null values -> format to '0.0'

Before the field was left empty. Now 0.0 will be displayed, even if
FAS Stunden are left empty.
This commit is contained in:
Cris
2019-11-12 16:11:40 +01:00
committed by hainberg
parent e092a6c33e
commit 7aea534778
6 changed files with 18 additions and 6 deletions
@@ -361,7 +361,7 @@ $filterWidgetArray = array(
semester: {headerFilter:"input"},
lv_oe_kurzbz: {headerFilter:"input", width: "12%"},
gruppe: {headerFilter:"input", width: "5%"},
stunden: {align:"right",
stunden: {align:"right", formatter: form_formatNulltoStringNumber, formatterParams:{precision:1},
headerFilter:"input", headerFilterFunc: hf_filterStringnumberWithOperator,
bottomCalc:"sum", bottomCalcParams:{precision:1}, width: "5%"},
betrag: {align:"right", formatter: form_formatNulltoStringNumber,
@@ -382,7 +382,7 @@ $filterWidgetArray = array(
lv_oe_kurzbz: {headerFilter:"input"},
gruppe: {headerFilter:"input"},
lektor: {headerFilter:"input"},
stunden: {align:"right",
stunden: {align:"right", formatter: form_formatNulltoStringNumber, formatterParams:{precision:1},
headerFilter:"input", headerFilterFunc: hf_filterStringnumberWithOperator,
bottomCalc:"sum", bottomCalcParams:{precision:1}},
betrag: {align:"right", formatter: form_formatNulltoStringNumber,
@@ -386,7 +386,7 @@ $filterWidgetArray = array(
lv_oe_kurzbz: {headerFilter:"input"},
gruppe: {headerFilter:"input"},
lektor: {headerFilter:"input"},
stunden: {align:"right",
stunden: {align:"right", formatter: form_formatNulltoStringNumber, formatterParams:{precision:1},
headerFilter:"input", headerFilterFunc: hf_filterStringnumberWithOperator,
bottomCalc:"sum", bottomCalcParams:{precision:1}},
stundensatz: {visible: false},
@@ -38,8 +38,12 @@ var mut_formatStringDate = function(value, data, type, params, component) {
// -----------------------------------------------------------------------------------------------------------------
// Formats null values to a string number '0.00'
var form_formatNulltoStringNumber = function(cell){
var form_formatNulltoStringNumber = function(cell, formatterParams){
if (cell.getValue() == null){
if (formatterParams.precision == 1)
{
return '0.0';
}
return '0.00';
}
else {
@@ -38,8 +38,12 @@ var mut_formatStringDate = function(value, data, type, params, component) {
// -----------------------------------------------------------------------------------------------------------------
// Formats null values to a string number '0.00'
var form_formatNulltoStringNumber = function(cell){
var form_formatNulltoStringNumber = function(cell, formatterParams){
if (cell.getValue() == null){
if (formatterParams.precision == 1)
{
return '0.0';
}
return '0.00';
}
else {
@@ -37,8 +37,12 @@ var mut_formatStringDate = function(value, data, type, params, component) {
// -----------------------------------------------------------------------------------------------------------------
// Formats null values to a string number '0.00'
var form_formatNulltoStringNumber = function(cell){
var form_formatNulltoStringNumber = function(cell, formatterParams){
if (cell.getValue() == null){
if (formatterParams.precision == 1)
{
return '0.0';
}
return '0.00';
}
else {