Skip to content

Commit

Permalink
Merge pull request #10005 from hmislk/10004-improvements-in-expiry-it…
Browse files Browse the repository at this point in the history
…em-report

10004 improvements in expiry item report Closes #10004
  • Loading branch information
Irani96 authored Jan 7, 2025
2 parents f3ea701 + a4f8a7f commit 315fc15
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 47 deletions.
9 changes: 9 additions & 0 deletions src/main/java/com/divudi/entity/pharmacy/Stock.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public class Stock implements Serializable, RetirableEntity {
private Date retiredAt;

private String retireComments;
private String stockLocator;

@ManyToOne
Stock parentStock;
Expand Down Expand Up @@ -220,4 +221,12 @@ public void setRetireComments(String retireComments) {
this.retireComments = retireComments;
}

public String getStockLocator() {
return stockLocator;
}

public void setStockLocator(String stockLocator) {
this.stockLocator = stockLocator;
}

}
53 changes: 23 additions & 30 deletions src/main/webapp/pharmacy/pharmacy_purhcase_order_approving.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,18 @@
<f:facet name="header">
<p:outputLabel value="Purchase order Request Order"/>
<div style="float:right;" >
<p:commandButton
ajax="false"
value="Approve"
class="ui-button-success mx-2"
icon="fas fa-check"
disabled="#{!webUserController.hasPrivilege('PurchaseOrdersApprovel')}"
action="#{purchaseOrderController.approve}">
<p:commandButton ajax="false"
value="Approve"
class="ui-button-success mx-2"
icon="fas fa-check"
disabled="#{!webUserController.hasPrivilege('PurchaseOrdersApprovel')}"
action="#{purchaseOrderController.approve}">
</p:commandButton>
<p:commandButton
ajax="false"
value="Back To Po List"
class="ui-button-warning"
icon="fas fa-arrow-left"
action="pharmacy_purhcase_order_list_to_approve">
<p:commandButton ajax="false"
value="Back To Po List"
class="ui-button-warning"
icon="fas fa-arrow-left"
action="pharmacy_purhcase_order_list_to_approve">
</p:commandButton>
</div>
</f:facet>
Expand Down Expand Up @@ -86,23 +84,18 @@
<p:commandButton process="itemList @this" update=":#{p:resolveFirstComponentWithId('itemList',view).clientId} :#{p:resolveFirstComponentWithId('po',view).clientId}" value="Remove All" class="ui-button-Danger" style="float: right" action="#{purchaseOrderController.removeSelected()}"/>
</div>
</f:facet>
<p:dataTable
scrollable="true"
styleClass="noBorder"
scrollHeight="250"
var="bi"
value="#{purchaseOrderController.billItems}"
id="itemList"
sortBy="#{bi.searialNo}"
rowKey="#{bi.searialNo}"
paginator="true"
rows="10"
paginatorPosition="bottom"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
rowsPerPageTemplate="5,10,15"
selection="#{purchaseOrderController.selectedItems}">

<p:column selectionMode="multiple" style="width: 30px;"></p:column>
<p:dataTable scrollable="true" styleClass="noBorder" scrollHeight="250"
var="bi" value="#{purchaseOrderController.billItems}"
id="itemList" sortBy="#{bi.searialNo}" rowKey="#{bi.searialNo}"
paginator="true"
rows="10"
selectionMode="multiple"
paginatorPosition="bottom"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
rowsPerPageTemplate="5,10,15"
selection="#{purchaseOrderController.selectedItems}">

<p:column selectionBox="true" style="width: 30px;"></p:column>

<p:column headerText="No" style="width: 50px;" >
<p:outputLabel value="#{bi.searialNo + 1}" ></p:outputLabel>
Expand Down
44 changes: 27 additions & 17 deletions src/main/webapp/reports/inventoryReports/expiry_item.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,32 @@
value="Process"
action="#{pharmacyReportController.processExpiryItemReport()}">
</p:commandButton>
<p:commandButton class="ui-button- mx-1" icon="fas fa-print" ajax="false" value="Print All">
<p:commandButton
class="ui-button- mx-1"
icon="fas fa-print"
ajax="false"
value="Print All">
<p:printer target="tbl" />
</p:commandButton>
<p:commandButton class="ui-button-success mx-1" icon="fas fa-file-excel" ajax="false" value="Download">
<p:commandButton
class="ui-button-success mx-1"
icon="fas fa-file-excel"
ajax="false"
value="Download">
<p:dataExporter
type="xlsx"
fileName="Expiry Item Report"
target="tbl" />
</p:commandButton>
<p:commandButton class="ui-button-danger mx-1" icon= "fas fa-file-pdf" ajax="false" value="PDF">
<p:commandButton
class="ui-button-danger mx-1"
icon= "fas fa-file-pdf"
ajax="false"
value="PDF">
<p:dataExporter
type="pdf"
target="tbl"
fileName="Expiry Item Report" />
</p:commandButton>
</div>

Expand All @@ -243,7 +264,7 @@

<h5>Expiry Item Report</h5>

<p:dataTable id="tbl1"
<p:dataTable id="tbl"
value="#{pharmacyReportController.stocks}"
var="f"
rowIndexVar="n"
Expand All @@ -253,18 +274,12 @@
currentPageReportTemplate="Showing {startRecord} to {endRecord} of {totalRecords}"
rowsPerPageTemplate="5,10,15,25,50,100,500,1000">

<p:column headerText=" Item name wise" width="10em">
<p:column headerText="Department" width="10em">
<h:outputText value="#{f.department.name}" />
<f:facet name="footer">
<h:outputText value="Total" />
</f:facet>
</p:column>
<p:column headerText="Parenct Category Code" width="10em">
<h:outputText value="#{f.itemBatch.item.category.parentCategory.code}" />
</p:column>
<p:column headerText="Parent Category Name" width="10em">
<h:outputText value="#{f.itemBatch.item.category.parentCategory.name}" />
</p:column>
<p:column headerText="Item Category Code" width="10em">
<h:outputText value="#{f.itemBatch.item.category.id}" />
</p:column>
Expand All @@ -280,9 +295,6 @@
<p:column headerText="Base UOM" width="10em">
<h:outputText value="#{f.itemBatch.item.measurementUnit.name}" />
</p:column>
<p:column headerText="Secondary UOM" width="10em">
<h:outputText value="" />
</p:column>
<p:column headerText="Item Type" width="10em">
<h:outputText value="#{f.itemBatch.item.category.name}" />
</p:column>
Expand Down Expand Up @@ -347,9 +359,7 @@
<f:convertNumber parent="#,##0.00" ></f:convertNumber>
</h:outputLabel>
</f:facet>
</p:column>


</p:column>


</p:dataTable>
Expand Down

0 comments on commit 315fc15

Please sign in to comment.