Author: hansbak
Date: Fri Mar 30 06:38:11 2012
New Revision: 1307283
URL: http://svn.apache.org/viewvc?rev=1307283&view=rev
Log:
enable searching orders by payment status
Modified:
ofbiz/trunk/applications/order/servicedef/services.xml
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/FindOrders.groovy
ofbiz/trunk/applications/order/webapp/ordermgr/order/findOrders.ftl
Modified: ofbiz/trunk/applications/order/servicedef/services.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/servicedef/services.xml?rev=1307283&r1=1307282&r2=1307283&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/order/servicedef/services.xml Fri Mar 30 06:38:11
2012
@@ -828,6 +828,7 @@ under the License.
<attribute name="finAccountId" type="String" mode="IN"
optional="true"/>
<attribute name="cardNumber" type="String" mode="IN" optional="true"/>
<attribute name="accountNumber" type="String" mode="IN"
optional="true"/>
+ <attribute name="paymentStatusId" type="String" mode="IN"
optional="true"/>
<!-- shipment/inventory fields -->
<attribute name="inventoryItemId" type="String" mode="IN"
optional="true"/>
Modified:
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java?rev=1307283&r1=1307282&r2=1307283&view=diff
==============================================================================
---
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java
(original)
+++
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java
Fri Mar 30 06:38:11 2012
@@ -411,11 +411,17 @@ public class OrderLookupServices {
String finAccountId = (String) context.get("finAccountId");
String cardNumber = (String) context.get("cardNumber");
String accountNumber = (String) context.get("accountNumber");
+ String paymentStatusId = (String) context.get("paymentStatusId");
- if (finAccountId != null || cardNumber != null || accountNumber !=
null) {
+ if (UtilValidate.isNotEmpty(paymentStatusId)) {
+ paramList.add("paymentStatusId=" + paymentStatusId);
+ conditions.add(makeExpr("paymentStatusId", paymentStatusId));
+ }
+ if (finAccountId != null || cardNumber != null || accountNumber !=
null || paymentStatusId != null) {
dve.addMemberEntity("OP", "OrderPaymentPreference");
dve.addAlias("OP", "finAccountId");
dve.addAlias("OP", "paymentMethodId");
+ dve.addAlias("OP", "paymentStatusId", "statusId", null, false,
false, null);
dve.addViewLink("OH", "OP", Boolean.FALSE, UtilMisc.toList(new
ModelKeyMap("orderId", "orderId")));
}
Modified:
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/FindOrders.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/FindOrders.groovy?rev=1307283&r1=1307282&r2=1307283&view=diff
==============================================================================
---
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/FindOrders.groovy
(original)
+++
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/FindOrders.groovy
Fri Mar 30 06:38:11 2012
@@ -52,6 +52,10 @@ context.salesChannels = channels;
carrierShipmentMethods = delegator.findList("CarrierShipmentMethod", null,
null, null, null, false);
context.carrierShipmentMethods = carrierShipmentMethods;
+// get the Payment Status
+paymentStatusList = delegator.findByAnd("StatusItem", [statusTypeId :
"PAYMENT_PREF_STATUS"], ["description"]);
+context.paymentStatusList = paymentStatusList;
+
// current role type
currentRoleTypeId = request.getParameter("roleTypeId");
if (currentRoleTypeId) {
Modified: ofbiz/trunk/applications/order/webapp/ordermgr/order/findOrders.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/order/findOrders.ftl?rev=1307283&r1=1307282&r2=1307283&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/order/findOrders.ftl
(original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/order/findOrders.ftl Fri Mar
30 06:38:11 2012
@@ -458,6 +458,18 @@ function toggleOrderIdList() {
</select>
</td>
</tr>
+ <tr>
+ <td width='25%' align='right'
class='label'>${uiLabelMap.AccountingPaymentStatus}</td>
+ <td width="5%"> </td>
+ <td>
+ <select name="paymentStatusId">
+ <option value="">${uiLabelMap.CommonAll}</option>
+ <#list paymentStatusList as paymentStatus>
+ <option
value="${paymentStatus.statusId}">${paymentStatus.get("description",
locale)}</option>
+ </#list>
+ </select>
+ </td>
+ </tr>
<tr><td colspan="3"><hr /></td></tr>
<tr>
<td width='25%' align='right'> </td>