diff --git a/applications/party/webapp/partymgr/party/SerializedInventorySummary.ftl b/applications/party/webapp/partymgr/party/SerializedInventorySummary.ftl index 9de37c0f84..e1b43974fc 100644 --- a/applications/party/webapp/partymgr/party/SerializedInventorySummary.ftl +++ b/applications/party/webapp/partymgr/party/SerializedInventorySummary.ftl @@ -37,7 +37,7 @@ under the License. <#list inventoryItemList as inventoryItem> <#assign product = inventoryItem.getRelatedOne('Product')?if_exists> - ${inventoryItem.inventoryItemId} + ${inventoryItem.inventoryItemId} <#if product?has_content> <#if product.isVariant?default('N') == 'Y'> diff --git a/applications/product/webapp/catalog/product/ProductForms.xml b/applications/product/webapp/catalog/product/ProductForms.xml index c66e1ac9e7..e418106905 100644 --- a/applications/product/webapp/catalog/product/ProductForms.xml +++ b/applications/product/webapp/catalog/product/ProductForms.xml @@ -25,13 +25,13 @@ under the License.
+ default-title-style="tableheadtext" default-widget-style="inputBox"> - + diff --git a/applications/product/webapp/facility/WEB-INF/actions/inventory/EditInventoryItem.bsh b/applications/product/webapp/facility/WEB-INF/actions/inventory/EditInventoryItem.bsh deleted file mode 100644 index 6c42ecf334..0000000000 --- a/applications/product/webapp/facility/WEB-INF/actions/inventory/EditInventoryItem.bsh +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import java.util.*; -import java.io.*; -import org.ofbiz.entity.*; -import org.ofbiz.base.util.*; -import org.ofbiz.widget.html.*; - -delegator = request.getAttribute("delegator"); - - -parameterMap = UtilHttp.getParameterMap(request); - -facilityId = request.getParameter("facilityId"); -locationSeqId = request.getParameter("locationSeqId"); - -session.removeAttribute("inventoryItemId"); - -boolean tryEntity = true; -if (request.getAttribute("_ERROR_MESSAGE_") != null) tryEntity = false; - -inventoryItemId = request.getParameter("inventoryItemId"); -if (UtilValidate.isEmpty(inventoryItemId) && UtilValidate.isNotEmpty((String) request.getAttribute("inventoryItemId"))) { - inventoryItemId = request.getAttribute("inventoryItemId"); -} - -inventoryItem = delegator.findByPrimaryKey("InventoryItem", UtilMisc.toMap("inventoryItemId", inventoryItemId)); -curStatusItem = null; -inventoryItemType = null; -facilityLocation = null; -facility = null; - -if(inventoryItem == null) { - tryEntity = false; -} else { - curStatusItem = inventoryItem.getRelatedOneCache("StatusItem"); - inventoryItemType = inventoryItem.getRelatedOneCache("InventoryItemType"); - facilityLocation = inventoryItem.getRelatedOne("FacilityLocation"); - facility = inventoryItem.getRelatedOne("Facility"); - if (facility != null && facilityId == null) { - facilityId = facility.getString("facilityId"); - parameters.put("facilityId", facilityId); - } - - //statuses - if ("NON_SERIAL_INV_ITEM".equals(inventoryItem.getString("inventoryItemTypeId"))) { - //do nothing for non-serialized inventory - } else if ("SERIALIZED_INV_ITEM".equals(inventoryItem.getString("inventoryItemTypeId"))) { - if (UtilValidate.isNotEmpty(inventoryItem.getString("statusId"))) { - statusChange = delegator.findByAnd("StatusValidChange", UtilMisc.toMap("statusId", inventoryItem.getString("statusId"))); - statusItems = new ArrayList(); - statusChangeIter = statusChange.iterator(); - while (statusChangeIter.hasNext()) { - iterStatusChange = statusChangeIter.next(); - iterStatusItem = delegator.findByPrimaryKey("StatusItem", UtilMisc.toMap("statusId", iterStatusChange.get("statusIdTo"))); - if (iterStatusItem != null) statusItems.add(iterStatusItem); - } - context.put("statusItems", statusItems); - } else { - //no status id, just get all statusItems - statusItems = delegator.findByAnd("StatusItem", UtilMisc.toMap("statusTypeId", "INV_SERIALIZED_STTS"), UtilMisc.toList("sequenceId")); - context.put("statusItems", statusItems); - } - } -} - -//inv item types -inventoryItemTypes = delegator.findAll("InventoryItemType", UtilMisc.toList("description")); - -//facilities -facilities = delegator.findAll("Facility", UtilMisc.toList("facilityName")); - -//get physicalInventoryAndVarianceDatas if this is a NON_SERIAL_INV_ITEM -if (inventoryItem != null && "NON_SERIAL_INV_ITEM".equals(inventoryItem.getString("inventoryItemTypeId"))) { - physicalInventoryAndVariances = delegator.findByAnd("PhysicalInventoryAndVariance", UtilMisc.toMap("inventoryItemId", inventoryItemId), UtilMisc.toList("-physicalInventoryDate", "-physicalInventoryId")); - physicalInventoryAndVarianceDatas = new ArrayList(physicalInventoryAndVariances.size()); - physicalInventoryAndVarianceIter = physicalInventoryAndVariances.iterator(); - while (physicalInventoryAndVarianceIter.hasNext()) { - physicalInventoryAndVariance = physicalInventoryAndVarianceIter.next(); - physicalInventoryAndVarianceData = new HashMap(); - physicalInventoryAndVarianceDatas.add(physicalInventoryAndVarianceData); - - physicalInventoryAndVarianceData.put("physicalInventoryAndVariance", physicalInventoryAndVariance); - physicalInventoryAndVarianceData.put("varianceReason", physicalInventoryAndVariance.getRelatedOneCache("VarianceReason")); - physicalInventoryAndVarianceData.put("person", physicalInventoryAndVariance.getRelatedOne("Person")); - physicalInventoryAndVarianceData.put("partyGroup", physicalInventoryAndVariance.getRelatedOne("PartyGroup")); - } - - context.put("physicalInventoryAndVarianceDatas", physicalInventoryAndVarianceDatas); -} - -nowTimestampString = UtilDateTime.nowTimestamp().toString(); - -context.put("inventoryItem", inventoryItem); -context.put("inventoryItemId", inventoryItemId); -context.put("inventoryItemType", inventoryItemType); -context.put("curStatusItem", curStatusItem); -context.put("facilityLocation", facilityLocation); -context.put("facility", facility); -context.put("facilityId", facilityId); -context.put("locationSeqId", locationSeqId); -context.put("inventoryItemTypes", inventoryItemTypes); -context.put("facilities", facilities); -context.put("nowTimestampString", nowTimestampString); -context.put("tryEntity", tryEntity); -if (tryEntity) { - context.put("inventoryItemData", inventoryItem); -} else { - context.put("inventoryItemData", parameterMap); -} diff --git a/applications/product/webapp/facility/WEB-INF/actions/inventory/PhysicalInventoryVariance.bsh b/applications/product/webapp/facility/WEB-INF/actions/inventory/PhysicalInventoryVariance.bsh new file mode 100644 index 0000000000..b136be8ddb --- /dev/null +++ b/applications/product/webapp/facility/WEB-INF/actions/inventory/PhysicalInventoryVariance.bsh @@ -0,0 +1,41 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import java.util.*; +import org.ofbiz.entity.*; +import org.ofbiz.base.util.*; + +// get physicalInventoryAndVarianceDatas if this is a NON_SERIAL_INV_ITEM +if (inventoryItem != null && "NON_SERIAL_INV_ITEM".equals(inventoryItem.getString("inventoryItemTypeId"))) { + physicalInventoryAndVariances = delegator.findByAnd("PhysicalInventoryAndVariance", UtilMisc.toMap("inventoryItemId", inventoryItemId), UtilMisc.toList("-physicalInventoryDate", "-physicalInventoryId")); + physicalInventoryAndVarianceDatas = new ArrayList(physicalInventoryAndVariances.size()); + physicalInventoryAndVarianceIter = physicalInventoryAndVariances.iterator(); + while (physicalInventoryAndVarianceIter.hasNext()) { + physicalInventoryAndVariance = physicalInventoryAndVarianceIter.next(); + physicalInventoryAndVarianceData = new HashMap(); + physicalInventoryAndVarianceDatas.add(physicalInventoryAndVarianceData); + + physicalInventoryAndVarianceData.put("physicalInventoryAndVariance", physicalInventoryAndVariance); + physicalInventoryAndVarianceData.put("varianceReason", physicalInventoryAndVariance.getRelatedOneCache("VarianceReason")); + physicalInventoryAndVarianceData.put("person", physicalInventoryAndVariance.getRelatedOne("Person")); + physicalInventoryAndVarianceData.put("partyGroup", physicalInventoryAndVariance.getRelatedOne("PartyGroup")); + } + + context.put("physicalInventoryAndVarianceDatas", physicalInventoryAndVarianceDatas); +} diff --git a/applications/product/webapp/facility/inventory/EditInventoryItem.ftl b/applications/product/webapp/facility/inventory/EditInventoryItem.ftl deleted file mode 100644 index 13b99f3744..0000000000 --- a/applications/product/webapp/facility/inventory/EditInventoryItem.ftl +++ /dev/null @@ -1,246 +0,0 @@ -<#-- -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. ---> - -
${uiLabelMap.ProductEditInventoryItemWithId} [${inventoryItemId?if_exists}]
-${uiLabelMap.ProductNewInventoryItem} -<#if inventoryItemId?exists> - ${uiLabelMap.ProductTransferItem} - ${uiLabelMap.ProductInventoryDetails} - - -<#if inventoryItem?exists> - - - - - - - - -<#else> - <#if inventoryItemId?exists> - -
${uiLabelMap.ProductInventoryItemId}
  - ${inventoryItemId} ${uiLabelMap.ProductNotModificationRecrationInventoryItem} -
-

${uiLabelMap.ProductNotFindInventoryItemWithId} "${inventoryItemId}".

- <#else> - -
- - - - - - - - - - - - - - - - - - - - - - - <#if "SERIALIZED_INV_ITEM" == (inventoryItem.inventoryItemTypeId)?if_exists> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <#if "NON_SERIAL_INV_ITEM" == (inventoryItem.inventoryItemTypeId)?if_exists> - - - - - - <#elseif "SERIALIZED_INV_ITEM" == (inventoryItem.inventoryItemTypeId)?if_exists> - - - - - - <#elseif inventoryItem?exists> - - - - - - - - - - -
${uiLabelMap.ProductInventoryItemTypeId}
  - -
${uiLabelMap.ProductProductId}
  - - <#if (inventoryItem.productId)?has_content> - ${uiLabelMap.CommonEdit} ${uiLabelMap.ProductProduct} ${inventoryItem.productId} - <#else> - " width="16" height="16" border="0" alt="Lookup"/> - -
${uiLabelMap.PartyPartyId}
  - - Lookup -
${uiLabelMap.ProductFacilityOwner}
  - - Lookup -
${uiLabelMap.ProductStatus}
  - -
${uiLabelMap.ProductDateReceived}
  - - Calendar -
${uiLabelMap.ProductExpireDate}
  - - Calendar -
${uiLabelMap.ProductFacilityContainer}
  - ${uiLabelMap.ProductSelectFacility} : - - <#if (inventoryItem.facilityId)?has_content> - ${uiLabelMap.ProductEditFacility} [${inventoryItem.facilityId}] - -
- ${uiLabelMap.ProductOrEnterContainerId} : - -
${uiLabelMap.ProductFacilityLocation}
  - <#if facilityLocation?exists> -
- ${uiLabelMap.ProductArea} : ${facilityLocation.areaId?if_exists} - ${uiLabelMap.ProductAisle} : ${facilityLocation.aisleId?if_exists} - ${uiLabelMap.ProductSection} : ${facilityLocation.sectionId?if_exists} - ${uiLabelMap.ProductLevel} : ${facilityLocation.levelId?if_exists} - ${uiLabelMap.ProductPosition}: ${facilityLocation.positionId?if_exists} -
- - <#if inventoryItem?exists> - - - - " width="15" height="14" border="0" alt="Click here For Field Lookup"/> - - -  ${uiLabelMap.ProductFindLocation} - <#else> - - - - " width="15" height="14" border="0" alt="Click here For Field Lookup"/> - - - -
${uiLabelMap.ProductLotId}
 
${uiLabelMap.ProductUomId}
 
${uiLabelMap.ProductBinNumber}
 
${uiLabelMap.ProductPerUnitPrice}
 
${uiLabelMap.ProductComments}
 
 
${uiLabelMap.ProductSoftIdentifier}
 
${uiLabelMap.ProductActivationNumber}
 
${uiLabelMap.ProductAvailablePromiseQuantityHand}
  -
${inventoryItemData.availableToPromiseTotal?if_exists} / ${inventoryItemData.quantityOnHandTotal?if_exists}
-
${uiLabelMap.ProductPhysicalInventoryVariance}
-
${uiLabelMap.ProductSerialNumber}
 
${uiLabelMap.ProductSerialAtpQoh}
 
${uiLabelMap.ProductErrorType} [${inventoryItem.inventoryItemTypeId?if_exists}] ${uiLabelMap.ProductUnknownSpecifyType}.
 
- diff --git a/applications/product/webapp/facility/inventory/InventoryForms.xml b/applications/product/webapp/facility/inventory/InventoryForms.xml index 6964194750..eb430e3215 100644 --- a/applications/product/webapp/facility/inventory/InventoryForms.xml +++ b/applications/product/webapp/facility/inventory/InventoryForms.xml @@ -20,8 +20,79 @@ under the License. +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ default-title-style="tableheadtext" default-widget-style="inputBox" default-tooltip-style="tabletext"> diff --git a/applications/product/widget/facility/FacilityScreens.xml b/applications/product/widget/facility/FacilityScreens.xml index eed334f033..911da7e865 100644 --- a/applications/product/widget/facility/FacilityScreens.xml +++ b/applications/product/widget/facility/FacilityScreens.xml @@ -454,8 +454,11 @@ under the License. - -