Author: sichen
Date: Fri Feb 16 07:49:44 2007 New Revision: 508458 URL: http://svn.apache.org/viewvc?view=rev&rev=508458 Log: Setting additional shipping charge in PackOrder screen: Added additionalShippingCharge field in FTL Added additionalShippingCharge optional parameter to completePack service Added additionalShippingCharge field/accessor/mutator to PackingSession class, and passing it in the createShipment method Modified: ofbiz/trunk/applications/product/servicedef/services_shipment.xml ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingServices.java ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java ofbiz/trunk/applications/product/webapp/facility/shipment/PackOrder.ftl Modified: ofbiz/trunk/applications/product/servicedef/services_shipment.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services_shipment.xml?view=diff&rev=508458&r1=508457&r2=508458 ============================================================================== --- ofbiz/trunk/applications/product/servicedef/services_shipment.xml (original) +++ ofbiz/trunk/applications/product/servicedef/services_shipment.xml Fri Feb 16 07:49:44 2007 @@ -420,6 +420,7 @@ <attribute name="packingSession" type="org.ofbiz.shipment.packing.PackingSession" mode="IN" optional="false"/> <attribute name="handlingInstructions" type="String" mode="IN" optional="true"/> <attribute name="pickerPartyId" type="String" mode="IN" optional="true"/> + <attribute name="additionalShippingCharge" type="Double" mode="IN" optional="true"/> <attribute name="forceComplete" type="Boolean" mode="IN" optional="true"/> <attribute name="shipmentId" type="String" mode="OUT" optional="false"/> </service> Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingServices.java?view=diff&rev=508458&r1=508457&r2=508458 ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingServices.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingServices.java Fri Feb 16 07:49:44 2007 @@ -205,8 +205,10 @@ // set the instructions -- will clear out previous if now null String instructions = (String) context.get("handlingInstructions"); String pickerPartyId = (String) context.get("pickerPartyId"); + Double additionalShippingCharge = (Double) context.get("additionalShippingCharge"); session.setHandlingInstructions(instructions); session.setPickerPartyId(pickerPartyId); + session.setAdditionalShippingCharge(additionalShippingCharge); Boolean force = (Boolean) context.get("forceComplete"); if (force == null) { Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java?view=diff&rev=508458&r1=508457&r2=508458 ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java Fri Feb 16 07:49:44 2007 @@ -57,6 +57,7 @@ protected String facilityId = null; protected String shipmentId = null; protected String instructions = null; + protected Double additionalShippingCharge; protected List packEvents = null; protected List packLines = null; protected int packageSeq = -1; @@ -663,6 +664,7 @@ newShipment.put("statusId", "SHIPMENT_INPUT"); newShipment.put("handlingInstructions", instructions); newShipment.put("picklistBinId", picklistBinId); + newShipment.put("additionalShippingCharge", additionalShippingCharge); newShipment.put("userLogin", userLogin); Debug.log("Creating new shipment with context: " + newShipment, module); Map newShipResp = this.getDispatcher().runSync("createShipment", newShipment); @@ -760,5 +762,13 @@ } } } + } + + public Double getAdditionalShippingCharge() { + return additionalShippingCharge; + } + + public void setAdditionalShippingCharge(Double additionalShippingCharge) { + this.additionalShippingCharge = additionalShippingCharge; } } Modified: ofbiz/trunk/applications/product/webapp/facility/shipment/PackOrder.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/shipment/PackOrder.ftl?view=diff&rev=508458&r1=508457&r2=508458 ============================================================================== --- ofbiz/trunk/applications/product/webapp/facility/shipment/PackOrder.ftl (original) +++ ofbiz/trunk/applications/product/webapp/facility/shipment/PackOrder.ftl Fri Feb 16 07:49:44 2007 @@ -265,6 +265,14 @@ <table border='0' cellpadding='2' cellspacing='0' width="100%"> <tr> <td> + <div class="tableheadtext">${uiLabelMap.ProductAdditionalShippingCharge}</div> + <div> + <input type="text" class="inputBox" name="additionalShippingCharge" value="${packingSession.getAdditionalShippingCharge()?if_exists}" size="10"/> + </div> + </td> + </tr> + <tr> + <td> <div class="tableheadtext">${uiLabelMap.ProductHandlingInstructions}:</div> <div> <textarea name="handlingInstructions" class="inputBox" rows="2" cols="30">${packingSession.getHandlingInstructions()?if_exists}</textarea> |
Free forum by Nabble | Edit this page |