Skip to content

Commit

Permalink
Merge branch 'development' of https://github.com/hmislk/hmis.git into…
Browse files Browse the repository at this point in the history
… 9947-api_improvements
  • Loading branch information
ChinthakaPrasad committed Jan 7, 2025
2 parents 2c79c40 + d11e73b commit 7994847
Show file tree
Hide file tree
Showing 23 changed files with 1,043 additions and 189 deletions.
11 changes: 9 additions & 2 deletions src/main/java/com/divudi/bean/common/SearchController.java
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,14 @@ public class SearchController implements Serializable {

// </editor-fold>
// <editor-fold defaultstate="collapsed" desc="Navigators">
public String navigateToMyDepartmentAllCashierSummary() {
department = sessionController.getDepartment();
institution = sessionController.getInstitution();
site = sessionController.getDepartment().getSite();
webUser=null;
return "/cashier/my_department_all_cashier_summary?faces-redirect=true";
}

public String navigateToUserDrawerDashboard() {
Drawer d = drawerController.getUsersDrawer(drawer.getDrawerUser());
drawerController.setCurrent(d);
Expand Down Expand Up @@ -17385,7 +17393,7 @@ public PharmacyAdjustmentRow(Item itm, double purchaseRate, double saleRate, dou
}

// </editor-fold>
// <editor-fold defaultstate="collapsed" desc="Getters and Setters">
// <editor-fold defaultstate="collapsed" desc="Getters and Setters">
public Item getItm() {
return itm;
}
Expand Down Expand Up @@ -18146,5 +18154,4 @@ public void prepareDataBillsAndBillItemsDownload() {
}

// </editor-fold>

}
Original file line number Diff line number Diff line change
Expand Up @@ -502,15 +502,21 @@ private TreeNode<PrivilegeHolder> createPrivilegeHolderTreeNodes() {
new DefaultTreeNode(new PrivilegeHolder(Privileges.CourierViewStatistics, "Courier View Statistics"), courierNode);
new DefaultTreeNode(new PrivilegeHolder(Privileges.CourierViewBillReports, "Courier View Bill Reports"), courierNode);
new DefaultTreeNode(new PrivilegeHolder(Privileges.CourierViewPaymentReports, "Courier View Payment Reports"), courierNode);

// User Menu
TreeNode userNode = new DefaultTreeNode(new PrivilegeHolder(null, "User"), allNode);
new DefaultTreeNode(new PrivilegeHolder(Privileges.UserMenu, "User Menu"), userNode);
new DefaultTreeNode(new PrivilegeHolder(Privileges.ChangeMyPassword, "Change User Password"), userNode);
new DefaultTreeNode(new PrivilegeHolder(Privileges.ChangeMyTheme, "Change User Theme"), userNode);
new DefaultTreeNode(new PrivilegeHolder(Privileges.ChangePreferece, "Change User Preferances"), userNode);
new DefaultTreeNode(new PrivilegeHolder(Privileges.ChangeMyApiKeys, "Change API Keys"), userNode);
new DefaultTreeNode(new PrivilegeHolder(Privileges.MyFinanacialTransactionManager, "User Financial Transaction Manager"), userNode);

// Search Privileges
TreeNode searchRootNode = new DefaultTreeNode(new PrivilegeHolder(null, "Search"), allNode);
new DefaultTreeNode(new PrivilegeHolder(Privileges.Search, "Search Menu"), searchRootNode);
new DefaultTreeNode(new PrivilegeHolder(Privileges.SearchGrand, "Grand Search"), searchRootNode);

// User Privileges
TreeNode userNode = new DefaultTreeNode(new PrivilegeHolder(null, "User"), allNode);
new DefaultTreeNode(new PrivilegeHolder(Privileges.ChangePreferece, "Change Theme"), userNode);

// Cash Transaction Privileges
TreeNode cashTransactionNode = new DefaultTreeNode(new PrivilegeHolder(null, "Cash Transaction"), allNode);
Expand Down
10 changes: 9 additions & 1 deletion src/main/java/com/divudi/bean/inward/AdmissionController.java
Original file line number Diff line number Diff line change
Expand Up @@ -1169,7 +1169,15 @@ public void saveSelected() {
savePatient();
savePatientAllergies();
saveGuardian();
bhtText = getInwardBean().getBhtText(getCurrent().getAdmissionType());
boolean bhtCanBeEdited = configOptionApplicationController.getBooleanValueByKey("BHT Number can be edited at the time of admission");
if(bhtText==null||bhtText.trim().equals("")){
bhtText = getInwardBean().getBhtText(getCurrent().getAdmissionType());
}else{
if(!bhtCanBeEdited){
bhtText = getInwardBean().getBhtText(getCurrent().getAdmissionType());
}
}
// bhtText = getInwardBean().getBhtText(getCurrent().getAdmissionType());
getCurrent().setBhtNo(getBhtText());

// getCurrent().setBhtNo(bhtText);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,15 @@ public class BhtIssueReturnController implements Serializable {
@EJB
private BillItemFacade billItemFacade;


public String navigateToReturnPharmacyDirectIssueToInpatients(){
if(bill==null){
JsfUtil.addErrorMessage("No Bill Selected");
return null;
}
return "/inward/pharmacy_bill_return_bht_issue?faces-redirect=true";
}

public Bill getBill() {
return bill;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,14 @@ public class PharmacyBillSearch implements Serializable {
@Inject
PharmacyRequestForBhtController pharmacyRequestForBhtController;

public String navigateToCancelPharmacyDirectIssueToInpatients(){
if(bill==null){
JsfUtil.addErrorMessage("No Bill Selected");
return null;
}
return "/inward/pharmacy_cancel_bill_retail_bht?faces-redirect=true";
}

public String navigatePharmacyReprintPo() {
return "pharmacy_reprint_po?faces-redirect=true";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2191,12 +2191,18 @@ public void processExpiryItemReport() {
if (amp != null) {
item = amp;
System.out.println("item = " + item);
jpql += "and s.item=:itm ";
jpql += "and s.itemBatch.item=:itm ";
m.put("itm", item);
}

jpql += " order by s.id ";
stocks = stockFacade.findByJpql(jpql, m, TemporalType.TIMESTAMP);
stockPurchaseValue = 0.0;
stockSaleValue = 0.0;
for (Stock ts : stocks) {
stockPurchaseValue = stockPurchaseValue + (ts.getItemBatch().getPurcahseRate() * ts.getStock());
stockSaleValue = stockSaleValue + (ts.getItemBatch().getRetailsaleRate() * ts.getStock());
}
}

public long calculateDaysRemaining(Date dateOfExpire) {
Expand Down
12 changes: 11 additions & 1 deletion src/main/java/com/divudi/data/Privileges.java
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,16 @@ public enum Privileges {
ChangeCreditLimitInCC("Change Credit Limit in Collecting Centre"),
ChangeCollectingCentre("Change Collecting Centre"),
//</editor-fold>

//<editor-fold defaultstate="collapsed" desc="User">
UserMenu("User Menu"),
ChangeMyPassword("Change My Password"),
ChangeMyTheme("Change My Theme"),
ChangePreferece("Change My Preference"),
ChangeMyApiKeys("Change My Api Keys"),
MyFinanacialTransactionManager("My Finanacial Transaction Manager"),
//</editor-fold>


//<editor-fold defaultstate="collapsed" desc="Admin">
SearchGrand("Search Grand"),
Expand All @@ -575,7 +585,7 @@ public enum Privileges {
Developers("Developers"),
// Administration
SearchAll("Search All"),
ChangePreferece("Change Preference"),

SendBulkSMS("Send Bulk SMS"),
SuperAdmin("Supper Admin"),
EditData("Edit Data"),
Expand Down
8 changes: 8 additions & 0 deletions src/main/webapp/cashier/index.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,14 @@
ajax="false"
action="#{financialTransactionController.navigateToMyCashierSummary()}" >
</p:commandButton>

<p:commandButton
class="my-1 w-100"
value="My Department All Cashier SUmmary"
icon=""
ajax="false"
action="#{searchController.navigateToMyDepartmentAllCashierSummary}" >
</p:commandButton>

<p:commandButton
class="my-1 w-100"
Expand Down
Loading

0 comments on commit 7994847

Please sign in to comment.