Skip to content

Commit 75aa279

Browse files
authored
Merge pull request #11214 from hmislk/11213-when-adding-a-new-drug-a-warning-message-is-required-if-its-qty-is-not-sufficient
2 parents d89f591 + 3fb40c6 commit 75aa279

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

src/main/java/com/divudi/bean/pharmacy/PharmacySaleController.java

+6
Original file line numberDiff line numberDiff line change
@@ -1400,10 +1400,16 @@ public void addBillItemMultipleBatches() {
14001400
double thisTimeAddingQty = addBillItemSingleItem();
14011401
addedQty += thisTimeAddingQty;
14021402
remainingQty = remainingQty - thisTimeAddingQty;
1403+
1404+
14031405
if (remainingQty <= 0) {
14041406
return;
14051407
}
14061408
}
1409+
if(addedQty < requestedQty){
1410+
errorMessage = "Quantity is not Enough...!";
1411+
JsfUtil.addErrorMessage("Only " + String.format("%.0f", addedQty) +" is Available form the Requested Quantity");
1412+
}
14071413

14081414
}
14091415

src/main/java/com/divudi/bean/pharmacy/PharmacySaleController1.java

+4
Original file line numberDiff line numberDiff line change
@@ -1165,6 +1165,10 @@ public void addBillItemMultipleBatches() {
11651165
return;
11661166
}
11671167
}
1168+
if(addedQty < requestedQty){
1169+
errorMessage = "Quantity is not Enough...!";
1170+
JsfUtil.addErrorMessage("Only " + String.format("%.0f", addedQty) +" is Available form the Requested Quantity");
1171+
}
11681172

11691173
}
11701174

src/main/java/com/divudi/bean/pharmacy/PharmacySaleController2.java

+4
Original file line numberDiff line numberDiff line change
@@ -1165,6 +1165,10 @@ public void addBillItemMultipleBatches() {
11651165
return;
11661166
}
11671167
}
1168+
if(addedQty < requestedQty){
1169+
errorMessage = "Quantity is not Enough...!";
1170+
JsfUtil.addErrorMessage("Only " + String.format("%.0f", addedQty) +" is Available form the Requested Quantity");
1171+
}
11681172

11691173
}
11701174

src/main/java/com/divudi/bean/pharmacy/PharmacySaleController3.java

+4
Original file line numberDiff line numberDiff line change
@@ -1165,6 +1165,10 @@ public void addBillItemMultipleBatches() {
11651165
return;
11661166
}
11671167
}
1168+
if(addedQty < requestedQty){
1169+
errorMessage = "Quantity is not Enough...!";
1170+
JsfUtil.addErrorMessage("Only " + String.format("%.0f", addedQty) +" is Available form the Requested Quantity");
1171+
}
11681172

11691173
}
11701174

0 commit comments

Comments
 (0)