Browse Source

Ajout fonction js

develop
Fabien Normand 2 years ago
parent
commit
b000c65d58
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      Resources/assets/functions/tools.js

+ 9
- 0
Resources/assets/functions/tools.js View File

@@ -65,6 +65,15 @@ export class SovTools {
else return null;
}

static formatNumberWithoutRounding(number, toFixed) {
if (number){
let factor = Math.pow(10, toFixed);
return Math.floor(number * factor) / factor
}else{
return null
}
}

static formatNumberWithoutFixed(number) {
if (typeof number == 'string') number = number.replace(',', '.');
if (number) return Number(number);

Loading…
Cancel
Save