mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
refactoring: balance sheet report.
refactoring: trial balance sheet report. refactoring: general ledger report. refactoring: journal report. refactoring: P&L report.
This commit is contained in:
13
server/src/services/FinancialStatements/utils.ts
Normal file
13
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