fix: BIG-213 Landed cost checkbox disable with inventory items not service in purchase invoice.

This commit is contained in:
a.bouhuolia
2021-12-30 12:38:03 +02:00
parent 119e6fa216
commit 871dcb62c4

View File

@@ -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.