Skip to content

Commit

Permalink
Merge pull request #4649 from hmislk/Issue#4641
Browse files Browse the repository at this point in the history
Closes#4641
  • Loading branch information
Senula88 authored Apr 19, 2024
2 parents ea88c62 + 52f66c9 commit 8d8acb8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1015,6 +1015,10 @@ public void addBillItem() {
JsfUtil.addErrorMessage("Quantity?");
return;
}
if (getStock().getItemBatch().getDateOfExpire().before(commonController.getCurrentDateTime())) {
JsfUtil.addErrorMessage("You are NOT allowed to select Expired Items");
return;
}

Stock fetchStock = getStockFacade().find(getStock().getId());

Expand Down
7 changes: 3 additions & 4 deletions src/main/webapp/theater/inward_bill_surgery_issue.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,9 @@
style="float: right;"
icon="fa fa-plus"
class="ui-button-success"
action="#{pharmacySaleBhtController.addBillItem}"
process="@this acStock txtQty"
update=":#{p:resolveFirstComponentWithId('tblBillItem',view).clientId} acStock focusItem tabI txtQty" >
</p:commandButton>
action="#{pharmacySaleBhtController.addBillItem}"
ajax="false">
</p:commandButton>
</div>

<p:focus id="focusQty" for="txtQty" ></p:focus>
Expand Down

0 comments on commit 8d8acb8

Please sign in to comment.