diff --git a/.github/counter.txt b/.github/counter.txt index 209e3ef4b6..2edeafb09d 100644 --- a/.github/counter.txt +++ b/.github/counter.txt @@ -1 +1 @@ -20 +20 \ No newline at end of file diff --git a/src/main/java/com/divudi/bean/common/SearchController.java b/src/main/java/com/divudi/bean/common/SearchController.java index 83293c859b..5a0a31a121 100644 --- a/src/main/java/com/divudi/bean/common/SearchController.java +++ b/src/main/java/com/divudi/bean/common/SearchController.java @@ -2475,6 +2475,11 @@ public void listPharmacyBills(BillType bt, Class bc) { m.put("dep", "%" + getSearchKeyword().getToDepartment().trim().toUpperCase() + "%"); } + if (getSearchKeyword().getToDepartment() != null && !getSearchKeyword().getToDepartment().trim().equals("")) { + sql += " and ((b.toDepartment.name) like :dep )"; + m.put("dep", "%" + getSearchKeyword().getToDepartment().trim().toUpperCase() + "%"); + } + if (getSearchKeyword().getNetTotal() != null && !getSearchKeyword().getNetTotal().trim().equals("")) { sql += " and ((b.netTotal) like :netTotal )"; m.put("netTotal", "%" + getSearchKeyword().getNetTotal().trim().toUpperCase() + "%"); @@ -2567,7 +2572,6 @@ public void createTableBht(BillType btp) { m.put("fd", getFromDate()); m.put("td", getToDate()); m.put("ins", getSessionController().getInstitution()); - m.put("dep", getSessionController().getDepartment()); String sql; sql = "Select b from Bill b " @@ -2576,9 +2580,18 @@ public void createTableBht(BillType btp) { + " and b.createdAt between :fd and :td " + " and b.billType=:bt" + " and b.institution=:ins " - + " and b.department=:dep " + " and type(b)=:class "; + if (webUserController.hasPrivilege("StoreAdministration")) { + if (getSearchKeyword().getDepartment() != null && !getSearchKeyword().getDepartment().trim().equals("")) { + sql += " and ((b.department.name) like :dep )"; + m.put("dep", "%" + getSearchKeyword().getDepartment().trim().toUpperCase() + "%"); + } + } else { + sql += "and b.department=:dep "; + m.put("dep", getSessionController().getDepartment()); + + } if (getSearchKeyword().getPatientName() != null && !getSearchKeyword().getPatientName().trim().equals("")) { sql += " and ((b.patientEncounter.patient.person.name) like :patientName )"; m.put("patientName", "%" + getSearchKeyword().getPatientName().trim().toUpperCase() + "%"); @@ -7194,39 +7207,6 @@ public void createCollectingCentreBillSearch() { } - public void createStaffCreditBillList() { - String jpql; - Map m = new HashMap(); - List btas = new ArrayList<>(); - jpql = "select b from Bill b " - + "where b.toStaff is not null " - + "and b.createdAt between :fromDate and :toDate " - + "and b.retired = false " - + "and b.cancelled = false " - + "and b.refunded = false "; - jpql += " and b.billTypeAtomic in :btas "; - if (staff != null) { - jpql += " and b.toStaff=:staff "; - m.put("staff", staff); - } - - btas.addAll(BillTypeAtomic.findByServiceType(ServiceType.OPD)); - btas.addAll(BillTypeAtomic.findByServiceType(ServiceType.CHANNELLING)); - btas.removeAll(BillTypeAtomic.findByCategory(BillCategory.PAYMENTS)); - - jpql += " order by b.createdAt desc"; - - m.put("fromDate", fromDate); - m.put("toDate", toDate); - m.put("btas", btas); - - System.out.println("m = " + m); - System.out.println("jpql = " + jpql); - - bills = getBillFacade().findByJpql(jpql, m, TemporalType.TIMESTAMP); - System.out.println("bills = " + bills); - } - public void createGeneralCreditBillList() { String jpql; Map m = new HashMap(); diff --git a/src/main/java/com/divudi/bean/store/StoreAdjustmentController.java b/src/main/java/com/divudi/bean/store/StoreAdjustmentController.java index bafdb994ee..6c65889662 100644 --- a/src/main/java/com/divudi/bean/store/StoreAdjustmentController.java +++ b/src/main/java/com/divudi/bean/store/StoreAdjustmentController.java @@ -664,6 +664,7 @@ public void setStk(List stk) { this.stk = stk; } + // public void fillSelectStock(){ // List items = new ArrayList<>(); // diff --git a/src/main/resources/VERSION.txt b/src/main/resources/VERSION.txt index 03f2b3a014..e2ccadd347 100644 --- a/src/main/resources/VERSION.txt +++ b/src/main/resources/VERSION.txt @@ -1 +1 @@ -3.0.0.20240807.20 +3.0.0.20240807.20 \ No newline at end of file diff --git a/src/main/webapp/resources/store/inward/issueBill.xhtml b/src/main/webapp/resources/store/inward/issueBill.xhtml index 7e947e49a6..4ded7130db 100644 --- a/src/main/webapp/resources/store/inward/issueBill.xhtml +++ b/src/main/webapp/resources/store/inward/issueBill.xhtml @@ -207,8 +207,6 @@ - -
diff --git a/src/main/webapp/store/store_retail_sale_bht.xhtml b/src/main/webapp/store/store_retail_sale_bht.xhtml index f76e051f1d..34ff5fb2e5 100644 --- a/src/main/webapp/store/store_retail_sale_bht.xhtml +++ b/src/main/webapp/store/store_retail_sale_bht.xhtml @@ -103,7 +103,7 @@
-
+
- - + - + - - - + + + - + - + @@ -141,9 +144,9 @@ autocomplete="off" accesskey="q" id="txtQty" + style="width: 150px;" value="#{storeSaleBhtController.qty}" placeholder="Quantity" - class="mx-5" > diff --git a/src/main/webapp/store/store_search_sale_bill_bht.xhtml b/src/main/webapp/store/store_search_sale_bill_bht.xhtml index 6999455310..289b9fbc49 100644 --- a/src/main/webapp/store/store_search_sale_bill_bht.xhtml +++ b/src/main/webapp/store/store_search_sale_bill_bht.xhtml @@ -14,64 +14,79 @@ - - - - - - - - - - - - - - - - - - - - +
+
+ + + + + + + + + + + + + + + + + + + - + - - - - - + + +
+
- + - - + + + + @@ -82,7 +97,7 @@ - + @@ -90,13 +105,13 @@ - +
- +
@@ -111,20 +126,12 @@
- + - - - - - - @@ -168,8 +175,9 @@
- - +
+
+