From 871dcb62c49cc1770a33a34fe9fb5521fedb94f9 Mon Sep 17 00:00:00 2001 From: "a.bouhuolia" Date: Thu, 30 Dec 2021 12:38:03 +0200 Subject: [PATCH] fix: `BIG-213` Landed cost checkbox disable with inventory items not service in purchase invoice. --- src/containers/Entries/utils.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/containers/Entries/utils.js b/src/containers/Entries/utils.js index 0eb533f71..6d3f5fe15 100644 --- a/src/containers/Entries/utils.js +++ b/src/containers/Entries/utils.js @@ -65,8 +65,12 @@ export const ensureEntriesHaveEmptyLine = R.curry((defaultEntry, entries) => { return entries; }); +/** + * Disable landed cost checkbox once the item type is not service or non-inventorty. + * @returns {boolean} + */ export const isLandedCostDisabled = (item) => - ['service', 'non-inventory'].indexOf(item.type) !== -1; + ['service', 'non-inventory'].indexOf(item.type) === -1; /** * Handle fetch item row details and retrieves the new table row.