Skip to content

Commit

Permalink
Merge pull request #6804 from hmislk/Issue#6625
Browse files Browse the repository at this point in the history
Issue#6625 Closes #6625
  • Loading branch information
DeshaniPubudu authored Aug 7, 2024
2 parents 0929f31 + cec7e70 commit c61be1c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 26 deletions.
6 changes: 6 additions & 0 deletions src/main/java/com/divudi/bean/common/SearchController.java
Original file line number Diff line number Diff line change
Expand Up @@ -4179,6 +4179,12 @@ private String createKeySqlSearchForPoCancel(HashMap tmp) {

private String createKeySql(HashMap tmp) {
String sql = "";

if (getSearchKeyword().getRequestNo()!= null && !getSearchKeyword().getRequestNo().trim().equals("")) {
sql += " and ((b.qutationNumber) like :qutNo )";
tmp.put("qutNo", "%" + getSearchKeyword().getRequestNo().trim().toUpperCase() + "%");
}

if (getSearchKeyword().getToInstitution() != null && !getSearchKeyword().getToInstitution().trim().equals("")) {
sql += " and ((b.toInstitution.name) like :toIns )";
tmp.put("toIns", "%" + getSearchKeyword().getToInstitution().trim().toUpperCase() + "%");
Expand Down
45 changes: 19 additions & 26 deletions src/main/webapp/store/store_purhcase_order_list_to_approve.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@
class="w-100 ui-button-warning my-2">
</p:commandButton>

<h:outputLabel value="Request No"/>
<p:inputText autocomplete="off" value="#{searchController.searchKeyword.requestNo}" class="w-100"/>
<h:outputLabel value="Distributor"/>
<p:inputText autocomplete="off" value="#{searchController.searchKeyword.toInstitution}" class="w-100"/>
<h:outputLabel value="Requested User"/>
Expand All @@ -82,23 +84,23 @@
<div class="col-10">
<p:dataTable id="tbl" value="#{searchController.bills}" var="b">

<p:column headerText="Requested at" >
<p:column headerText="Request No" >
<h:commandLink action="store_reprint_order_request" >
<h:outputLabel value="#{b.createdAt}" >
<f:convertDateTime timeZone="Asia/Colombo" pattern="#{sessionController.applicationPreference.longDateTimeFormat}" />
</h:outputLabel>
<h:outputLabel value="#{b.qutationNumber}" ></h:outputLabel>
<f:setPropertyActionListener value="#{b}" target="#{storeBillSearch.bill}"/>
</h:commandLink>
</p:column>
<p:column headerText="Requested at" >
<h:outputLabel value="#{b.createdAt}" >
<f:convertDateTime timeZone="Asia/Colombo" pattern="#{sessionController.applicationPreference.shortDateTimeFormat}" />
</h:outputLabel>
<br/>
<h:panelGroup rendered="#{b.cancelled}" >
<h:commandLink action="store_reprint_order_request" >
<h:outputLabel style="color: red;" value="Cancelled at " />
<h:outputLabel style="color: red;" rendered="#{b.cancelled}"
value="#{b.cancelledBill.createdAt}" >
<f:convertDateTime timeZone="Asia/Colombo" pattern="#{sessionController.applicationPreference.longDateTimeFormat}" />
</h:outputLabel>
<f:setPropertyActionListener value="#{b}" target="#{storeBillSearch.bill}"/>
</h:commandLink>
<h:outputLabel style="color: red;" value="Cancelled at "/>
<h:outputLabel style="color: red;" rendered="#{b.cancelled}"
value="#{b.cancelledBill.createdAt}" >
<f:convertDateTime timeZone="Asia/Colombo" pattern="#{sessionController.applicationPreference.shortDateTimeFormat}" />
</h:outputLabel>
</h:panelGroup>
</p:column>

Expand All @@ -119,26 +121,17 @@
</p:column>

<p:column headerText="Requested Deprtment" >
<h:commandLink action="store_reprint_order_request" >
#{b.department.name}
<f:setPropertyActionListener value="#{b}" target="#{storeBillSearch.bill}"/>
</h:commandLink>
<h:outputLabel value="#{b.department.name} "/>
</p:column>

<p:column headerText="Requested Value" >
<h:commandLink action="store_reprint_order_request" >
<h:outputLabel value="#{b.netTotal}">
<f:convertNumber pattern="#,##0.00" />
</h:outputLabel>
<f:setPropertyActionListener value="#{b}" target="#{storeBillSearch.bill}"/>
</h:commandLink>
<h:outputLabel value="#{b.netTotal}">
<f:convertNumber pattern="#,##0.00" />
</h:outputLabel>
</p:column>

<p:column headerText="Approved Person" >
<h:commandLink action="store_reprint_order_request" >
<p:column headerText="Approved Person" >
<h:outputLabel value="#{b.referenceBill.creater.webUserPerson.nameWithTitle}" rendered="#{b.referenceBill.cancelled eq false}" />
<f:setPropertyActionListener value="#{b}" target="#{storeBillSearch.bill}"/>
</h:commandLink>
</p:column>

<p:column headerText="PO Number" >
Expand Down

0 comments on commit c61be1c

Please sign in to comment.