Author: mor
Date: Tue Jul  7 13:55:48 2009
New Revision: 791837

URL: http://svn.apache.org/viewvc?rev=791837&view=rev
Log:
On Order Detail Page Actions block added one more action i.e. Receive. This is 
also used to receive purchase order. Only difference with existing screens is 
that the 
Qty. Received defaults to zero so that user can do changes manually.

Modified:
    ofbiz/trunk/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl
    
ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/ReceiveInventory.groovy
    
ofbiz/trunk/applications/product/webapp/facility/inventory/receiveInventory.ftl

Modified: 
ofbiz/trunk/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl?rev=791837&r1=791836&r2=791837&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl 
(original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl 
Tue Jul  7 13:55:48 2009
@@ -81,6 +81,20 @@
                     <input type="submit" class="smallSubmit" 
value="${uiLabelMap.OrderQuickReceivePurchaseOrder}"/>
                   </li>
                 </form>
+                <form name="receivePurchaseOrderForm" 
action="/facility/control/quickShipPurchaseOrder?externalLoginKey=${externalLoginKey}"
 method="post">
+                  <input type="hidden" name="initialSelected" value="Y"/>
+                  <input type="hidden" name="orderId" value="${orderId}"/>
+                  <input type="hidden" name="purchaseOrderId" 
value="${orderId}"/>
+                  <input type="hidden" name="partialReceive" value="Y"/>
+                  <li>
+                    <select name="facilityId">
+                      <#list ownedFacilities as facility>
+                        <option 
value="${facility.facilityId}">${facility.facilityName}</option>
+                      </#list>
+                    </select>
+                    <a 
href="javascript:document.receivePurchaseOrderForm.submit()" 
class="buttontext">${uiLabelMap.CommonReceive}</a>
+                  </li>
+                </form>
               <#else>
                 <form name="receiveInventoryForm" 
action="/facility/control/ReceiveInventory" method="POST">
                   <input type="hidden" name="initialSelected" value="Y"/>
@@ -94,6 +108,19 @@
                     <a 
href="javascript:document.receiveInventoryForm.submit()" 
class="buttontext">${uiLabelMap.OrderQuickReceivePurchaseOrder}</a>
                   </li>
                 </form>
+                <form name="partialReceiveInventoryForm" 
action="/facility/control/ReceiveInventory" method="post">
+                  <input type="hidden" name="initialSelected" value="Y"/>
+                  <input type="hidden" name="purchaseOrderId" 
value="${orderId?if_exists}"/>
+                  <input type="hidden" name="partialReceive" value="Y"/>
+                  <li>
+                    <select name="facilityId">
+                      <#list ownedFacilities as facility>
+                        <option 
value="${facility.facilityId}">${facility.facilityName}</option>
+                      </#list>
+                    </select>
+                    <a 
href="javascript:document.partialReceiveInventoryForm.submit()" 
class="buttontext">${uiLabelMap.CommonReceive}</a>
+                  </li>
+                </form>
               </#if>
               <#if orderHeader.statusId != "ORDER_COMPLETED">
                 <form 
action="<@ofbizUrl>completePurchaseOrder?externalLoginKey=${externalLoginKey}</@ofbizUrl>"
 method="POST">

Modified: 
ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/ReceiveInventory.groovy
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/ReceiveInventory.groovy?rev=791837&r1=791836&r2=791837&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/ReceiveInventory.groovy
 (original)
+++ 
ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/ReceiveInventory.groovy
 Tue Jul  7 13:55:48 2009
@@ -26,6 +26,11 @@
 productId = request.getParameter("productId");
 shipmentId = request.getParameter("shipmentId");
 
+partialReceive = parameters.partialReceive;
+if (partialReceive) {
+    context.partialReceive = partialReceive;
+}
+
 facility = null;
 if (facilityId) {
     facility = delegator.findOne("Facility", [facilityId : facilityId], false);

Modified: 
ofbiz/trunk/applications/product/webapp/facility/inventory/receiveInventory.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/inventory/receiveInventory.ftl?rev=791837&r1=791836&r2=791837&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/product/webapp/facility/inventory/receiveInventory.ftl 
(original)
+++ 
ofbiz/trunk/applications/product/webapp/facility/inventory/receiveInventory.ftl 
Tue Jul  7 13:55:48 2009
@@ -239,6 +239,7 @@
             <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"/>
+            <input type="hidden" name="partialReceive" 
value="${partialReceive?if_exists}"/>
             <table class="basic-table" cellspacing="0">
               <#list shipments?if_exists as shipment>
                 <#assign originFacility = 
shipment.getRelatedOneCache("OriginFacility")?if_exists/>
@@ -381,7 +382,7 @@
                           </td>
                           <td align="right">${uiLabelMap.ProductQtyReceived} 
:</td>
                           <td align="right">
-                            <input type="text" 
name="quantityAccepted_o_${rowCount}" size="6" 
value="${defaultQuantity?string.number}"/>
+                            <input type="text" 
name="quantityAccepted_o_${rowCount}" size="6" value=<#if 
partialReceive?exists>"0"<#else>"${defaultQuantity?string.number}"</#if>/>
                           </td>
                         </tr>
                         <tr>


Reply via email to