Author: jacopoc
Date: Fri Jul 6 07:02:39 2007 New Revision: 553882 URL: http://svn.apache.org/viewvc?view=rev&rev=553882 Log: Added new product store field to make the default value for ReturnHeader.needsInventoryReceive configurable on the Product Store. Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/orderview.bsh ofbiz/trunk/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl ofbiz/trunk/applications/order/webapp/ordermgr/return/quickReturn.ftl ofbiz/trunk/applications/product/entitydef/entitymodel.xml ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreForms.xml Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/orderview.bsh URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/orderview.bsh?view=diff&rev=553882&r1=553881&r2=553882 ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/orderview.bsh (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/orderview.bsh Fri Jul 6 07:02:39 2007 @@ -275,7 +275,13 @@ if ("SALES_ORDER".equals(orderType)) { context.put("returnHeaderTypeId", "CUSTOMER_RETURN"); // also set the product store facility Id for sales orders - context.put("storeFacilityId", orderHeader.getRelatedOne("ProductStore").getString("inventoryFacilityId")); + GenericValue productStore = orderHeader.getRelatedOne("ProductStore"); + context.put("storeFacilityId", productStore.getString("inventoryFacilityId")); + if (UtilValidate.isNotEmpty(productStore.getString("reqReturnInventoryReceive"))) { + context.put("needsInventoryReceive", productStore.getString("reqReturnInventoryReceive")); + } else { + context.put("needsInventoryReceive", "Y"); + } } else { context.put("returnHeaderTypeId", "VENDOR_RETURN"); } 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?view=diff&rev=553882&r1=553881&r2=553882 ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl Fri Jul 6 07:02:39 2007 @@ -374,7 +374,7 @@ </#if> <#if security.hasEntityPermission("ORDERMGR", "_RETURN", session) && orderHeader.statusId == "ORDER_COMPLETED"> <div><a href="<@ofbizUrl>quickRefundOrder?orderId=${orderId}&receiveReturn=true&returnHeaderTypeId=${returnHeaderTypeId}</@ofbizUrl>" class="buttontext">${uiLabelMap.OrderQuickRefundEntireOrder}</a></div> - <div><a href="<@ofbizUrl>quickreturn?orderId=${orderId}&party_id=${partyId?if_exists}&returnHeaderTypeId=${returnHeaderTypeId}</@ofbizUrl>" class="buttontext">${uiLabelMap.OrderCreateReturn}</a></div> + <div><a href="<@ofbizUrl>quickreturn?orderId=${orderId}&party_id=${partyId?if_exists}&returnHeaderTypeId=${returnHeaderTypeId}&needsInventoryReceive=${needsInventoryReceive?default("Y")}</@ofbizUrl>" class="buttontext">${uiLabelMap.OrderCreateReturn}</a></div> </#if> </#if> </td> Modified: ofbiz/trunk/applications/order/webapp/ordermgr/return/quickReturn.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/return/quickReturn.ftl?view=diff&rev=553882&r1=553881&r2=553882 ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/return/quickReturn.ftl (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/return/quickReturn.ftl Fri Jul 6 07:02:39 2007 @@ -30,7 +30,7 @@ <input type="hidden" name="fromPartyId" value="${party.partyId}"/> <input type="hidden" name="toPartyId" value="${toPartyId?if_exists}"/> <input type="hidden" name="orderId" value="${orderId}"/> - <input type="hidden" name="needsInventoryReceive" value="Y"/> + <input type="hidden" name="needsInventoryReceive" value="${parameters.needsInventoryReceive?default("Y")}"/> <input type="hidden" name="destinationFacilityId" value="${destinationFacilityId}"/> <input type="hidden" name="returnHeaderTypeId" value="CUSTOMER_RETURN"/> <#if (orderHeader?has_content) && (orderHeader.currencyUom?has_content)> Modified: ofbiz/trunk/applications/product/entitydef/entitymodel.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/entitydef/entitymodel.xml?view=diff&rev=553882&r1=553881&r2=553882 ============================================================================== --- ofbiz/trunk/applications/product/entitydef/entitymodel.xml (original) +++ ofbiz/trunk/applications/product/entitydef/entitymodel.xml Fri Jul 6 07:02:39 2007 @@ -3287,6 +3287,7 @@ <field name="autoApproveOrder" type="indicator"><description>If N, orders will not be automatically approved when payment is authorized.</description></field> <field name="shipIfCaptureFails" type="indicator"><description>If N, the captureOrderPayments will cause a service error if credit card capture fails.</description></field> <field name="setOwnerUponIssuance" type="indicator"><description>If Y or empty, set the inventory item owner upon issuance.</description></field> + <field name="reqReturnInventoryReceive" type="indicator"><description>This is the default value for the ReturnHeader.needsInventoryReceive field.</description></field> <prim-key field="productStoreId"/> <relation type="one" fk-name="PROD_STR_PRSTRGP" title="Primary" rel-entity-name="ProductStoreGroup"> <key-map field-name="primaryStoreGroupId" rel-field-name="productStoreGroupId"/> Modified: ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreForms.xml?view=diff&rev=553882&r1=553881&r2=553882 ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreForms.xml (original) +++ ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreForms.xml Fri Jul 6 07:02:39 2007 @@ -262,6 +262,9 @@ <field name="setOwnerUponIssuance"> <drop-down allow-empty="true"><option key="Y" description="${uiLabelMap.CommonY}"/><option key="N" description="${uiLabelMap.CommonN}"/></drop-down> </field> + <field name="reqReturnInventoryReceive"> + <drop-down allow-empty="true"><option key="Y" description="${uiLabelMap.CommonY}"/><option key="N" description="${uiLabelMap.CommonN}"/></drop-down> + </field> <field name="submitButton" title="${uiLabelMap.CommonUpdate}"><submit button-type="button"/></field> </form> |
Free forum by Nabble | Edit this page |