Author: buscob
Date: Sat May 1 07:12:21 2010
New Revision: 939938
URL: http://svn.apache.org/viewvc?rev=939938&view=rev
Log:
A patch from Blas Rodriguez Somoza
OFBIZ-3701 - Errors (with visible stacktraces) in screen: Order -> Order List
-> Select (a sales order) -> Edit items
https://issues.apache.org/jira/browse/OFBIZ-3701
Fixed two errors in "edit items" from a sales order with visible stacktraces
Error 1 - Expression orderItemStatus.statusDatetime is undefined on line 133,
column 37 in component://order/webapp/ordermgr/order/editorderitems.ftl
Error 2 - Expression catalogCol is undefined on line 37, column 18 in
component://order/webapp/ordermgr/order/appendorderitem.ftl.
Modified:
ofbiz/trunk/applications/order/webapp/ordermgr/order/appendorderitem.ftl
ofbiz/trunk/applications/order/webapp/ordermgr/order/editorderitems.ftl
Modified:
ofbiz/trunk/applications/order/webapp/ordermgr/order/appendorderitem.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/order/appendorderitem.ftl?rev=939938&r1=939937&r2=939938&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/order/appendorderitem.ftl
(original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/order/appendorderitem.ftl
Sat May 1 07:12:21 2010
@@ -34,14 +34,17 @@ under the License.
<div class="screenlet-body">
<form method="post" action="<@ofbizUrl>appendItemToOrder</@ofbizUrl>"
name="appendItemForm">
<input type="hidden" size="25" name="orderId"
value="${orderId?if_exists}"/>
- <#if catalogCol?size == 1>
+ <#if !catalogCol?has_content>
+ <input type="hidden" name="prodCatalogId" value=""/>
+ </#if>
+ <#if catalogCol?has_content && catalogCol?size == 1>
<input type="hidden" name="prodCatalogId"
value="${catalogCol.first}"/>
</#if>
<#if shipGroups?size == 1>
<input type="hidden" name="shipGroupSeqId"
value="${shipGroups.first.shipGroupSeqId}"/>
</#if>
<table class="basic-table" cellspacing="0">
- <#if (catalogCol?size > 1)>
+ <#if catalogCol?has_content && (catalogCol?size > 1)>
<tr>
<td class="label">${uiLabelMap.ProductChooseCatalog}</td>
<td><select name='prodCatalogId'>
@@ -55,13 +58,12 @@ under the License.
</#if>
<tr>
<td class="label">${uiLabelMap.ProductProductId}</td>
- <td><input type="text" size="25" name="productId"
value="${requestParameters.productId?if_exists}"/>
+ <td>
+ <#-- FIXME Problem here: the input field is shared -->
+ <@htmlTemplate.lookupField formName="appendItemForm"
name="productId" id="productId" fieldFormName="LookupProduct"
presentation="window"/>
<#if "PURCHASE_ORDER" == orderHeader.orderTypeId>
<a
href="javascript:quicklookup(document.appendItemForm.orderId)"
class="buttontext">${uiLabelMap.OrderQuickLookup}</a>
</#if>
- <#-- FIXME Problem here: the input field is shared -->
- <@htmlTemplate.lookupField formName="appendItemForm"
name="productId" id="productId" fieldFormName="LookupProduct"
presentation="window"/>
- <img
src="<@ofbizContentUrl>/images/fieldlookup.gif</@ofbizContentUrl>" width="15"
height="14" border="0" alt="${uiLabelMap.CommonClickHereForFieldLookup}"/>
</td>
</tr>
<tr>
Modified:
ofbiz/trunk/applications/order/webapp/ordermgr/order/editorderitems.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/order/editorderitems.ftl?rev=939938&r1=939937&r2=939938&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/order/editorderitems.ftl
(original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/order/editorderitems.ftl Sat
May 1 07:12:21 2010
@@ -20,16 +20,6 @@ under the License.
<#if orderHeader?has_content>
-<#-- Order Items changes to basic-table style -->
-<style type="text/css">
-.order-items .header-row td {
-border-bottom: none;
-}
-.order-items tr .button-col {
-float: right;
-}
-</style>
-
<#-- price change rules -->
<#assign allowPriceChange = false/>
<#if (orderHeader.orderTypeId == 'PURCHASE_ORDER' ||
security.hasEntityPermission("ORDERMGR", "_SALES_PRICEMOD", session))>
@@ -64,14 +54,14 @@ float: right;
</#if>
<table class="basic-table order-items" cellspacing="0">
<tr class="header-row">
- <td width="30%">${uiLabelMap.ProductProduct}</td>
- <td width="30%">${uiLabelMap.CommonStatus}</td>
- <td width="5%"
class="align-text">${uiLabelMap.OrderQuantity}</td>
- <td width="10%"
class="align-text">${uiLabelMap.OrderUnitPrice}</td>
- <td width="10%"
class="align-text">${uiLabelMap.OrderAdjustments}</td>
- <td width="10%"
class="align-text">${uiLabelMap.OrderSubTotal}</td>
- <td width="2%"> </td>
- <td width="3%"> </td>
+ <td width="30%"
style="border-bottom:none;">${uiLabelMap.ProductProduct}</td>
+ <td width="30%"
style="border-bottom:none;">${uiLabelMap.CommonStatus}</td>
+ <td width="5%" style="border-bottom:none;"
class="align-text">${uiLabelMap.OrderQuantity}</td>
+ <td width="10%" style="border-bottom:none;"
class="align-text">${uiLabelMap.OrderUnitPrice}</td>
+ <td width="10%" style="border-bottom:none;"
class="align-text">${uiLabelMap.OrderAdjustments}</td>
+ <td width="10%" style="border-bottom:none;"
class="align-text">${uiLabelMap.OrderSubTotal}</td>
+ <td width="2%" style="border-bottom:none;"> </td>
+ <td width="3%" style="border-bottom:none;"> </td>
</tr>
<#list orderItemList as orderItem>
<#if orderItem.productId?exists> <#-- a null product may
come from a quote -->
@@ -130,7 +120,8 @@ float: right;
<#assign orderItemStatuses =
orderReadHelper.getOrderItemStatuses(orderItem)>
<#list orderItemStatuses as orderItemStatus>
<#assign loopStatusItem =
orderItemStatus.getRelatedOne("StatusItem")>
-
${orderItemStatus.statusDatetime.toString()} ${loopStatusItem.get("description",locale)?default(orderItemStatus.statusId)}<br
/>
+ <#if
orderItemStatus.statusDatetime?has_content>${orderItemStatus.statusDatetime.toString()}</#if>
+
${loopStatusItem.get("description",locale)?default(orderItemStatus.statusId)}<br
/>
</#list>
<#assign returns =
orderItem.getRelated("ReturnItem")?if_exists>
<#if returns?has_content>