Skip to content

Commit

Permalink
closes#6494
Browse files Browse the repository at this point in the history
Signed-off-by: DamithDeshan <[email protected]>
  • Loading branch information
DamithDeshan committed Aug 6, 2024
1 parent 28d557d commit 123db10
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/main/resources/META-INF/persistence.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?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/sethma</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"/>
<property name="eclipselink.logging.parameters" value="false"/>
</properties>
</persistence-unit>
<persistence-unit name="hmisAuditPU" transaction-type="JTA">
<jta-data-source>jdbc/sethmaaudit</jta-data-source>
<jta-data-source>jdbc/arogyaAudit</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="eclipselink.logging.level.sql" value="SEVERE"/>
Expand Down
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 123db10

Please sign in to comment.