mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +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:
@@ -211,6 +211,18 @@ const convertEmptyStringToNull = (value) => {
|
||||
: value;
|
||||
};
|
||||
|
||||
const formatNumber = (balance, { noCents = false, divideOn1000 = false }) => {
|
||||
let formattedBalance = parseFloat(balance);
|
||||
|
||||
if (noCents) {
|
||||
formattedBalance = parseInt(formattedBalance, 10);
|
||||
}
|
||||
if (divideOn1000) {
|
||||
formattedBalance /= 1000;
|
||||
}
|
||||
return formattedBalance + '';
|
||||
};
|
||||
|
||||
export {
|
||||
hashPassword,
|
||||
origin,
|
||||
@@ -229,4 +241,5 @@ export {
|
||||
getDefinedOptions,
|
||||
entriesAmountDiff,
|
||||
convertEmptyStringToNull,
|
||||
formatNumber
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user