mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 22:30:31 +00:00
feat:(*): add currency code.
This commit is contained in:
@@ -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