⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 receiveinventory.ftl

📁 国外的一套开源CRM
💻 FTL
📖 第 1 页 / 共 2 页
字号:
<#--
 *  Copyright (c) 2003 The Open For Business Project - www.ofbiz.org
 *
 *  Permission is hereby granted, free of charge, to any person obtaining a 
 *  copy of this software and associated documentation files (the "Software"), 
 *  to deal in the Software without restriction, including without limitation 
 *  the rights to use, copy, modify, merge, publish, distribute, sublicense, 
 *  and/or sell copies of the Software, and to permit persons to whom the 
 *  Software is furnished to do so, subject to the following conditions:
 *
 *  The above copyright notice and this permission notice shall be included 
 *  in all copies or substantial portions of the Software.
 *
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 
 *  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
 *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
 *  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
 *  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT 
 *  OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR 
 *  THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 *
 *@author     Andy Zeneski (jaz@ofbiz.org)
 *@author     Catherine.Heintz@nereide.biz (migration to UiLabel)
 *@version    $Revision: 1.6 $
 *@since      2.2
-->
<#assign uiLabelMap = requestAttributes.uiLabelMap>
<#if security.hasEntityPermission("FACILITY", "_CREATE", session)>

<#if invalidProductId?exists>
<div class='errorMessage'>${invalidProductId}</div>
</#if>

${pages.get("/facility/FacilityTabBar.ftl")}

<div class="head1">${uiLabelMap.ProductReceiveInventory} <span class='head2'>into&nbsp;<#if facility?has_content>"${facility.facilityName?default("Not Defined")}"</#if> [${uiLabelMap.CommonId} :${facility.facilityId?if_exists}]</span></div>
<a href="<@ofbizUrl>/EditFacility</@ofbizUrl>" class="buttontext">[${uiLabelMap.ProductNewFacility}]</a>

<script language='JavaScript'>
    function setNow(field) { eval('document.selectAllForm.' + field + '.value="${Static["org.ofbiz.base.util.UtilDateTime"].nowTimestamp().toString()}"'); }
</script>

<div>&nbsp;</div>

<#-- Receiving Results -->
<#if receivedItems?has_content>
  <table width="100%" border='0' cellpadding='2' cellspacing='0'>
    <tr><td colspan="7"><div class="head3">${uiLabelMap.ProductReceiptPurchaseOrder} # ${purchaseOrder.orderId}</div></td></tr>
    <tr><td colspan="7"><hr class="sepbar"></td></tr>
    <tr>
      <td><div class="tableheadtext">${uiLabelMap.ProductReceipt}#</div></td>
      <td><div class="tableheadtext">${uiLabelMap.CommonDate}</div></td>
      <td><div class="tableheadtext">${uiLabelMap.ProductPo} #</div></td>
      <td><div class="tableheadtext">${uiLabelMap.ProductLine} #</div></td>
      <td><div class="tableheadtext">${uiLabelMap.ProductProductId}</div></td>
      <td><div class="tableheadtext">${uiLabelMap.CommonRejected}</div></td>
      <td><div class="tableheadtext">${uiLabelMap.CommonAccepted}</div></td>
    </tr>
    <tr><td colspan="7"><hr class="sepbar"></td></tr>
    <#list receivedItems as item>
      <tr>
        <td><div class="tabletext">${item.receiptId}</div></td>
        <td><div class="tabletext">${item.getString("datetimeReceived").toString()}</div></td>
        <td><div class="tabletext">${item.orderId}</div></td>
        <td><div class="tabletext">${item.orderItemSeqId}</div></td>
        <td><div class="tabletext">${item.productId?default("Not Found")}</div></td>
        <td><div class="tabletext">${item.quantityRejected?default(0)?string.number}</div></td>
        <td><div class="tabletext">${item.quantityAccepted?string.number}</div></td>
      </tr>
    </#list>
    <tr><td colspan="7"><hr class="sepbar"></td></tr>
  </table>
  <br>
</#if>

<#-- Single Product Receiving -->
<#if requestParameters.initialSelected?exists && product?has_content>
  <form method="post" action="<@ofbizUrl>/receiveInventoryProduct</@ofbizUrl>" name='selectAllForm' style='margin: 0;'>
    <table border='0' cellpadding='2' cellspacing='0'>
      <#-- general request fields -->
      <input type="hidden" name="facilityId" value="${requestParameters.facilityId?if_exists}">   
      <input type="hidden" name="purchaseOrderId" value="${requestParameters.purchaseOrderId?if_exists}">   
      <#-- special service fields -->
      <input type="hidden" name="productId_o_0" value="${requestParameters.productId?if_exists}">
      <input type="hidden" name="facilityId_o_0" value="${requestParameters.facilityId?if_exists}">      
      <input type="hidden" name="_rowCount" value="1">
      <#if purchaseOrder?has_content>
      <input type="hidden" name="orderId_o_0" value="${purchaseOrder.orderId}">
      <input type="hidden" name="orderItemSeqId_o_0" value="${firstOrderItem.orderItemSeqId}">
      <tr>
        <td width='14%'>&nbsp;</td>
        <td width='6%' align='right' nowrap><div class="tabletext">${uiLabelMap.ProductPurchaseOrder}</div></td>
        <td width='6%'>&nbsp;</td>
        <td width='74%'>
          <b>${purchaseOrder.orderId}</b>&nbsp;/&nbsp;<b>${firstOrderItem.orderItemSeqId}</b>
          <#if 1 < purchaseOrderItemsSize>
            <span class='tabletext'>(${uiLabelMap.ProductMultipleOrderItemsProduct} - ${purchaseOrderItemsSize}:1 ${uiLabelMap.ProductItemProduct})</span>
          <#else>
            <span class='tabletext'>(${uiLabelMap.ProductSingleOrderItemProduct} - 1:1 ${uiLabelMap.ProductItemProduct})<span>
          </#if>
        </td>                
      </tr>
      </#if>
      <tr>
        <td width='14%'>&nbsp;</td>
        <td width='6%' align='right' nowrap><div class="tabletext">${uiLabelMap.ProductProductId}</div></td>
        <td width='6%'>&nbsp;</td>
        <td width='74%'>
          <b>${requestParameters.productId?if_exists}</b>
        </td>                
      </tr>
      <tr>
        <td width='14%'>&nbsp;</td>
        <td width='6%' align='right' nowrap><div class="tabletext">${uiLabelMap.ProductProductName}</div></td>
        <td width='6%'>&nbsp;</td>
        <td width='74%'>
          <div class="tabletext"><a href="/catalog/control/EditProduct?productId=${product.productId}${requestAttributes.externalKeyParam?if_exists}" target="catalog" class="buttontext">${product.internalName?if_exists}</a></div>
        </td>                
      </tr>
      <tr>
        <td width='14%'>&nbsp;</td>
        <td width='6%' align='right' nowrap><div class="tabletext">${uiLabelMap.ProductProductDescription}</div></td>
        <td width='6%'>&nbsp;</td>
        <td width='74%'>
          <div class="tabletext">${product.description?if_exists}</div>
        </td>                
      </tr>	
      <tr>
        <td width='14%'>&nbsp;</td>
        <td width='6%' align='right' nowrap><div class="tabletext">${uiLabelMap.ProductItemDescription}</div></td>
        <td width='6%'>&nbsp;</td>
        <td width='74%'>
          <input type='text' name='itemDescription_o_0' size='30' maxlength='60' class="inputBox">
        </td>                
      </tr>	
      <tr>
        <td width='14%'>&nbsp;</td>
        <td width='6%' align='right' nowrap><div class="tabletext">${uiLabelMap.ProductInventoryItem} <br>(${uiLabelMap.ProductOptionalCreateNew})</div></td>
        <td width='6%'>&nbsp;</td>
        <td width='74%'>
          <input type='text' name='inventoryItemId_o_0' size='20' maxlength='20' class="inputBox">
        </td>                
      </tr>	
      <tr>
        <td width='14%'>&nbsp;</td>
        <td width='6%' align='right' nowrap><div class="tabletext">${uiLabelMap.ProductInventoryItemType} </div></td>
        <td width='6%'>&nbsp;</td>
        <td width='74%'>
          <select name="inventoryItemTypeId_o_0" size=1 class="selectBox">  
            <#list inventoryItemTypes as nextInventoryItemType>                      
              <option value='${nextInventoryItemType.inventoryItemTypeId}'>${nextInventoryItemType.description?default(nextInventoryItemType.inventoryItemTypeId)}</option>
            </#list>
          </select>
        </td>                
      </tr>	
      <tr>
        <td colspan="4">&nbsp;</td>
      </tr>
      <tr>
        <td width='14%'>&nbsp;</td>
        <td width='6%' align='right' nowrap><div class="tabletext">${uiLabelMap.ProductDateReceived}</div></td>
        <td width='6%'>&nbsp;</td>
        <td width='74%'>
          <input type='text' name='datetimeReceived_o_0' size='24' value="${Static["org.ofbiz.base.util.UtilDateTime"].nowTimestamp().toString()}" class="inputBox">
          <#-- <a href='#' onclick='setNow("datetimeReceived")' class='buttontext'>[Now]</a> -->
        </td>                
      </tr>	
      
      <#-- facility location(s) -->
      <#assign facilityLocations = (product.getRelatedByAnd("ProductFacilityLocation", Static["org.ofbiz.base.util.UtilMisc"].toMap("facilityId", facilityId)))?if_exists>
      <tr>
        <td width='14%'>&nbsp;</td>
        <td width='6%' align='right' nowrap><div class="tabletext">${uiLabelMap.ProductFacilityLocation}</div></td>
        <td width='6%'>&nbsp;</td>
        <td width='74%'>
          <#if facilityLocations?has_content>            
            <select name='locationSeqId_o_0' class='selectBox'>
              <#list facilityLocations as productFacilityLocation>
                <#assign facility = productFacilityLocation.getRelatedOneCache("Facility")>
                <#assign facilityLocation = productFacilityLocation.getRelatedOne("FacilityLocation")?if_exists>
                <#assign facilityLocationTypeEnum = (facilityLocation.getRelatedOneCache("TypeEnumeration"))?if_exists>
                <option value="${productFacilityLocation.locationSeqId}"><#if facilityLocation?exists>${facilityLocation.areaId?if_exists}:${facilityLocation.aisleId?if_exists}:${facilityLocation.sectionId?if_exists}:${facilityLocation.levelId?if_exists}:${facilityLocation.positionId?if_exists}</#if><#if facilityLocationTypeEnum?exists>(${facilityLocationTypeEnum.description})</#if>[${productFacilityLocation.locationSeqId}]</option>                              
              </#list>
              <option value="">${uiLabelMap.ProductNoLocation}</option>
            </select>
          <#else>
            <input type='text' name='locationSeqId_o_0' size='20' maxlength="20" class="inputBox">
          </#if>
        </td>                
      </tr>	
      <tr>
        <td width='14%'>&nbsp;</td>
        <td width='6%' align='right' nowrap><div class="tabletext">${uiLabelMap.ProductRejectedReason}</div></td>
        <td width='6%'>&nbsp;</td>
        <td width='74%'>
          <select name="rejectionId_o_0" size='1' class='selectBox'>   
            <option></option>    
            <#list rejectReasons as nextRejection>                 
              <option value='${nextRejection.rejectionId}'>${nextRejection.description?default(nextRejection.rejectionId)}</option>
            </#list>
          </select>
        </td>                
      </tr>	
      <tr>
        <td width='14%'>&nbsp;</td>
        <td width='6%' align='right' nowrap><div class="tabletext">${uiLabelMap.ProductQuantityRejected}</div></td>
        <td width='6%'>&nbsp;</td>
        <td width='74%'>
          <input type='text' name='quantityRejected_o_0' size='5' value='0' class="inputBox">
        </td>                
      </tr>	
      <tr>
        <td width='14%'>&nbsp;</td>
        <td width='6%' align='right' nowrap><div class="tabletext">${uiLabelMap.ProductQuantityAccepted}</div></td>
        <td width='6%'>&nbsp;</td>
        <td width='74%'>
          <input type='text' name='quantityAccepted_o_0' size='5' value='${defaultQuantity?default(1)?string.number}' class="inputBox">
        </td>                
      </tr>	
      <tr>
        <td colspan='2'>&nbsp;</td>
        <td colspan='2'><input type="submit" value="${uiLabelMap.CommonReceive}"></td>
      </tr>        				
    </table>
    <script language='JavaScript'>
      document.selectAllForm.quantityAccepted.focus();
    </script>
  </form>
  
<#-- Select Shipment Screen -->
<#elseif requestParameters.initialSelected?exists && !requestParameters.shipmentId?exists && shipments?has_content>
  <form method="post" action="<@ofbizUrl>/ReceiveInventory</@ofbizUrl>" name='selectAllForm' style='margin: 0;'>
    <#-- general request fields -->
    <input type="hidden" name="facilityId" value="${requestParameters.facilityId?if_exists}">   
    <input type="hidden" name="purchaseOrderId" value="${requestParameters.purchaseOrderId?if_exists}">
    <input type="hidden" name="initialSelected" value="Y">
    <table width="100%" border='0' cellpadding='2' cellspacing='0'>
      <tr>
        <td>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -