You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by su...@apache.org on 2018/10/27 13:02:13 UTC
svn commit: r1844965 - in /ofbiz/branches/release16.11/specialpurpose/webpos:
src/main/java/org/apache/ofbiz/webpos/search/WebPosSearch.java
template/search/SearchPartiesResults.ftl
webapp/webpos/images/js/SearchPartiesResults.js
Author: surajk
Date: Sat Oct 27 13:02:13 2018
New Revision: 1844965
URL: http://svn.apache.org/viewvc?rev=1844965&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/branches/release16.11/specialpurpose/webpos/src/main/java/org/apache/ofbiz/webpos/search/WebPosSearch.java
ofbiz/branches/release16.11/specialpurpose/webpos/template/search/SearchPartiesResults.ftl
ofbiz/branches/release16.11/specialpurpose/webpos/webapp/webpos/images/js/SearchPartiesResults.js
Modified: ofbiz/branches/release16.11/specialpurpose/webpos/src/main/java/org/apache/ofbiz/webpos/search/WebPosSearch.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release16.11/specialpurpose/webpos/src/main/java/org/apache/ofbiz/webpos/search/WebPosSearch.java?rev=1844965&r1=1844964&r2=1844965&view=diff
==============================================================================
--- ofbiz/branches/release16.11/specialpurpose/webpos/src/main/java/org/apache/ofbiz/webpos/search/WebPosSearch.java (original)
+++ ofbiz/branches/release16.11/specialpurpose/webpos/src/main/java/org/apache/ofbiz/webpos/search/WebPosSearch.java Sat Oct 27 13:02:13 2018
@@ -145,7 +145,10 @@ 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/branches/release16.11/specialpurpose/webpos/template/search/SearchPartiesResults.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/release16.11/specialpurpose/webpos/template/search/SearchPartiesResults.ftl?rev=1844965&r1=1844964&r2=1844965&view=diff
==============================================================================
--- ofbiz/branches/release16.11/specialpurpose/webpos/template/search/SearchPartiesResults.ftl (original)
+++ ofbiz/branches/release16.11/specialpurpose/webpos/template/search/SearchPartiesResults.ftl Sat Oct 27 13:02:13 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/branches/release16.11/specialpurpose/webpos/webapp/webpos/images/js/SearchPartiesResults.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/release16.11/specialpurpose/webpos/webapp/webpos/images/js/SearchPartiesResults.js?rev=1844965&r1=1844964&r2=1844965&view=diff
==============================================================================
--- ofbiz/branches/release16.11/specialpurpose/webpos/webapp/webpos/images/js/SearchPartiesResults.js (original)
+++ ofbiz/branches/release16.11/specialpurpose/webpos/webapp/webpos/images/js/SearchPartiesResults.js Sat Oct 27 13:02:13 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>";