svn commit: r1844959 - in /ofbiz/ofbiz-plugins/branches/release17.12/webpos: src/main/java/org/apache/ofbiz/webpos/search/WebPosSearch.java template/search/SearchPartiesResults.ftl webapp/webpos/images/js/SearchPartiesResults.js

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1844959 - in /ofbiz/ofbiz-plugins/branches/release17.12/webpos: src/main/java/org/apache/ofbiz/webpos/search/WebPosSearch.java template/search/SearchPartiesResults.ftl webapp/webpos/images/js/SearchPartiesResults.js

surajk
Author: surajk
Date: Sat Oct 27 12:51:03 2018
New Revision: 1844959

URL: http://svn.apache.org/viewvc?rev=1844959&view=rev
Log:
Fixed: Multiple records are shown in search modal in webpos.
(OFBIZ-10314)
Thanks Archana Asthana for reporting and Shikha Jaiswal for providing the patch.

Modified:
    ofbiz/ofbiz-plugins/branches/release17.12/webpos/src/main/java/org/apache/ofbiz/webpos/search/WebPosSearch.java
    ofbiz/ofbiz-plugins/branches/release17.12/webpos/template/search/SearchPartiesResults.ftl
    ofbiz/ofbiz-plugins/branches/release17.12/webpos/webapp/webpos/images/js/SearchPartiesResults.js

Modified: ofbiz/ofbiz-plugins/branches/release17.12/webpos/src/main/java/org/apache/ofbiz/webpos/search/WebPosSearch.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/branches/release17.12/webpos/src/main/java/org/apache/ofbiz/webpos/search/WebPosSearch.java?rev=1844959&r1=1844958&r2=1844959&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/branches/release17.12/webpos/src/main/java/org/apache/ofbiz/webpos/search/WebPosSearch.java (original)
+++ ofbiz/ofbiz-plugins/branches/release17.12/webpos/src/main/java/org/apache/ofbiz/webpos/search/WebPosSearch.java Sat Oct 27 12:51:03 2018
@@ -146,6 +146,9 @@ public class WebPosSearch {
         andExprs.add(EntityCondition.makeCondition("partyTypeId", EntityOperator.EQUALS, "PERSON"));
         andExprs.add(EntityCondition.makeCondition("contactMechTypeId", EntityOperator.EQUALS, "POSTAL_ADDRESS"));
         
+        if (UtilValidate.isNotEmpty(shippingLocation) && "N".equalsIgnoreCase(shippingLocation) && UtilValidate.isNotEmpty(billingLocation) && "N".equalsIgnoreCase(billingLocation)) {
+           andExprs.add(EntityCondition.makeCondition("contactMechPurposeTypeId", EntityOperator.IN, UtilMisc.toList("SHIPPING_LOCATION", "BILLING_LOCATION")));
+        }
         mainCond = EntityCondition.makeCondition(andExprs, EntityOperator.AND);
         
         orderBy.add("lastName");

Modified: ofbiz/ofbiz-plugins/branches/release17.12/webpos/template/search/SearchPartiesResults.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/branches/release17.12/webpos/template/search/SearchPartiesResults.ftl?rev=1844959&r1=1844958&r2=1844959&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/branches/release17.12/webpos/template/search/SearchPartiesResults.ftl (original)
+++ ofbiz/ofbiz-plugins/branches/release17.12/webpos/template/search/SearchPartiesResults.ftl Sat Oct 27 12:51:03 2018
@@ -67,6 +67,7 @@ under the License.
           <td><b>${uiLabelMap.PartyPartyId}</b></td>
           <td><b>${uiLabelMap.PartyLastName}</b></td>
           <td><b>${uiLabelMap.PartyFirstName}</b></td>
+          <td><b>${uiLabelMap.PartyPartyIdentification}</b></td>
           <td><b>${uiLabelMap.PartyAddressLine1}</b></td>
           <td><b>${uiLabelMap.PartyCity}</b></td>
           <td><b>${uiLabelMap.PartyPostalCode}</b></td>

Modified: ofbiz/ofbiz-plugins/branches/release17.12/webpos/webapp/webpos/images/js/SearchPartiesResults.js
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/branches/release17.12/webpos/webapp/webpos/images/js/SearchPartiesResults.js?rev=1844959&r1=1844958&r2=1844959&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/branches/release17.12/webpos/webapp/webpos/images/js/SearchPartiesResults.js (original)
+++ ofbiz/ofbiz-plugins/branches/release17.12/webpos/webapp/webpos/images/js/SearchPartiesResults.js Sat Oct 27 12:51:03 2018
@@ -77,6 +77,7 @@ function buildPartiesResults(parties, fr
         }
         lastName = checkNull(party.lastName);
         firstName = checkNull(party.firstName);
+        partyIdentificationNumber = checkNull(party.idValue);
         address1 = checkNull(party.address1);
         city = checkNull(party.city);
         postalCode = checkNull(party.postalCode);
@@ -99,6 +100,7 @@ function buildPartiesResults(parties, fr
         tableList = tableList + "<td><a href=\"javascript:setParty(\'" + party.partyId + "\', \'" + party.contactMechId + "\', \'" + party.contactMechPurposeTypeId +"\');\">" + party.partyId + "</a></td>";
         tableList = tableList + "<td><a href=\"javascript:setParty(\'" + party.partyId + "\', \'" + party.contactMechId + "\', \'" + party.contactMechPurposeTypeId +"\');\">" + lastName + "</a></td>";
         tableList = tableList + "<td><a href=\"javascript:setParty(\'" + party.partyId + "\', \'" + party.contactMechId + "\', \'" + party.contactMechPurposeTypeId +"\');\">" + firstName + "</a></td>";
+        tableList = tableList + "<td>" + partyIdentificationNumber + "</td>";
         tableList = tableList + "<td>" + address1 + "</td>";
         tableList = tableList + "<td>" + city + "</td>";
         tableList = tableList + "<td>" + postalCode + "</td>";