mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 14:50:32 +00:00
add server to monorepo.
This commit is contained in:
13
packages/server/src/services/FinancialStatements/utils.ts
Normal file
13
packages/server/src/services/FinancialStatements/utils.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
|
||||
export const formatNumber = (balance, { noCents, divideOn1000 }): string => {
|
||||
let formattedBalance: number = parseFloat(balance);
|
||||
|
||||
if (noCents) {
|
||||
formattedBalance = parseInt(formattedBalance, 10);
|
||||
}
|
||||
if (divideOn1000) {
|
||||
formattedBalance /= 1000;
|
||||
}
|
||||
return formattedBalance;
|
||||
};
|
||||
Reference in New Issue
Block a user