angular.module('GeneralFilters', []) .filter('eur', function () { return function (input) { if (input === null || input === undefined) { input = 0; } return formatValue(input, "currency", "###0.00", "€"); }; }).filter('perc', function () { return function (input) { if (input === null || input === undefined) { input = 0; } return formatValue(input, "float", "###0.00", "%"); }; }).filter('perc', function () { return function (input, round) { if (input === null || input === undefined) { input = 0; } if (round) { return formatValue(input, "float", "###0.", "%"); } else { return formatValue(input, "float", "###0.00", "%"); } }; }).filter('date', function () { return function (input) { if (input === null || input === undefined) { return "-"; } else { return formatValue(input, "date", "DD/MM/YYYY"); } }; }).filter('ceil', function () { return function (input) { if (input === null || input === undefined) { input = 0; } return Math.ceil(input); }; });