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

<#if product?has_content> ${uiLabelMap.ManufacturingBomSimulation}

${uiLabelMap.ManufacturingBomType}   ${uiLabelMap.ProductProductId}   <@htmlTemplate.lookupField value="${productId!}" formName="searchform" name="productId" id="productId" fieldFormName="LookupProduct"/> ${uiLabelMap.ManufacturingShowBOMAssocs}
  ${uiLabelMap.ManufacturingCopyToProductId}   <@htmlTemplate.lookupField formName="searchform" name="copyToProductId" id="copyToProductId" fieldFormName="LookupProduct"/> ${uiLabelMap.ManufacturingCopyBOMAssocs}

<#if !(productAssoc??)> <#else> <#assign curProductAssocType = productAssoc.getRelatedOne("ProductAssocType", true)>
${uiLabelMap.ManufacturingBomType}  
${uiLabelMap.ProductProductId}   <@htmlTemplate.lookupField value="${productId!}" formName="editProductAssocForm" name="productId" id="productId2" fieldFormName="LookupProduct"/>
${uiLabelMap.ManufacturingProductIdTo}   <@htmlTemplate.lookupField value="${productIdTo!}" formName="editProductAssocForm" name="productIdTo" id="productIdTo" fieldFormName="LookupProduct"/>
${uiLabelMap.CommonFromDate}   <@htmlTemplate.renderDateTimeField name="fromDate" event="" action="" className="" alert="" title="Format: yyyy-MM-dd HH:mm:ss.SSS" value="${nowTimestamp}" size="25" maxlength="50" id="fromDate_1" dateType="date" shortDateInput=false timeDropdownParamName="" defaultDateTimeString="" localizedIconTitle="" timeDropdown="" timeHourName="" classString="" hour1="" hour2="" timeMinutesName="" minutes="" isTwelveHour="" ampmName="" amSelected="" pmSelected="" compositeType="" formName=""/> (${uiLabelMap.ManufacturingWillBeSetToNow})
${uiLabelMap.ProductProductId}   ${productId!}
${uiLabelMap.ManufacturingProductIdTo}   ${productIdTo!}
${uiLabelMap.ManufacturingBomType}   <#if curProductAssocType??>${(curProductAssocType.get("description",locale))!}<#else> ${productAssocTypeId!}
${uiLabelMap.CommonFromDate}   ${fromDate!}
${uiLabelMap.CommonThruDate}   <#if useValues> <#assign value= productAssoc.thruDate!> <#else> <#assign value= request.getParameter("thruDate")!> <@htmlTemplate.renderDateTimeField value="${value!''}" name="thruDate" className="" event="" action="" alert="" title="Format: yyyy-MM-dd HH:mm:ss.SSS" size="30" maxlength="30" id="fromDate_2" dateType="date" shortDateInput=false timeDropdownParamName="" defaultDateTimeString="" localizedIconTitle="" timeDropdown="" timeHourName="" classString="" hour1="" hour2="" timeMinutesName="" minutes="" isTwelveHour="" ampmName="" amSelected="" pmSelected="" compositeType="" formName=""/>
${uiLabelMap.CommonSequenceNum}   value="${(productAssoc.sequenceNum)!}"<#else>value="${(request.getParameter("sequenceNum"))!}" size="5" maxlength="10"/>
${uiLabelMap.ManufacturingReason}   value="${(productAssoc.reason)!}"<#else>value="${(request.getParameter("reason"))!}" size="60" maxlength="255"/>
${uiLabelMap.ManufacturingInstruction}   value="${(productAssoc.instruction)!}"<#else>value="${(request.getParameter("instruction"))!}" size="60" maxlength="255"/>
${uiLabelMap.ManufacturingQuantity}   value="${(productAssoc.quantity)!}"<#else>value="${(request.getParameter("quantity"))!}" size="10" maxlength="15"/>
${uiLabelMap.ManufacturingScrapFactor}   value="${(productAssoc.scrapFactor)!}"<#else>value="${(request.getParameter("scrapFactor"))!}" size="10" maxlength="15"/>
${uiLabelMap.ManufacturingFormula}  
${uiLabelMap.ManufacturingRoutingTask}   <#if useValues> <#assign value = productAssoc.routingWorkEffortId!> <#else> <#assign value = request.getParameter("routingWorkEffortId")!> <#if value?has_content> <@htmlTemplate.lookupField value="${value}" formName="editProductAssocForm" name="routingWorkEffortId" id="routingWorkEffortId" fieldFormName="LookupRoutingTask"/> <#else> <@htmlTemplate.lookupField formName="editProductAssocForm" name="routingWorkEffortId" id="routingWorkEffortId" fieldFormName="LookupRoutingTask"/>
  value="${uiLabelMap.CommonAdd}"<#else>value="${uiLabelMap.CommonEdit}"/>
<#if productId?? && product??>

<#assign alt_row = false> <#list assocFromProducts! as assocFromProduct> <#assign listToProduct = assocFromProduct.getRelatedOne("AssocProduct", true)> <#assign curProductAssocType = assocFromProduct.getRelatedOne("ProductAssocType", true)> <#assign product = assocFromProduct.getRelatedOne("AssocProduct", true)> <#if product.quantityUomId?has_content> <#assign quantityUom = product.getRelatedOne("QuantityUom", true)> class="alternate-row"> class="alert"> ${(assocFromProduct.fromDate)!}  class="alert"> ${(assocFromProduct.thruDate)!}  <#-- toggle the row color --> <#assign alt_row = !alt_row>
${uiLabelMap.ProductProductId} ${uiLabelMap.ProductProductName} ${uiLabelMap.CommonFromDate} ${uiLabelMap.CommonThruDate} ${uiLabelMap.CommonSequenceNum} ${uiLabelMap.CommonQuantity} ${uiLabelMap.ProductQuantityUom} ${uiLabelMap.ManufacturingScrapFactor} ${uiLabelMap.ManufacturingFormula} ${uiLabelMap.ManufacturingRoutingTask}    
${(assocFromProduct.productIdTo)!} <#if listToProduct??>${(listToProduct.internalName)!}   ${(assocFromProduct.sequenceNum)!}  ${(assocFromProduct.quantity)!}  <#if (quantityUom.abbreviation)?has_content> ${(quantityUom.abbreviation)!} <#else> ${(quantityUom.uomId)!}  ${(assocFromProduct.scrapFactor)!}  ${(assocFromProduct.estimateCalcMethod)!}  ${(assocFromProduct.routingWorkEffortId)!} ${uiLabelMap.CommonDelete} ${uiLabelMap.CommonEdit}

<#assign alt_row = false> <#list assocToProducts! as assocToProduct> <#assign listToProduct = assocToProduct.getRelatedOne("MainProduct", true)> <#assign curProductAssocType = assocToProduct.getRelatedOne("ProductAssocType", true)> class="alternate-row"> <#-- toggle the row color --> <#assign alt_row = !alt_row>
${uiLabelMap.ProductProductId} ${uiLabelMap.ProductProductName} ${uiLabelMap.CommonFromDate} ${uiLabelMap.CommonThruDate} ${uiLabelMap.CommonQuantity}  
${(assocToProduct.productId)!} <#if listToProduct??>${(listToProduct.internalName)!} ${(assocToProduct.getTimestamp("fromDate"))!}  ${(assocToProduct.getTimestamp("thruDate"))!}  ${(assocToProduct.quantity)!}  " class="buttontext"> ${uiLabelMap.CommonDelete}

${uiLabelMap.CommonNote}: ${uiLabelMap.CommonRed} ${uiLabelMap.ManufacturingNote1} ${uiLabelMap.CommonRed}${uiLabelMap.ManufacturingNote2} ${uiLabelMap.CommonRed}${uiLabelMap.ManufacturingNote3}