mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 12:20:31 +00:00
feat: expand sidebar once open form editor page.
feat: rounding money amount. feat: optimize page form structure. feat: refactoring make journal and expense form with FastField component.
This commit is contained in:
@@ -148,10 +148,9 @@ export const defaultExpanderReducer = (tableRows, level) => {
|
||||
|
||||
export function formattedAmount(cents, currency) {
|
||||
const { symbol, decimal_digits: precision } = Currency[currency];
|
||||
const amount = cents / Math.pow(10, precision);
|
||||
|
||||
return accounting.formatMoney(amount, { symbol, precision });
|
||||
return accounting.formatMoney(cents, { symbol, precision });
|
||||
}
|
||||
|
||||
export function formattedExchangeRate(amount, currency) {
|
||||
const options = {
|
||||
style: 'currency',
|
||||
@@ -368,3 +367,7 @@ export function defaultToTransform(
|
||||
? _defaultValue
|
||||
: _transfromedValue;
|
||||
}
|
||||
|
||||
export function isBlank(value) {
|
||||
return _.isEmpty(value) && !_.isNumber(value) || _.isNaN(value);
|
||||
}
|
||||
Reference in New Issue
Block a user