diff --git a/descriptors/ModuleDescriptor-template.json b/descriptors/ModuleDescriptor-template.json index 71f00b16b..2ac66f4a6 100644 --- a/descriptors/ModuleDescriptor-template.json +++ b/descriptors/ModuleDescriptor-template.json @@ -120,7 +120,6 @@ "orders.re-encumber.item.post" ], "modulePermissions": [ - "inventory-storage.holdings.collection.get", "orders-storage.purchase-orders.item.get", "orders-storage.po-lines.collection.get", "orders-storage.po-lines-batch.collection.put", @@ -133,7 +132,8 @@ "finance.ledger-rollovers-errors.collection.get", "finance.ledger-rollovers-errors.item.delete", "finance.exchange-rate.item.get", - "finance-storage.ledgers.collection.get" + "finance-storage.ledgers.collection.get", + "inventory-storage.holdings.collection.get" ] } ] @@ -583,6 +583,7 @@ "inventory.items.collection.get", "inventory-storage.holdings.item.get", "inventory-storage.holdings.item.delete", + "inventory-storage.holdings.collection.get", "finance.funds.collection.get", "finance.funds.budget.item.get", "finance.fiscal-years.item.get", diff --git a/src/main/java/org/folio/helper/PurchaseOrderLineHelper.java b/src/main/java/org/folio/helper/PurchaseOrderLineHelper.java index 7187d76dc..27f1e6686 100644 --- a/src/main/java/org/folio/helper/PurchaseOrderLineHelper.java +++ b/src/main/java/org/folio/helper/PurchaseOrderLineHelper.java @@ -99,6 +99,7 @@ public class PurchaseOrderLineHelper { private static final Pattern PO_LINE_NUMBER_PATTERN = Pattern.compile("([a-zA-Z0-9]{1,22}-)(\\d{1,3})"); private static final String PURCHASE_ORDER_ID = "purchaseOrderId"; + private static final String SEARCH_LOCATION_IDS = "searchLocationIds"; private static final String CREATE_INVENTORY = "createInventory"; public static final String ERESOURCE = "eresource"; public static final String PHYSICAL = "physical"; @@ -216,6 +217,7 @@ public Future createPoLine(CompositePoLine compPoLine, Composit .compose(v -> generateLineNumber(compOrder, requestContext)) .map(lineNumber -> line.put(PO_LINE_NUMBER, lineNumber)) .compose(v -> updateSearchLocations(compPoLine, requestContext)) + .map(v -> line.put(SEARCH_LOCATION_IDS, compPoLine.getSearchLocationIds())) .compose(v -> createPoLineSummary(compPoLine, line, requestContext)); }