From a464c95d8e49360b0de58785c4186f333721a18d Mon Sep 17 00:00:00 2001 From: Mariia Aloshyna <55138456+mariia-aloshyna@users.noreply.github.com> Date: Thu, 7 Nov 2024 16:55:59 +0200 Subject: [PATCH] UIDATIMP-1671: Invoice field mapping profile: cannot check export to accounting checkbox (#1649) --- CHANGELOG.md | 5 +++++ .../edit/InvoiceDetailSection/ExtendedInformation.js | 11 +++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3958aee9b..22445258d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Change history for ui-data-import +## [8.0.1] (IN PROGRESS) + +### Bugs fixed: +* Invoice field mapping profile: cannot check export to accounting checkbox. (UIDATIMP-1671) + ## [8.0.0](https://github.com/folio-org/ui-data-import/tree/v8.0.0) (2024-10-31) ### Features added: diff --git a/src/settings/MappingProfiles/detailsSections/edit/InvoiceDetailSection/ExtendedInformation.js b/src/settings/MappingProfiles/detailsSections/edit/InvoiceDetailSection/ExtendedInformation.js index 3a2ef73ff..d4b56675a 100644 --- a/src/settings/MappingProfiles/detailsSections/edit/InvoiceDetailSection/ExtendedInformation.js +++ b/src/settings/MappingProfiles/detailsSections/edit/InvoiceDetailSection/ExtendedInformation.js @@ -39,11 +39,14 @@ export const ExtendedInformation = ({ okapi, setReferenceTables, }) => { + const CHECK_SUBSCRIPTION_OVERLAP_FIELD_INDEX = 22; + const EXPORT_TO_ACCOUNTING_FIELD_INDEX = 23; + const EXTENDED_INFO_FIELDS_MAP = { FOLIO_INVOICE_NUMBER: getFieldName(20), PAYMENT_METHOD: getFieldName(21), - CHECK_SUBSCRIPTION_OVERLAP: getBoolFieldName(22), - EXPORT_TO_ACCOUNTING: getBoolFieldName(23), + CHECK_SUBSCRIPTION_OVERLAP: getBoolFieldName(CHECK_SUBSCRIPTION_OVERLAP_FIELD_INDEX), + EXPORT_TO_ACCOUNTING: getBoolFieldName(EXPORT_TO_ACCOUNTING_FIELD_INDEX), CURRENCY: getFieldName(24), CURRENT_EXCHANGE_RATE: getFieldName(25), SET_EXCHANGE_RATE: getFieldName(26), @@ -57,8 +60,8 @@ export const ExtendedInformation = ({ const paymentMethodsList = createOptionsList(PAYMENT_METHOD_OPTIONS, formatMessage, 'labelId'); const currenciesList = useCurrencyOptions(); - const exportToAccountingCheckbox = mappingFields?.[22]?.booleanFieldAction; - const checkSubscriptionOverlapCheckbox = mappingFields?.[21]?.booleanFieldAction; + const exportToAccountingCheckbox = mappingFields?.[EXPORT_TO_ACCOUNTING_FIELD_INDEX]?.booleanFieldAction; + const checkSubscriptionOverlapCheckbox = mappingFields?.[CHECK_SUBSCRIPTION_OVERLAP_FIELD_INDEX]?.booleanFieldAction; return (