%@ page import="org.apache.commons.lang.StringEscapeUtils" defaultCodec="html" %> <% def comparator = { a,b -> def pickItemsA = pickListItemsByRequisition[a.id]?.sort { pickA, pickB -> pickA.binLocation?.name <=> pickB.binLocation?.name } def pickItemsB = pickListItemsByRequisition[b.id]?.sort { pickA, pickB -> pickA.binLocation?.name <=> pickB.binLocation?.name } def itemA = pickItemsA ? pickItemsA[0] : null def itemB = pickItemsB ? pickItemsB[0] : null def nameA = itemA?.binLocation?.name def nameB = itemB?.binLocation?.name def orderA = itemA?.sortOrder def orderB = itemB?.sortOrder /* null is > than string */ /* if both names are null or both names are equal, then compare sortOrder */ return !nameA ? !nameB ? orderA <=> orderB : 1 : !nameB ? -1 : nameA <=> nameB ?: orderA <=> orderB } %>
${groupName} |
|||||||||
| ${warehouse.message(code: 'product.productCode.label')} | ${warehouse.message(code: 'product.label')} | ${warehouse.message(code: 'requisitionItem.quantityRequested.label')} | ${warehouse.message(code: 'inventoryItem.lotNumber.label')} | ${warehouse.message(code: 'inventoryItem.expirationDate.label')} | ${warehouse.message(code: 'inventoryLevel.binLocation.label')} | ${warehouse.message(code: 'requisitionItem.suggestedPick.label')} | ${warehouse.message(code:'requisitionItem.confirmedPick.label')} | ${warehouse.message(code:'stockMovement.comments.label')} | |
|---|---|---|---|---|---|---|---|---|---|
|
|
|||||||||
| ${i + 1} |
${requisitionItem?.parentRequisitionItem?.product?.productCode}
${requisitionItem?.product?.productCode}
|
${StringEscapeUtils.escapeXml(requisitionItem?.parentRequisitionItem?.product?.name)}
${StringEscapeUtils.escapeXml(requisitionItem?.product?.name)}
|
${requisitionItem?.parentRequisitionItem?.quantity ?: 0}
${requisitionItem?.parentRequisitionItem?.product?.unitOfMeasure ?: "EA"}
${requisitionItem?.quantity ?: 0} ${requisitionItem?.product?.unitOfMeasure ?: "EA"}
|
|
|
${picklistItems[j]?.binLocation?.name}
|
|
<% j++ %> | |