[OFBiz] SVN: r6671 - in trunk/applications/order: config webapp/ordermgr/WEB-INF/actions/return webapp/ordermgr/return
sichen@svn.ofbiz.org
sichen at svn.ofbiz.org
Fri Feb 3 14:35:19 CST 2006
Author: sichen
Date: 2006-02-03 14:35:07 -0600 (Fri, 03 Feb 2006)
New Revision: 6671
Modified:
trunk/applications/order/config/OrderUiLabels.properties
trunk/applications/order/webapp/ordermgr/WEB-INF/actions/return/returnHeader.bsh
trunk/applications/order/webapp/ordermgr/WEB-INF/actions/return/returnItems.bsh
trunk/applications/order/webapp/ordermgr/return/returnHeader.ftl
trunk/applications/order/webapp/ordermgr/return/returnItemInc.ftl
trunk/applications/order/webapp/ordermgr/return/returnItems.ftl
Log:
Fixed return address issue. Now can view and select address. Also changed edit return items to edit the inventory item status, not the return status OFBIZ-684 is done.
Modified: trunk/applications/order/config/OrderUiLabels.properties
===================================================================
--- trunk/applications/order/config/OrderUiLabels.properties 2006-02-02 23:27:43 UTC (rev 6670)
+++ trunk/applications/order/config/OrderUiLabels.properties 2006-02-03 20:35:07 UTC (rev 6671)
@@ -86,6 +86,7 @@
OrderInvoices = Invoices
OrderIsThisGift = Is This a Gift?
OrderIssuedToShipmentItem = Issued to Shipment Item
+OrderItemStatus = Item Status
OrderItemTotal = Item Total
OrderItemsBackOrdered = Items Backordered
OrderItemsOrdered = Items Ordered
@@ -256,6 +257,7 @@
OrderReturnHeader = Return Header
OrderReturnId = Return ID
OrderReturnItems = Return Items
+OrderReturnToAddress = Return To Address
OrderReturnToFacility = Return To Facility
OrderReturnTotal = Return Total
OrderReturned = Returned
Modified: trunk/applications/order/webapp/ordermgr/WEB-INF/actions/return/returnHeader.bsh
===================================================================
--- trunk/applications/order/webapp/ordermgr/WEB-INF/actions/return/returnHeader.bsh 2006-02-02 23:27:43 UTC (rev 6670)
+++ trunk/applications/order/webapp/ordermgr/WEB-INF/actions/return/returnHeader.bsh 2006-02-03 20:35:07 UTC (rev 6671)
@@ -35,6 +35,8 @@
returnId = parameters.get("returnId");
returnHeader = null;
+addressEditable = true;
+postalAddressFrom = null;
if (returnId != null) {
returnHeader = delegator.findByPrimaryKey("ReturnHeader", UtilMisc.toMap("returnId", returnId));
if (returnHeader != null) {
@@ -42,6 +44,9 @@
toPartyId = parameters.get("toPartyId");
currentStatus = returnHeader.getRelatedOne("StatusItem");
context.put("currentStatus", currentStatus);
+ // user can change fromAddress as long as the ReturnHeader hasn't been accepted( returnStatus==Requested )
+ addressEditable = "RETURN_REQUESTED".equals(currentStatus.get("statusId"));
+ postalAddressFrom = returnHeader.getRelatedOne("PostalAddress");
currentAccount = returnHeader.getRelatedOne("BillingAccount");
context.put("currentAccount", currentAccount);
currentFacility = returnHeader.getRelatedOne("Facility");
@@ -52,6 +57,7 @@
}
context.put("returnHeader", returnHeader);
context.put("returnId", returnId);
+context.put("addressEditable", addressEditable);
currencyUom = null;
if (returnHeader != null) {
@@ -98,8 +104,9 @@
// from address
-postalAddresses = ContactMechWorker.getPartyPostalAddresses(request, partyId, "_NA_");
-if (postalAddresses.size() > 0) context.put("postalAddressFrom", postalAddresses.get(0).get("postalAddress"));
+addresses = ContactMechWorker.getPartyPostalAddresses(request, partyId, "_NA_");
+context.put("addresses", addresses);
+context.put("postalAddressFrom", postalAddressFrom);
if (returnHeader != null) {
postalAddressTo = null;
Modified: trunk/applications/order/webapp/ordermgr/WEB-INF/actions/return/returnItems.bsh
===================================================================
--- trunk/applications/order/webapp/ordermgr/WEB-INF/actions/return/returnItems.bsh 2006-02-02 23:27:43 UTC (rev 6670)
+++ trunk/applications/order/webapp/ordermgr/WEB-INF/actions/return/returnItems.bsh 2006-02-03 20:35:07 UTC (rev 6671)
@@ -47,9 +47,9 @@
returnTypes = delegator.findAll("ReturnType", UtilMisc.toList("sequenceId"));
context.put("returnTypes", returnTypes);
-returnStatus = delegator.findByAnd("StatusItem", UtilMisc.toMap("statusTypeId", "ORDER_RETURN_STTS"),
+itemStatus = delegator.findByAnd("StatusItem", UtilMisc.toMap("statusTypeId", "INV_SERIALIZED_STTS"),
UtilMisc.toList("statusId", "description"));
-context.put("returnStatus", returnStatus);
+context.put("itemStatus", itemStatus);
returnReasons = delegator.findAll("ReturnReason", UtilMisc.toList("sequenceId"));
context.put("returnReasons", returnReasons);
Modified: trunk/applications/order/webapp/ordermgr/return/returnHeader.ftl
===================================================================
--- trunk/applications/order/webapp/ordermgr/return/returnHeader.ftl 2006-02-02 23:27:43 UTC (rev 6670)
+++ trunk/applications/order/webapp/ordermgr/return/returnHeader.ftl 2006-02-03 20:35:07 UTC (rev 6671)
@@ -191,26 +191,32 @@
<td width='14%'> </td>
<td width='6%' align='right' valign='top' nowrap><div class="tabletext">${uiLabelMap.OrderReturnFromAddress}</div></td>
<td width='6%'> </td>
+ <td width='74%'><div class='tabletext'>
+ <#if (addressEditable)>
+ <#list addresses as address >
+ <@displayAddress postalAddress = address.postalAddress editable = true/>
+ </#list>
+ <input type='radio' name="originContactMechId" value="" <#if (!postalAddressFrom?has_content)> checked="checked"</#if>>${uiLabelMap.CommonNoAddress}
+ <#else>
+ <#if (postalAddressFrom?has_content)>
+ <@displayAddress postalAddress = postalAddressFrom editable = false />
+ <#else>
+ ${uiLabelMap.CommonNoAddress}
+ </#if>
+ </#if>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td width='14%'> </td>
+ <td width='6%' align='right' valign='top' nowrap><div class="tabletext">${uiLabelMap.OrderReturnToAddress}</div></td>
+ <td width='6%'> </td>
<td width='74%'>
- <#if postalAddresses?has_content>
- <#list postalAddresses as postalAddressInfo>
- <#assign postalAddress = postalAddressInfo.postalAddress>
- <div class="tabletext">
- <input type='radio' name="originContactMechId" value="${postalAddress.contactMechId}" <#if returnHeader.originContactMechId?default("") == postalAddress.contactMechId>checked="checked"</#if>>
- <#if postalAddress.toName?has_content><b>To:</b> ${postalAddress.toName}<br/></#if>
- <#if postalAddress.attnName?has_content> <b>Attn:</b> ${postalAddress.attnName}<br/></#if>
- <#if postalAddress.address1?has_content> ${postalAddress.address1}<br/></#if>
- <#if postalAddress.address2?has_content> ${postalAddress.address2}<br/></#if>
- <#if postalAddress.city?has_content> ${postalAddress.city}</#if>
- <#if postalAddress.stateProvinceGeoId?has_content><br/> ${postalAddress.stateProvinceGeoId}</#if>
- <#if postalAddress.postalCode?has_content><br/> ${postalAddress.postalCode}</#if>
- <#if postalAddress.countryGeoId?has_content><br/> ${postalAddress.countryGeoId}</#if>
- </div>
- </#list>
- </#if>
- <div class='tabletext'><input type='radio' name="originContactMechId" value="">${uiLabelMap.CommonNoAddress}</div>
- </td>
- </tr>
+ <#if (postalAddressTo?has_content)>
+ <@displayAddress postalAddress = postalAddressTo editable=false />
+ </#if>
+ </td>
+ </tr>
<tr>
<td width='14%'> </td>
<td width='6%'> </td>
@@ -231,3 +237,21 @@
</tr>
</#if>
</table>
+<#macro displayAddress postalAddress editable>
+ <#if postalAddress?has_content>
+ <div class="tabletext">
+ <#if (editable)>
+ <input type='radio' name="originContactMechId" value="${postalAddress.contactMechId?if_exists}"
+ <#if ( postalAddressFrom?has_content && postalAddressFrom.contactMechId?default("") == postalAddress.contactMechId)>checked="checked"</#if>>
+ </#if>
+ <#if postalAddress.toName?has_content><b>To:</b> ${postalAddress.toName}<br/></#if>
+ <#if postalAddress.attnName?has_content><b>Attn:</b> ${postalAddress.attnName}<br/></#if>
+ <#if postalAddress.address1?has_content> ${postalAddress.address1}<br/></#if>
+ <#if postalAddress.address2?has_content> ${postalAddress.address2}<br/></#if>
+ <#if postalAddress.city?has_content> ${postalAddress.city}</#if>
+ <#if postalAddress.stateProvinceGeoId?has_content> ${postalAddress.stateProvinceGeoId}</#if>
+ <#if postalAddress.postalCode?has_content> ${postalAddress.postalCode}</#if>
+ <#if postalAddress.countryGeoId?has_content><br/> ${postalAddress.countryGeoId}</#if>
+ </div>
+ </#if>
+</#macro>
Modified: trunk/applications/order/webapp/ordermgr/return/returnItemInc.ftl
===================================================================
--- trunk/applications/order/webapp/ordermgr/return/returnItemInc.ftl 2006-02-02 23:27:43 UTC (rev 6670)
+++ trunk/applications/order/webapp/ordermgr/return/returnItemInc.ftl 2006-02-03 20:35:07 UTC (rev 6671)
@@ -41,7 +41,7 @@
<td><div class="tableheadtext">Return Price*</div></td>
<td><div class="tableheadtext">Return Reason</div></td>
<td><div class="tableheadtext">Return Type</div></td>
- <td><div class="tableheadtext">Item Status</div></td>
+ <td><div class="tableheadtext">${uiLabelMap.OrderItemStatus}</div></td>
<td align="right"><div class="tableheadtext">Include?</div></td>
</tr>
<tr><td colspan="9"><hr class="sepbar"></td></tr>
Modified: trunk/applications/order/webapp/ordermgr/return/returnItems.ftl
===================================================================
--- trunk/applications/order/webapp/ordermgr/return/returnItems.ftl 2006-02-02 23:27:43 UTC (rev 6670)
+++ trunk/applications/order/webapp/ordermgr/return/returnItems.ftl 2006-02-03 20:35:07 UTC (rev 6671)
@@ -45,7 +45,7 @@
<td><div class="tableheadtext">Return Qty</div></td>
<td><div class="tableheadtext">Return Price</div></td>
<td><div class="tableheadtext">Reason</div></td>
- <td><div class="tableheadtext">${uiLabelMap.CommonReturnStatus}</div></td>
+ <td><div class="tableheadtext">${uiLabelMap.OrderItemStatus}</div></td>
<td><div class="tableheadtext">${uiLabelMap.CommonType}</div></td>
<td><div class="tableheadtext">Response</div></td>
<td> </td>
@@ -61,7 +61,7 @@
<#assign orderHeader = item.getRelatedOne("OrderHeader")?if_exists>
<#assign returnReason = item.getRelatedOne("ReturnReason")?if_exists>
<#assign returnType = item.getRelatedOne("ReturnType")?if_exists>
- <#assign status = item.getRelatedOne("StatusItem")?if_exists>
+ <#assign status = item.getRelatedOne("InventoryStatusItem")?if_exists>
<#if (item.get("returnQuantity")?exists && item.get("returnPrice")?exists)>
<#assign returnTotal = returnTotal + item.get("returnQuantity") * item.get("returnPrice") >
</#if>
@@ -118,13 +118,13 @@
<#if readOnly>
${status.description?default("N/A")}
<#else>
- <select name="statusId_o_${rowCount}" class='selectBox'>
+ <select name="expectedItemStatus_o_${rowCount}" class='selectBox'>
<#if (status?has_content)>
<option value="${status.statusId}">${status.description?if_exists}</option>
<option value="${status.statusId}">--</option>
</#if>
- <#list returnStatus as returnStatusItem>
- <option value="${returnStatusItem.statusId}">${returnStatusItem.description?if_exists}</option>
+ <#list itemStatus as returnItemStatus>
+ <option value="${returnItemStatus.statusId}">${returnItemStatus.description?if_exists}</option>
</#list>
</select>
</#if>
More information about the Svn
mailing list