WIP Make journal entries.

This commit is contained in:
Ahmed Bouhuolia
2020-04-07 12:56:12 +02:00
parent 5f6c7ca2d5
commit 490979ded5
19 changed files with 632 additions and 197 deletions

View File

@@ -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 (