mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 06:40:31 +00:00
Merge branch 'master' of https://github.com/abouolia/Ratteb
This commit is contained in:
@@ -37,4 +37,17 @@ export const handleDeleteErrors = (errors) => {
|
|||||||
intent: Intent.DANGER,
|
intent: Intent.DANGER,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if (
|
||||||
|
errors.find(
|
||||||
|
(error) => error.type === 'TYPE_CANNOT_CHANGE_WITH_ITEM_HAS_TRANSACTIONS',
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
AppToaster.show({
|
||||||
|
message: formatMessage({
|
||||||
|
id:
|
||||||
|
'cannot_change_item_type_to_inventory_with_item_has_associated_transactions',
|
||||||
|
}),
|
||||||
|
intent: Intent.DANGER,
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
|
import { formatMessage } from 'services/intl';
|
||||||
|
import { Intent } from '@blueprintjs/core';
|
||||||
|
import { AppToaster } from 'components';
|
||||||
import { transformToForm, repeatValue } from 'utils';
|
import { transformToForm, repeatValue } from 'utils';
|
||||||
|
|
||||||
export const MIN_LINES_NUMBER = 4;
|
export const MIN_LINES_NUMBER = 4;
|
||||||
@@ -36,4 +39,18 @@ export const transformToEditForm = (bill) => {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
}
|
};
|
||||||
|
|
||||||
|
// handle delete errors.
|
||||||
|
export const handleDeleteErrors = (errors) => {
|
||||||
|
if (
|
||||||
|
errors.find((error) => error.type === 'BILL_HAS_ASSOCIATED_PAYMENT_ENTRIES')
|
||||||
|
) {
|
||||||
|
AppToaster.show({
|
||||||
|
message: formatMessage({
|
||||||
|
id: 'cannot_delete_bill_that_has_payment_transactions',
|
||||||
|
}),
|
||||||
|
intent: Intent.DANGER,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|||||||
@@ -1015,4 +1015,8 @@ export default {
|
|||||||
deposit_customer_account: 'Deposit customer account',
|
deposit_customer_account: 'Deposit customer account',
|
||||||
withdrawal_customer_account: 'Withdrawal customer account',
|
withdrawal_customer_account: 'Withdrawal customer account',
|
||||||
vendor_advance_deposit: 'Vendor advance deposit',
|
vendor_advance_deposit: 'Vendor advance deposit',
|
||||||
|
cannot_delete_bill_that_has_payment_transactions:
|
||||||
|
'Cannot delete bill that has associated payment transactions.',
|
||||||
|
cannot_change_item_type_to_inventory_with_item_has_associated_transactions:
|
||||||
|
'Cannot change item type to inventory with item has associated transactions.',
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user