Skip to content

Commit

Permalink
Merge pull request #6801 from hmislk/Issue#6494
Browse files Browse the repository at this point in the history
Issue#6494 Closes #6494
  • Loading branch information
DeshaniPubudu authored Aug 7, 2024
2 parents 3ca651c + 6659402 commit 215f3ba
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .github/counter.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
21
21
Original file line number Diff line number Diff line change
Expand Up @@ -1121,7 +1121,7 @@ public String navigateToPatientDepositRefund() {
createNewPatientDepositRefund();
return "/payments/patient/send?faces-redirect=true;";
}

public String navigateToPatientDepositRefundFromOPDBill(Patient patient) {
current = patient;
bill = new Bill();
Expand Down
5 changes: 0 additions & 5 deletions src/main/java/com/divudi/bean/common/SearchController.java
Original file line number Diff line number Diff line change
Expand Up @@ -2475,11 +2475,6 @@ public void listPharmacyBills(BillType bt, Class bc) {
m.put("dep", "%" + getSearchKeyword().getToDepartment().trim().toUpperCase() + "%");
}

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

if (getSearchKeyword().getNetTotal() != null && !getSearchKeyword().getNetTotal().trim().equals("")) {
sql += " and ((b.netTotal) like :netTotal )";
m.put("netTotal", "%" + getSearchKeyword().getNetTotal().trim().toUpperCase() + "%");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ public YearMonthDay getYearMonthDay() {
public void setYearMonthDay(YearMonthDay yearMonthDay) {
this.yearMonthDay = yearMonthDay;
}

private List<Stock> stk;

public void fillSelectStock() {
Expand Down
37 changes: 19 additions & 18 deletions src/main/resources/META-INF/persistence.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<jta-data-source>jdbc/arogya</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="eclipselink.logging.level.sql" value="SEVERE"/>
<property name="eclipselink.logging.parameters" value="false"/>
</properties>
</persistence-unit>
<persistence-unit name="hmisAuditPU" transaction-type="JTA">
<jta-data-source>jdbc/arogyaAudit</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="eclipselink.logging.level.sql" value="SEVERE"/>
<property name="eclipselink.logging.parameters" value="false"/>
</properties>
</persistence-unit>
</persistence>

<persistence-unit name="hmisPU" transaction-type="JTA">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<jta-data-source>jdbc/arogya</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="eclipselink.logging.level.sql" value="SEVERE"/>
<property name="eclipselink.logging.parameters" value="false"/>
</properties>
</persistence-unit>
<persistence-unit name="hmisAuditPU" transaction-type="JTA">
<jta-data-source>jdbc/arogyaAudit</jta-data-source>
<class>com.divudi.entity.AuditEvent</class>
<exclude-unlisted-classes>true</exclude-unlisted-classes>
<properties>
<property name="eclipselink.logging.level.sql" value="SEVERE"/>
<property name="eclipselink.logging.parameters" value="false"/>
</properties>
</persistence-unit>
</persistence>
2 changes: 1 addition & 1 deletion src/main/resources/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.0.20240807.21
3.0.0.20240807.21
2 changes: 1 addition & 1 deletion src/main/webapp/resources/ezcomp/menu.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@
value="Unit Issue Margin" />
</p:submenu>
<p:submenu label="Purchase" rendered="#{webUserController.hasPrivilege('StorePurchase')}">
<p:menuitem ajax="false" action="/store/store_purhcase_order_request?faces-redirect=true" value="Purchase Orders" rendered="#{webUserController.hasPrivilege('StorePurchaseOrder')}" ></p:menuitem>
<p:menuitem ajax="false" action="/store/store_purhcase_order_request?faces-redirect=true" value="Purchase Orders" rendered="#{webUserController.hasPrivilege('StorePurchaseOrder')}" actionListener="#{storePurchaseOrderRequestController.recreate}"></p:menuitem>
<p:menuitem ajax="false" action="/store/store_purhcase_order_list_to_approve?faces-redirect=true" value="PO Approve" actionListener="#{searchController.makeListNull()}" rendered="#{webUserController.hasPrivilege('StorePurchaseOrderApproveSearch') or webUserController.hasPrivilege('StorePurchaseOrderApprove')}" ></p:menuitem>
<p:menuitem ajax="false" action="/store/store_purchase_order_list_for_recieve?faces-redirect=true" value="GRN Receive" actionListener="#{searchController.makeListNull()}" rendered="#{webUserController.hasPrivilege('StorePurchaseGRNRecive')}" ></p:menuitem>
<p:menuitem ajax="false" action="/store/store_grn_list_for_return?faces-redirect=true" value="GRN Return" actionListener="#{searchController.makeListNull()}" rendered="#{webUserController.hasPrivilege('StorePurchaseGRNReturn')}" ></p:menuitem>
Expand Down
51 changes: 44 additions & 7 deletions src/main/webapp/store/store_purhcase_order_list_to_approve.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,44 @@
<div class="row">
<div class="col-2">
<h:outputLabel value="From Date"/>
<p:calendar id="fromDate" value="#{searchController.fromDate}" navigator="false" pattern="#{sessionController.applicationPreference.longDateTimeFormat}" class="w-100" inputStyleClass="w-100">
<p:calendar
id="fromDate"
value="#{searchController.fromDate}"
navigator="false" pattern="#{sessionController.applicationPreference.longDateTimeFormat}"
class="w-100"
inputStyleClass="w-100">
</p:calendar>
<h:outputLabel value="To Date"/>
<p:calendar id="toDate" value="#{searchController.toDate}" navigator="false" pattern="#{sessionController.applicationPreference.longDateTimeFormat}" class="w-100" inputStyleClass="w-100">
<p:calendar
id="toDate"
value="#{searchController.toDate}"
navigator="false" pattern="#{sessionController.applicationPreference.longDateTimeFormat}"
class="w-100"
inputStyleClass="w-100">
</p:calendar>

<p:commandButton
value="All Request"
action="#{searchController.createPoRequestedAndApprovedStore()}"
ajax="false"
icon="fa fa-search"
class="w-100 ui-button-warning my-2">
</p:commandButton>
<p:commandButton
value="Approved Only"
action="#{searchController.createApprovedStore()}"
ajax="false"
icon="fa fa-search"
class="w-100 ui-button-warning">
</p:commandButton>
<p:commandButton
value="Not Approved"
action="#{searchController.createNotApprovedStore()}"
ajax="false"
icon="fa fa-search"
class="w-100 ui-button-warning my-2">
</p:commandButton>

<h:outputLabel value="Distributor"/>
<p:inputText autocomplete="off" value="#{searchController.searchKeyword.toInstitution}" class="w-100"/>
<h:outputLabel value="Requested User"/>
Expand All @@ -44,9 +77,7 @@
<p:inputText autocomplete="off" value="#{searchController.searchKeyword.netTotal}" class="w-100"/>
<h:outputLabel value="Max Result"/>
<p:inputText autocomplete="off" value="#{searchController.maxResult}" class="w-100"/>
<p:commandButton value="All Request" action="#{searchController.createPoRequestedAndApprovedStore()}" ajax="false" class="w-100 ui-button-Warning my-2"></p:commandButton>
<p:commandButton value="Approved Only" action="#{searchController.createApprovedStore()}" ajax="false" class="w-100 ui-button-Warning"></p:commandButton>
<p:commandButton value="Not Approved" action="#{searchController.createNotApprovedStore()}" ajax="false" class="w-100 ui-button-Warning my-2"></p:commandButton>

</div>
<div class="col-10">
<p:dataTable id="tbl" value="#{searchController.bills}" var="b">
Expand Down Expand Up @@ -126,6 +157,7 @@
icon="fas fa-edit"
class="ui-button-warning"
action="#{storePurchaseOrderRequestController.navigateToUpdatePurchaseOrder()}"
disabled="#{b.checkedBy ne null or b.referenceBill.creater ne null and b.referenceBill.cancelled eq false or b.cancelled eq true}"
>
<f:setPropertyActionListener target="#{storePurchaseOrderRequestController.currentBill}" value="#{b}"/>
</p:commandButton>
Expand All @@ -135,11 +167,16 @@
icon="fas fa-check-circle"
class="ui-button-success mx-2"
action="#{storePurchaseOrderController.navigateToPurchaseOrderApproval()}"
disabled="#{b.referenceBill.creater ne null or b.referenceBill.cancelled eq false or b.cancelled eq true or !webUserController.hasPrivilege('StorePurchaseOrderApprove')}">
disabled="#{b.checkedBy eq null or b.referenceBill.creater ne null or b.referenceBill.cancelled eq false or b.cancelled eq true or !webUserController.hasPrivilege('StorePurchaseOrderApprove')}">
<f:setPropertyActionListener target="#{storePurchaseOrderController.requestedBill}" value="#{b}"/>
</p:commandButton>

<p:commandButton ajax="false" id="view" icon="fas fa-eye" action="store_reprint_po?faces-redirect=true" disabled="#{b.referenceBill.creater eq null or b.referenceBill.referenceBill eq null}">
<p:commandButton
ajax="false"
id="view"
icon="fas fa-eye"
action="store_reprint_po?faces-redirect=true"
disabled="#{b.referenceBill.creater eq null or b.referenceBill.referenceBill eq null}">
<f:setPropertyActionListener target="#{storeBillSearch.bill}" value="#{b.referenceBill}"/>
</p:commandButton>
<p:tooltip for="approve" value="Go to Approve the PO" showDelay="0" hideDelay="0"></p:tooltip>
Expand Down

0 comments on commit 215f3ba

Please sign in to comment.