mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
WIP Make journal entries.
This commit is contained in:
@@ -1,13 +1,5 @@
|
||||
import React from 'react';
|
||||
import Currency from 'js-money/lib/currency';
|
||||
import accounting from 'accounting';
|
||||
|
||||
function formattedAmount(cents, currency) {
|
||||
const { symbol, decimal_digits: precision } = Currency[currency];
|
||||
const amount = cents / Math.pow(10, precision);
|
||||
|
||||
return accounting.formatMoney(amount, { symbol, precision });
|
||||
}
|
||||
import {formattedAmount} from 'utils';
|
||||
|
||||
export default function Money({ amount, currency }) {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user