mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
Merge branch 'develop' into contacts-opening-balance-exchange-rate
This commit is contained in:
@@ -28,6 +28,8 @@ const ERROR = {
|
||||
CREDIT_DEBIT_SUMATION_SHOULD_NOT_EQUAL_ZERO:
|
||||
'CREDIT.DEBIT.SUMATION.SHOULD.NOT.EQUAL.ZERO',
|
||||
ENTRIES_SHOULD_ASSIGN_WITH_CONTACT: 'ENTRIES_SHOULD_ASSIGN_WITH_CONTACT',
|
||||
COULD_NOT_ASSIGN_DIFFERENT_CURRENCY_TO_ACCOUNTS:
|
||||
'COULD_NOT_ASSIGN_DIFFERENT_CURRENCY_TO_ACCOUNTS',
|
||||
};
|
||||
|
||||
export const MIN_LINES_NUMBER = 1;
|
||||
@@ -161,6 +163,15 @@ export const transformErrors = (resErrors, { setErrors, errors }) => {
|
||||
intl.get('journal_number_is_already_used'),
|
||||
);
|
||||
}
|
||||
if (
|
||||
(error = getError(ERROR.COULD_NOT_ASSIGN_DIFFERENT_CURRENCY_TO_ACCOUNTS))
|
||||
) {
|
||||
toastMessages.push(
|
||||
intl.get(
|
||||
'make_journal.errors.should_add_accounts_in_same_currency_or_base_currency',
|
||||
),
|
||||
);
|
||||
}
|
||||
setErrors({ ...newErrors });
|
||||
|
||||
if (toastMessages.length > 0) {
|
||||
|
||||
@@ -38,7 +38,6 @@ export function ActionsMenu({
|
||||
/>
|
||||
<Can I={CustomerAction.Edit} a={AbilitySubject.Customer}>
|
||||
<MenuDivider />
|
||||
|
||||
<MenuItem
|
||||
icon={<Icon icon="pen-18" />}
|
||||
text={intl.get('edit_customer')}
|
||||
@@ -47,7 +46,7 @@ export function ActionsMenu({
|
||||
</Can>
|
||||
<Can I={CustomerAction.Create} a={AbilitySubject.Customer}>
|
||||
<MenuItem
|
||||
icon={<Icon icon="duplicate-16" />}
|
||||
icon={<Icon icon="content-copy" iconSize={16} />}
|
||||
text={intl.get('duplicate')}
|
||||
onClick={safeCallback(onDuplicate, original)}
|
||||
/>
|
||||
|
||||
@@ -8,7 +8,6 @@ import { useCustomerOpeningBalanceContext } from './CustomerOpeningBalanceFormPr
|
||||
import withDialogActions from '@/containers/Dialog/withDialogActions';
|
||||
import { compose } from '@/utils';
|
||||
|
||||
|
||||
/**
|
||||
* Customer Opening balance floating actions.
|
||||
* @returns
|
||||
@@ -31,6 +30,9 @@ function CustomerOpeningBalanceFormFloatingActions({
|
||||
return (
|
||||
<div className={Classes.DIALOG_FOOTER}>
|
||||
<div className={Classes.DIALOG_FOOTER_ACTIONS}>
|
||||
<Button onClick={handleCancelBtnClick} style={{ minWidth: '75px' }}>
|
||||
<T id={'cancel'} />
|
||||
</Button>
|
||||
<Button
|
||||
intent={Intent.PRIMARY}
|
||||
loading={isSubmitting}
|
||||
@@ -39,9 +41,6 @@ function CustomerOpeningBalanceFormFloatingActions({
|
||||
>
|
||||
{<T id={'edit'} />}
|
||||
</Button>
|
||||
<Button onClick={handleCancelBtnClick} style={{ minWidth: '75px' }}>
|
||||
<T id={'cancel'} />
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -48,7 +48,7 @@ export function ActionsMenu({
|
||||
</Can>
|
||||
<Can I={VendorAction.Create} a={AbilitySubject.Customer}>
|
||||
<MenuItem
|
||||
icon={<Icon icon="duplicate-16" />}
|
||||
icon={<Icon icon="content-copy" iconSize={16} />}
|
||||
text={intl.get('duplicate')}
|
||||
onClick={safeCallback(onDuplicate, original)}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user