Skip to content

Commit

Permalink
Merge pull request #4585 from hmislk/Issue#4583
Browse files Browse the repository at this point in the history
closes #4583
  • Loading branch information
DamithDeshan authored Apr 15, 2024
2 parents 6096442 + 8ed07b3 commit ab936cc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/main/java/com/divudi/bean/common/SearchController.java
Original file line number Diff line number Diff line change
Expand Up @@ -1755,7 +1755,12 @@ public void createPharmacyTableRe() {
sql += " and ((b.total) like :total )";
m.put("total", "%" + getSearchKeyword().getTotal().trim().toUpperCase() + "%");
}


if (getSearchKeyword().getPatientPhone() != null && !getSearchKeyword().getPatientPhone().trim().equals("")) {
sql += " and ((b.patient.person.phone) like :phone )";
m.put("phone", "%" + getSearchKeyword().getPatientPhone().trim().toUpperCase() + "%");
}

sql += " order by b.createdAt desc ";
//
// //////System.out.println("sql = " + sql);
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/persistence.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<persistence version="2.2" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_2.xsd">
<persistence-unit name="hmisPU" transaction-type="JTA">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<jta-data-source>jdbc/arogyaNew</jta-data-source>
<jta-data-source>jdbc/arogya</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="eclipselink.logging.level.sql" value="SEVERE"/>
Expand Down
2 changes: 2 additions & 0 deletions src/main/webapp/pharmacy/pharmacy_search_sale_pre_bill.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
<p:inputText autocomplete="off" value="#{searchController.searchKeyword.billNo}" class="w-100"/>
<h:outputLabel value="Patient Name"/>
<p:inputText autocomplete="off" value="#{searchController.searchKeyword.patientName}" class="w-100"/>
<h:outputLabel value="Patient Phone Number"/>
<p:inputText autocomplete="off" value="#{searchController.searchKeyword.patientPhone}" class="w-100"/>
<h:outputLabel value="Department Name"/>
<p:inputText autocomplete="off" value="#{searchController.searchKeyword.department}" class="w-100"/>
<h:outputLabel value="Total"/>
Expand Down

0 comments on commit ab936cc

Please sign in to comment.