Skip to content

Commit

Permalink
Merge pull request #6788 from hmislk/Issue#6786
Browse files Browse the repository at this point in the history
Issue#6786 Closes #6786
  • Loading branch information
DeshaniPubudu authored Aug 7, 2024
2 parents b0b9fdc + 2ca0f31 commit 618d99e
Show file tree
Hide file tree
Showing 4 changed files with 208 additions and 92 deletions.
11 changes: 8 additions & 3 deletions src/main/java/com/divudi/bean/common/SearchController.java
Original file line number Diff line number Diff line change
Expand Up @@ -3485,9 +3485,14 @@ public void createStoreIssueBillItemTable() {
+ " and bi.bill.billType=:bType "
+ " and bi.createdAt between :fromDate and :toDate ";

if (getSearchKeyword().getPatientName() != null && !getSearchKeyword().getPatientName().trim().equals("")) {
sql += " and ((bi.bill.toDepartment.name) like :deptName )";
m.put("deptName", "%" + getSearchKeyword().getPatientName().trim().toUpperCase() + "%");
if (getSearchKeyword().getToDepartment()!= null && !getSearchKeyword().getToDepartment().trim().equals("")) {
sql += " and ((bi.bill.toDepartment.name) like :todept )";
m.put("todept", "%" + getSearchKeyword().getToDepartment().trim().toUpperCase() + "%");
}

if (getSearchKeyword().getFromDepartment()!= null && !getSearchKeyword().getFromDepartment().trim().equals("")) {
sql += " and ((bi.bill.fromDepartment.name) like :fromdept )";
m.put("fromdept", "%" + getSearchKeyword().getFromDepartment().trim().toUpperCase() + "%");
}

if (getSearchKeyword().getBillNo() != null && !getSearchKeyword().getBillNo().trim().equals("")) {
Expand Down
86 changes: 86 additions & 0 deletions src/main/webapp/store/store_reprint_bill_Item_unit_issue.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:p="http://primefaces.org/ui"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:st="http://xmlns.jcp.org/jsf/composite/store">

<h:body>

<ui:composition template="/resources/template/template.xhtml">

<ui:define name="content">
<h:form>
<p:panel >
<f:facet name="header" >
<div class="d-flex justify-content-between">
<h:outputLabel value="Reprint Store Issue Bill" ></h:outputLabel>
<div class="d-flex gap-2">
<p:commandButton
ajax="false"
value="To Cancel"
icon="fa-solid fa-ban" class="ui-button-danger"
action="store_cancel_bill_unit_issue?faces-redirect=true"
disabled="#{storeBillSearch.bill.cancelled}">
</p:commandButton>
<p:commandButton
ajax="false"
value="To Return Item"
icon="fa fa-money-bill-wave"
class="ui-button-warning"
action="store_bill_return_issue?faces-redirect=true"
disabled="#{storeBillSearch.bill.cancelled eq true}" >
<f:setPropertyActionListener
value="#{storeBillSearch.bill}"
target="#{storeIssueReturnController.bill}" />
</p:commandButton>
<p:commandButton
ajax="false"
icon="fa-solid fa-arrow-left"
value="Back to Search List"
action="store_search_issue_bill_item?faces-redirect=true" >
</p:commandButton>
</div>
</div>

</f:facet>

<div class="d-flex gap-2 justify-content-end">
<p:outputLabel value="Paper Type" class="m-2"></p:outputLabel>
<p:selectOneMenu
value="#{bookingControllerViewScopeMonth.departmentPreference.pharmacyBillPaperType}"
class="m-1"
style="width: 13em;">
<f:selectItem itemLabel="Please Select Paper Type" />
<f:selectItems value="#{enumController.paperTypes}" />
</p:selectOneMenu>
<p:commandButton
ajax="false"
icon="fa fa-sync-alt"
class="ui-button m-1"
title="Redraw Bill">
</p:commandButton>
<p:commandButton
value="Reprint"
class="m-1 ui-button-info"
icon="fa fa-print"
ajax="false" >
<p:printer target="gpBillPreview" ></p:printer>
</p:commandButton>
</div>

<div >
<h:panelGroup id="gpBillPreview" >
<h:panelGroup rendered="#{bookingControllerViewScopeMonth.departmentPreference.pharmacyBillPaperType eq 'PosPaper'}" >
<st:issue bill="#{storeBillSearch.bill}" duplicate="true" />
</h:panelGroup>
</h:panelGroup>
</div>
</p:panel>
</h:form>
</ui:define>
</ui:composition>
</h:body>
</html>
5 changes: 3 additions & 2 deletions src/main/webapp/store/store_reprint_bill_unit_issue.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<p:panel >
<f:facet name="header" >
<div class="d-flex justify-content-between">
<h:outputLabel value="Reprint Pre Bill" ></h:outputLabel>
<h:outputLabel value="Reprint Store Issue" ></h:outputLabel>
<div class="d-flex gap-2">
<p:commandButton
ajax="false"
Expand All @@ -28,7 +28,8 @@
<p:commandButton
ajax="false"
value="To Return Item"

icon="fa fa-money-bill-wave"
class="ui-button-warning"
action="store_bill_return_issue?faces-redirect=true"
disabled="#{storeBillSearch.bill.cancelled eq true}" >
<f:setPropertyActionListener
Expand Down
Loading

0 comments on commit 618d99e

Please sign in to comment.