Skip to content

Commit

Permalink
closes#6508
Browse files Browse the repository at this point in the history
  • Loading branch information
DamithDeshan committed Jul 23, 2024
1 parent f2ea954 commit 9ca0ae3
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 71 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/divudi/bean/common/SearchController.java
Original file line number Diff line number Diff line change
Expand Up @@ -3330,7 +3330,7 @@ public void createPharmacyIssueBillItemTable() {

sql += " order by bi.id desc ";

billItems = getBillItemFacade().findByJpql(sql, m, TemporalType.TIMESTAMP, 50);
billItems = getBillItemFacade().findByJpql(sql, m, TemporalType.TIMESTAMP);

}

Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/META-INF/persistence.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="hmisPU" transaction-type="JTA">

<jta-data-source>jdbc/demos</jta-data-source>
<jta-data-source>jdbc/arogya</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="javax.persistence.schema-generation.database.action" value="create-or-extend-tables"/>
</properties>
</persistence-unit>
<persistence-unit name="hmisAuditPU" transaction-type="JTA">
<jta-data-source>jdbc/demoaudit</jta-data-source>
<jta-data-source>jdbc/arogyaAudit</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
</properties>
Expand Down
23 changes: 10 additions & 13 deletions src/main/webapp/pharmacy/pharmacy_search_issue_bill.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,16 @@
>

<p:column headerText="Bill No" >
<h:outputLabel value="#{bill.deptId}" />
<p:commandLink
value="#{bill.deptId}"
ajax="false"
action="/pharmacy/pharmacy_reprint_bill_unit_issue">
<f:setPropertyActionListener value="#{bill}" target="#{pharmacyBillSearch.bill}"/>
</p:commandLink>
</p:column>



<p:column headerText="From Department" >
<h:outputLabel value="#{bill.department.name}" />
</p:column>
Expand Down Expand Up @@ -167,10 +174,6 @@
</h:panelGroup>
</p:column>

<!-- <p:column headerText="Client" >
<h:outputLabel value="#{bill.patient.person.nameWithTitle}" />
</p:column>-->

<p:column headerText="Payment method">
<h:outputLabel value="#{bill.paymentMethod}" /><br/>
<h:outputLabel value="#{bill.paymentScheme.name}" />
Expand All @@ -193,20 +196,14 @@
<f:convertNumber pattern="#,##0.00"/>
</h:outputLabel>
</p:column>

<p:column headerText="Comments" >
<h:outputLabel rendered="#{bill.refundedBill ne null}" value="#{bill.refundedBill.comments}" >
</h:outputLabel>
<h:outputLabel rendered="#{bill.cancelledBill ne null}" value="#{bill.cancelledBill.comments}" >
</h:outputLabel>
</p:column>

<p:column headerText="View">
<p:commandButton ajax="false" value="View Bill"
action="/pharmacy/pharmacy_reprint_bill_unit_issue">
<f:setPropertyActionListener value="#{bill}" target="#{pharmacyBillSearch.bill}"/>
</p:commandButton>
</p:column>

</p:dataTable>
</div>
</div>
Expand Down
106 changes: 51 additions & 55 deletions src/main/webapp/pharmacy/pharmacy_search_issue_bill_item.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -13,51 +13,51 @@
<p:panel style="height: 100vh">
<f:facet name="header" >
<h:outputText styleClass="fas fa-list" />
<h:outputLabel class="mx-4" value="Search Pharmacy Issue Items"/>
<h:outputLabel class="mx-4" value="Search Pharmacy Issue Bill Items"/>
</f:facet>

<div class="row">
<div class="col-2">
<h:outputLabel value="From Date"/>
<p:calendar
styleClass="dateTimePicker"
id="fromDate"
class="w-100"
inputStyleClass="form-control"
value="#{searchController.fromDate}"
navigator="false"
pattern="#{sessionController.applicationPreference.longDateTimeFormat}" >
</p:calendar>
<h:outputLabel value="To Date"/>
<p:calendar
id="toDate"
class="w-100"
inputStyleClass="form-control"
value="#{searchController.toDate}"
navigator="false"
pattern="#{sessionController.applicationPreference.longDateTimeFormat}" >
</p:calendar>
<h:outputLabel value="Bill No" class="mt-3"/>
<p:inputText autocomplete="off" class="w-100" value="#{searchController.searchKeyword.billNo}" />
<h:outputLabel value="Item Name"/>
<p:inputText autocomplete="off" class="w-100" value="#{searchController.searchKeyword.itemName}" />
<h:outputLabel value="Item Value"/>
<p:inputText autocomplete="off" class="w-100" value="#{searchController.searchKeyword.total}" />
<h:outputLabel value="Department"/>
<p:inputText autocomplete="off" class="w-100" value="#{searchController.searchKeyword.patientName}" />
<h:outputLabel value="Item Code"/>
<p:inputText autocomplete="off" class="w-100" value="#{searchController.searchKeyword.code}"/>
<p:commandButton
class="w-100 ui-button-warning mt-3"
id="btnSearch"
icon="fas fa-search"
ajax="false"
value="Search"
action="#{searchController.createPharmacyIssueBillItemTable()}"/>

<h:outputLabel value="From Date"/>
<p:calendar
styleClass="dateTimePicker"
id="fromDate"
class="w-100"
inputStyleClass="form-control"
value="#{searchController.fromDate}"
navigator="false"
pattern="#{sessionController.applicationPreference.longDateTimeFormat}" >
</p:calendar>
<h:outputLabel value="To Date"/>
<p:calendar
id="toDate"
class="w-100"
inputStyleClass="form-control"
value="#{searchController.toDate}"
navigator="false"
pattern="#{sessionController.applicationPreference.longDateTimeFormat}" >
</p:calendar>

<h:outputLabel value="Bill No" class="mt-3"/>
<p:inputText autocomplete="off" class="w-100" value="#{searchController.searchKeyword.billNo}" />
<h:outputLabel value="Item Name"/>
<p:inputText autocomplete="off" class="w-100" value="#{searchController.searchKeyword.itemName}" />
<h:outputLabel value="Item Value"/>
<p:inputText autocomplete="off" class="w-100" value="#{searchController.searchKeyword.total}" />
<h:outputLabel value="Department"/>
<p:inputText autocomplete="off" class="w-100" value="#{searchController.searchKeyword.patientName}" />
<h:outputLabel value="Item Code"/>
<p:inputText autocomplete="off" class="w-100" value="#{searchController.searchKeyword.code}"/>

<p:commandButton
class="w-100 ui-button-warning mt-3"
id="btnSearch"
icon="fas fa-search"
ajax="false"
value="Search"
action="#{searchController.createPharmacyIssueBillItemTable()}"/>

</div>
<div class="col-10">
<p:dataTable
Expand All @@ -75,15 +75,18 @@
<h:outputLabel value="#{i+1}"/>
</p:column>
<p:column headerText="Bill No" styleClass="alignTop" >
<h:outputLabel value="#{pi.bill.deptId}"/>
<p:commandLink
ajax="false"
value="#{pi.bill.deptId}"
action="/pharmacy/pharmacy_reprint_bill_unit_issue">
<f:setPropertyActionListener value="#{pi.bill}" target="#{pharmacyBillSearch.bill}"/>
</p:commandLink>
</p:column>
<p:column headerText="Item Name" styleClass="alignTop" width="40%">
<h:outputLabel value="#{pi.item.name}" />
<h:outputLabel value="#{pi.item.code}" ></h:outputLabel>
&nbsp;-&nbsp;
<f:facet name="header">
<h:outputLabel value="Code"/>
</f:facet>
<h:outputLabel value="#{pi.item.code}" style="width: 100px!important;" ></h:outputLabel>
<h:outputLabel value="#{pi.item.name}" />

</p:column>

<p:column headerText="Billed At" width="10%">
Expand Down Expand Up @@ -121,16 +124,9 @@
</p:column>

<p:column headerText="Department" styleClass="alignTop" >
<h:outputLabel value="#{pi.bill.toDepartment.name}" >
<h:outputLabel value="#{pi.bill.toDepartment.name}" style="text-align: left;">
</h:outputLabel>
</p:column>

<p:column headerText="View">
<p:commandButton ajax="false" value="View Bill"
action="/pharmacy/pharmacy_reprint_bill_unit_issue">
<f:setPropertyActionListener value="#{pi.bill}" target="#{pharmacyBillSearch.bill}"/>
</p:commandButton>
</p:column>

</p:dataTable>
</div>
Expand Down

0 comments on commit 9ca0ae3

Please sign in to comment.