BC-4: feat: base currency withCurrentOrganization

This commit is contained in:
elforjani3
2021-09-07 00:16:46 +02:00
parent 6401692903
commit 39ba31a842
31 changed files with 152 additions and 213 deletions

View File

@@ -10,7 +10,6 @@ import { useAccountDrawerContext } from './AccountDrawerProvider';
*/
export default function AccountDrawerHeader() {
const { account } = useAccountDrawerContext();
return (
<div className={'account-drawer__content-header'}>
<DetailsMenu>
@@ -18,9 +17,7 @@ export default function AccountDrawerHeader() {
name={'closing-balance'}
label={<T id={'closing_balance'} />}
>
<h3 class={'big-number'}>
<Money amount={account.amount} currency={account.currency_code} />
</h3>
<h3 class={'big-number'}>{account.formatted_amount}</h3>
</DetailItem>
<DetailItem name={'account-type'} label={<T id={'account_type'} />}>
@@ -50,7 +47,7 @@ export default function AccountDrawerHeader() {
<DetailItem name={'description'} label={<T id={'description'} />}>
{defaultTo(account.description, '--')}
</DetailItem>
</DetailsMenu>
</DetailsMenu>
</div>
);
}

View File

@@ -9,9 +9,10 @@ import { isBlank } from 'utils';
* Debit/credit table cell.
*/
function DebitCreditTableCell({ value, payload: { account } }) {
return !isBlank(value) && value !== 0 ? (
<Money amount={value} currency={account.currency_code} />
) : null;
return !isBlank(value) && value !== 0
? // <Money amount={value} currency={account.currency_code} />
account.formatted_amount
: null;
}
/**
@@ -19,7 +20,8 @@ function DebitCreditTableCell({ value, payload: { account } }) {
*/
function RunningBalanceTableCell({ value, payload: { account } }) {
return (
<Money amount={value} currency={account.currency_code} />
// <Money amount={value} currency={account.currency_code} />
account.formatted_amount
);
}