Skip to content

Commit

Permalink
Merge pull request #4715 from hmislk/Issue#4707
Browse files Browse the repository at this point in the history
Issue#4707 Closes #4707
  • Loading branch information
Irani96 authored Apr 22, 2024
2 parents e3122d5 + 84b8104 commit 2ca1489
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/main/java/com/divudi/bean/pharmacy/StockController.java
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ public StoreBean getStoreBean() {

public void listStocksOfSelectedItem(Item item) {
selectedItemStocks = null;
if(selectedItemStocks == null){
selectedItemStocks = new ArrayList<>();
}
selectedItem = item;
if (item == null) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,17 @@
<p:column headerText="Stock" style="width:4em; text-align: right; padding: 0;">
<p:commandLink value="#{stockController.findStock(bi.item)}"
oncomplete="PF('stockDetailsDialog').show();"
update=":stockDetailsForm:stockList"
process="itemList"
update="stockDetailsForm"
actionListener="#{stockController.listStocksOfSelectedItem(bi.item)}">
</p:commandLink>
</p:column>

<p:column headerText="Expiry" style="width:4em; text-align: right; padding: 0;">
<p:commandLink value="#{stockController.findExpiaringStock(bi.item)}"
oncomplete="PF('expStockDetailsDialog').show();"
update=":expStockDetailsForm:expStockList"
process="itemList"
update="expStockDetailsForm"
actionListener="#{stockController.listExpiaringStocks(bi.item)}"
style="#{stockController.findExpiaringStock(bi.item) > 0 ? 'color: red;' : 'color: #02e05f;'}">
</p:commandLink>
Expand All @@ -130,7 +132,8 @@
<p:commandButton
class="ui-button-danger"
icon="fas fa-trash"
ajax="false"
process="itemList"
update="itemList :#{p:resolveFirstComponentWithId('tot',view).clientId}"
tabindex="-1"
style="padding: 0;"
action="#{purchaseOrderRequestController.removeItem(bi)}"/>
Expand Down

0 comments on commit 2ca1489

Please sign in to comment.