mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
Merge branch 'master' of https://github.com/abouolia/Ratteb
This commit is contained in:
@@ -132,8 +132,8 @@ function DateCell({ value }) {
|
||||
return moment(value).format('YYYY MMM DD');
|
||||
}
|
||||
|
||||
function AmountAccessor(row) {
|
||||
return <Money amount={row.amount} currency={'USD'} />;
|
||||
function AmountAccessor({ amount, currency_code }) {
|
||||
return <Money amount={amount} currency={currency_code} />;
|
||||
}
|
||||
|
||||
function ActionsCell(props) {
|
||||
|
||||
@@ -180,7 +180,7 @@ export function useInvoicesTableColumns() {
|
||||
{
|
||||
id: 'balance',
|
||||
Header: formatMessage({ id: 'balance' }),
|
||||
accessor: (r) => <Money amount={r.balance} currency={'USD'} />,
|
||||
accessor: (r) => <Money amount={r.balance} currency={r.currency_code} />,
|
||||
width: 110,
|
||||
className: 'balance',
|
||||
},
|
||||
|
||||
@@ -53,7 +53,7 @@ export function ActionsMenu({
|
||||
* Amount accessor.
|
||||
*/
|
||||
export function AmountAccessor(row) {
|
||||
return <Money amount={row.amount} currency={'USD'} />;
|
||||
return <Money amount={row.amount} currency={row.currency_code} />;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -11,6 +11,7 @@ import {
|
||||
} from '@blueprintjs/core';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
import { useFormikContext } from 'formik';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import classNames from 'classnames';
|
||||
import { CLASSES } from 'common/classes';
|
||||
import { If, Icon } from 'components';
|
||||
@@ -20,6 +21,9 @@ import { useReceiptFormContext } from './ReceiptFormProvider';
|
||||
* Receipt floating actions bar.
|
||||
*/
|
||||
export default function ReceiptFormFloatingActions() {
|
||||
// History context.
|
||||
const history = useHistory();
|
||||
|
||||
// Formik context.
|
||||
const { resetForm, submitForm, isSubmitting } = useFormikContext();
|
||||
|
||||
@@ -63,7 +67,7 @@ export default function ReceiptFormFloatingActions() {
|
||||
|
||||
// Handle cancel button click.
|
||||
const handleCancelBtnClick = (event) => {
|
||||
|
||||
history.goBack();
|
||||
};
|
||||
|
||||
const handleClearBtnClick = (event) => {
|
||||
|
||||
@@ -128,7 +128,7 @@ export function useReceiptsTableColumns() {
|
||||
{
|
||||
id: 'amount',
|
||||
Header: formatMessage({ id: 'amount' }),
|
||||
accessor: (r) => <Money amount={r.amount} currency={'USD'} />,
|
||||
accessor: (r) => <Money amount={r.amount} currency={r.currency_code} />,
|
||||
width: 140,
|
||||
className: 'amount',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user