From b238166e863e12a391c5dc924f57639547cffa73 Mon Sep 17 00:00:00 2001 From: buddhika75 Date: Sat, 20 Jul 2024 17:25:03 +0530 Subject: [PATCH 01/27] Signed-off-by: buddhika75 --- .../FinancialTransactionController.java | 46 +- .../BookingControllerViewScopeMonth.java | 412 +--- .../ConfigOptionApplicationController.java | 30 +- .../java/com/divudi/data/Denomination.java | 33 + src/main/java/com/divudi/entity/Payment.java | 129 +- .../webapp/cashier/initial_fund_bill.xhtml | 70 +- .../channel/channel_booking_by_month.xhtml | 384 +++- .../channel/manage_booking_by_month.xhtml | 1743 +++++++++++++++++ .../webapp/channel/session_instance.xhtml | 154 +- .../common/patient_details_view_scope.xhtml | 24 +- ..._channel_booking_by_month_controller.xhtml | 363 ++++ src/main/webapp/resources/ezcomp/menu.xhtml | 6 - 12 files changed, 2923 insertions(+), 471 deletions(-) create mode 100644 src/main/java/com/divudi/data/Denomination.java create mode 100644 src/main/webapp/channel/manage_booking_by_month.xhtml create mode 100644 src/main/webapp/resources/ezcomp/common/patient_details_view_scope_for_channel_booking_by_month_controller.xhtml diff --git a/src/main/java/com/divudi/bean/cashTransaction/FinancialTransactionController.java b/src/main/java/com/divudi/bean/cashTransaction/FinancialTransactionController.java index a861586bd2..846cca694c 100644 --- a/src/main/java/com/divudi/bean/cashTransaction/FinancialTransactionController.java +++ b/src/main/java/com/divudi/bean/cashTransaction/FinancialTransactionController.java @@ -3,6 +3,7 @@ import java.util.HashMap; import com.divudi.bean.common.BillController; import com.divudi.bean.common.BillSearch; +import com.divudi.bean.common.ConfigOptionApplicationController; import com.divudi.bean.common.SearchController; import com.divudi.bean.common.SessionController; import com.divudi.data.BillClassType; @@ -15,6 +16,7 @@ import com.divudi.data.AtomicBillTypeTotals; import com.divudi.data.BillFinanceType; import com.divudi.data.BillTypeAtomic; +import com.divudi.data.Denomination; import com.divudi.data.FinancialReport; import com.divudi.data.PaymentMethod; import com.divudi.data.PaymentMethodValues; @@ -32,8 +34,12 @@ import java.util.Map; import java.util.stream.Collectors; import javax.ejb.EJB; +import javax.faces.event.AjaxBehaviorEvent; +import javax.faces.event.ValueChangeEvent; import javax.inject.Inject; import javax.persistence.TemporalType; +import org.json.JSONArray; +import org.json.JSONObject; /** * @@ -61,6 +67,8 @@ public class FinancialTransactionController implements Serializable { SearchController searchController; @Inject BillSearch billSearch; + @Inject + ConfigOptionApplicationController configOptionApplicationController; // // @@ -326,8 +334,6 @@ public void selectNetVoucherTotalDetails() { paymentsSelected = selectedPayments; } - - public void selectCollectedOtherNonCreditDetails() { List paymentMethods = financialReportByPayments.getPaymentMethodsForCollectedDebitCard(); List billTypes = financialReportByPayments.getBillTypesForCollectedDebitCard(); @@ -342,7 +348,6 @@ public void selectCollectedOtherNonCreditDetails() { paymentsSelected = selectedPayments; } - public void selectRefundedOtherNonCreditDetails() { List paymentMethods = financialReportByPayments.getPaymentMethodsForRefundedDebitCard(); List billTypes = financialReportByPayments.getBillTypesForRefundedDebitCard(); @@ -357,7 +362,6 @@ public void selectRefundedOtherNonCreditDetails() { paymentsSelected = selectedPayments; } - public void selectNetOtherNonCreditTotalDetails() { List paymentMethods = financialReportByPayments.getPaymentMethodsForBankDeposits(); List billTypes = financialReportByPayments.getBillTypesForBankDeposits(); @@ -411,7 +415,7 @@ public void selectFloatHandoverDetails() { } public void selectNetFloatDetails() { - + List billTypes = financialReportByPayments.getBillTypesForFloatCollected(); billTypes.addAll(financialReportByPayments.getBillTypesForFloatHandover()); List allPayments = paymentsFromShiftSratToNow; @@ -776,6 +780,8 @@ public String settleInitialFundBill() { p.setBill(currentBill); p.setDepartment(sessionController.getDepartment()); p.setInstitution(sessionController.getInstitution()); + // Serialize denominations before saving + p.serializeDenominations(); paymentController.save(p); } return "/cashier/initial_fund_bill_print?faces-redirect=true"; @@ -1519,6 +1525,36 @@ public Payment getCurrentPayment() { return currentPayment; } + public void updateCashDenominations(AjaxBehaviorEvent event) { + System.out.println("updateCashDenominations called"); + + if (currentPayment == null) { + System.out.println("currentPayment is null"); + return; + } + + double total = 0; + List denominations = configOptionApplicationController.getDenominations(); + for (Denomination denomination : denominations) { + int value = denomination.getCount(); + System.out.println("Processing denomination: " + denomination.getValue() + " with count: " + value); + total += denomination.getValue() * value; + } + currentPayment.setPaidValue(total); + System.out.println("Total value calculated: " + total); + + // Serialize updated denominations to JSON + JSONArray jsonArray = new JSONArray(); + for (Denomination denomination : denominations) { + JSONObject jsonObject = new JSONObject(); + jsonObject.put("value", denomination.getValue()); + jsonObject.put("count", denomination.getCount()); + jsonArray.put(jsonObject); + } + currentPayment.setCurrencyDenominationsJson(jsonArray.toString()); + System.out.println("Updated currencyDenominationsJson: " + currentPayment.getCurrencyDenominationsJson()); + } + public void setCurrentPayment(Payment currentPayment) { this.currentPayment = currentPayment; } diff --git a/src/main/java/com/divudi/bean/channel/BookingControllerViewScopeMonth.java b/src/main/java/com/divudi/bean/channel/BookingControllerViewScopeMonth.java index 0bdffe9e4a..e15727de6d 100644 --- a/src/main/java/com/divudi/bean/channel/BookingControllerViewScopeMonth.java +++ b/src/main/java/com/divudi/bean/channel/BookingControllerViewScopeMonth.java @@ -120,7 +120,7 @@ */ @Named @ViewScoped -public class BookingControllerViewScopeMonth implements Serializable, ControllerWithPatientViewScope, ControllerWithMultiplePayments { +public class BookingControllerViewScopeMonth implements Serializable { /** * EJBs @@ -145,8 +145,8 @@ public class BookingControllerViewScopeMonth implements Serializable, Controller private BillFeeFacade billFeeFacade; @EJB ItemFeeFacade ItemFeeFacade; - @EJB - private ChannelBean channelBean; +// @EJB +// private ChannelBean channelBean; @EJB FingerPrintRecordFacade fpFacade; @EJB @@ -580,7 +580,7 @@ private Bill createBillForChannelReshedule(BillSession bs) { } return bill; } - + private BillItem createSessionItemForReshedule(Bill bill) { BillItem bi = new BillItem(); bi.setAdjustedValue(0.0); @@ -1000,48 +1000,6 @@ public String navigateToEditOriginatingSession() { return channelScheduleController.navigateToChannelSchedule(); } - public void addSingleDateToToDate() { - Calendar cal = Calendar.getInstance(); - cal.setTime(getFromDate()); - cal.add(Calendar.DATE, 1); - toDate = cal.getTime(); - listAllSesionInstances(); - filterSessionInstances(); - } - - public void addToDayToToDate() { - toDate = new Date(); - listAllSesionInstances(); - filterSessionInstances(); - } - - public void addTwoDays() { - Calendar cal = Calendar.getInstance(); - cal.setTime(getFromDate()); - cal.add(Calendar.DATE, 2); - toDate = cal.getTime(); - listAllSesionInstances(); - filterSessionInstances(); - } - - public void addSevenDays() { - Calendar cal = Calendar.getInstance(); - cal.setTime(getFromDate()); - cal.add(Calendar.DATE, 7); - toDate = cal.getTime(); - listAllSesionInstances(); - filterSessionInstances(); - } - - public void addMonth() { - Calendar cal = Calendar.getInstance(); - cal.setTime(getFromDate()); - cal.add(Calendar.MONTH, 1); - toDate = cal.getTime(); - listAllSesionInstances(); - filterSessionInstances(); - } - public void addMonthNew() { Calendar cal = Calendar.getInstance(); cal.setTime(getFromDate()); @@ -1149,6 +1107,9 @@ public void listAndFilterSessionInstances() { public void loadSessionInstances() { sessionInstancesFiltered = new ArrayList<>(); + if (sessionInstanceFilter == null || sessionInstanceFilter.trim().equals("")) { + return; + } StringBuilder jpql = new StringBuilder("select i from SessionInstance i where i.retired=:ret and i.originatingSession.retired=:ret"); // Initializing the parameters map @@ -1218,50 +1179,6 @@ public void loadSessionInstances() { } } - public void filterSessionInstances() { - if (sessionInstanceFilter == null || sessionInstanceFilter.trim().isEmpty()) { - if (sessionInstances != null) { - sessionInstancesFiltered = new ArrayList<>(sessionInstances); - } else { - sessionInstancesFiltered = new ArrayList<>(); - return; - } - return; - } - - sessionInstancesFiltered = new ArrayList<>(); - String[] filterKeywords = sessionInstanceFilter.trim().toLowerCase().split("\\s+"); - - for (SessionInstance si : sessionInstances) { - String match1 = (si.getOriginatingSession() != null && si.getOriginatingSession().getName() != null) - ? si.getOriginatingSession().getName().toLowerCase() : ""; - String match2 = (si.getOriginatingSession() != null && si.getOriginatingSession().getStaff() != null - && si.getOriginatingSession().getStaff().getPerson() != null - && si.getOriginatingSession().getStaff().getPerson().getName() != null) - ? si.getOriginatingSession().getStaff().getPerson().getName().toLowerCase() : ""; - String match3 = (si.getOriginatingSession() != null && si.getOriginatingSession().getStaff() != null - && si.getOriginatingSession().getStaff().getSpeciality() != null - && si.getOriginatingSession().getStaff().getSpeciality().getName() != null) - ? si.getOriginatingSession().getStaff().getSpeciality().getName().toLowerCase() : ""; - - boolean matchesAll = true; - for (String keyword : filterKeywords) { - if (!(match1.contains(keyword) || match2.contains(keyword) || match3.contains(keyword))) { - matchesAll = false; - break; - } - } - - if (matchesAll) { - sessionInstancesFiltered.add(si); - } - } - if (!sessionInstancesFiltered.isEmpty()) { - selectedSessionInstance = selectedSessionInstance = sessionInstancesFiltered.get(0); - sessionInstanceSelected(); - } - } - public void handleDropAndNavigate() { // Retrieve the session ID from the request parameter String sessionId = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("sessionId"); @@ -1527,7 +1444,7 @@ public void fillFees() { public void init() { fromDate = new Date(); toDate = new Date(); - + patientDetailsEditable = true; Date tmpfromDate = viewScopeDataTransferController.getFromDate(); Date tmptoDate = viewScopeDataTransferController.getToDate(); if (tmpfromDate != null) { @@ -1540,7 +1457,7 @@ public void init() { needToFillSessionInstances = viewScopeDataTransferController.getNeedToFillSessionInstances(); if (needToFillSessionInstances == null || needToFillSessionInstances != false) { - listAllSesionInstances(); + listAndFilterSessionInstances(); } selectedSessionInstance = viewScopeDataTransferController.getSelectedSessionInstance(); @@ -1572,41 +1489,6 @@ public void init() { } - public String navigateToChannelBookingFromMenuByDate() { - Boolean opdBillingAfterShiftStart = sessionController.getApplicationPreference().isOpdBillingAftershiftStart(); - - viewScopeDataTransferController.setFromDate(fromDate); - viewScopeDataTransferController.setToDate(toDate); - - viewScopeDataTransferController.setNeedToFillBillSessions(false); - viewScopeDataTransferController.setNeedToFillBillSessionDetails(false); - viewScopeDataTransferController.setNeedToFillSessionInstances(true); - viewScopeDataTransferController.setNeedToFillSessionInstanceDetails(true); - viewScopeDataTransferController.setNeedToFillMembershipDetails(false); - viewScopeDataTransferController.setNeedToPrepareForNewBooking(true); - - if (opdBillingAfterShiftStart) { - financialTransactionController.findNonClosedShiftStartFundBillIsAvailable(); - if (financialTransactionController.getNonClosedShiftStartFundBill() != null) { - fromDate = new Date(); - toDate = new Date(); - listAllSesionInstances(); - prepareForNewChannellingBill(); - return "/channel/channel_booking_by_date?faces-redirect=true"; - } else { - JsfUtil.addErrorMessage("Start Your Shift First !"); - return "/cashier/index?faces-redirect=true"; - } - } else { - fromDate = new Date(); - toDate = new Date(); - listAllSesionInstances(); - prepareForNewChannellingBill(); - return "/channel/channel_booking_by_date?faces-redirect=true"; - } - - } - public String navigateToChannelBookingFromMenuByMonth() { Boolean opdBillingAfterShiftStart = sessionController.getApplicationPreference().isOpdBillingAftershiftStart(); @@ -1627,7 +1509,7 @@ public String navigateToChannelBookingFromMenuByMonth() { toDate = new Date(); listAndFilterSessionInstances(); prepareForNewChannellingBill(); - return "/channel/channel_booking_by_date?faces-redirect=true"; + return "/channel/channel_booking_by_month?faces-redirect=true"; } else { JsfUtil.addErrorMessage("Start Your Shift First !"); return "/cashier/index?faces-redirect=true"; @@ -1670,13 +1552,13 @@ public String navigateToChannelBookingFromMembershipByDate(Patient pt, PaymentSc if (opdBillingAfterShiftStart) { financialTransactionController.findNonClosedShiftStartFundBillIsAvailable(); if (financialTransactionController.getNonClosedShiftStartFundBill() != null) { - return "/channel/channel_booking_by_date?faces-redirect=true"; + return "/channel/channel_booking_by_month?faces-redirect=true"; } else { JsfUtil.addErrorMessage("Start Your Shift First !"); return "/cashier/index?faces-redirect=true"; } } else { - return "/channel/channel_booking_by_date?faces-redirect=true"; + return "/channel/channel_booking_by_month?faces-redirect=true"; } } @@ -1691,51 +1573,6 @@ public String navigateToChannelBookingByDate() { return null; } - public String navigateToChannelQueueFromMenu() { - sessionInstances = channelBean.listTodaysSesionInstances(); - return "/channel/channel_queue?faces-redirect=true"; - } - - public String navigateToChannelDisplayFromMenu() { - sessionInstances = channelBean.listTodaysSessionInstances(true, false, false); - return "/channel/channel_display?faces-redirect=true"; - } - - public String navigateToChannelQueueFromConsultantRoom() { - sessionInstances = channelBean.listTodaysSesionInstances(); - return "/channel/channel_queue?faces-redirect=true"; - } - - public void listAllSesionInstances() { - sessionInstances = channelBean.listSessionInstances(fromDate, toDate, null, null, null); - if (configOptionApplicationController.getBooleanValueByKey("Calculate All Patient Count When Loading Channel Booking By Dates")) { - for (SessionInstance s : sessionInstances) { - fillBillSessions(s); - } - } - filterSessionInstances(); - } - - public void listOngoingSesionInstances() { - sessionInstances = channelBean.listSessionInstances(fromDate, toDate, true, null, null); - filterSessionInstances(); - } - - public void listCompletedSesionInstances() { - sessionInstances = channelBean.listSessionInstances(fromDate, toDate, null, true, null); - filterSessionInstances(); - } - - public void listPendingSesionInstances() { - sessionInstances = channelBean.listSessionInstances(fromDate, toDate, null, null, true); - filterSessionInstances(); - } - - public void listCancelledSesionInstances() { - sessionInstances = channelBean.listSessionInstances(fromDate, toDate, null, null, null, true); - filterSessionInstances(); - } - public void prepareForNewChannellingBill() { selectedBillSession = null; getSelectedBillSession(); @@ -1751,7 +1588,7 @@ public String navigateToConsultantRoom() { } public void loadSessionInstance() { - sessionInstances = channelBean.listTodaysSessionInstances(true, false, false); + listAll(); } public String navigateToManageBooking(BillSession bs) { @@ -1796,7 +1633,7 @@ public String navigateToManageBooking(BillSession bs) { fillFees(); fillSessionInstanceByDoctor(); calculateSelectedBillSessionTotal(); - return "/channel/manage_booking_by_date?faces-redirect=true"; + return "/channel/manage_booking_by_month?faces-redirect=true"; } public String navigateToOpdBilling(BillSession bs) { @@ -1867,7 +1704,7 @@ public String navigateBackToBookingsFromSessionInstance() { viewScopeDataTransferController.setNeedToFillMembershipDetails(false); viewScopeDataTransferController.setNeedToPrepareForNewBooking(true); - return "/channel/channel_booking_by_date?faces-redirect=true"; + return "/channel/channel_booking_by_month?faces-redirect=true"; } public String navigateBackToBookingsFromProfPay() { @@ -1885,7 +1722,7 @@ public String navigateBackToBookingsFromProfPay() { viewScopeDataTransferController.setNeedToFillMembershipDetails(false); viewScopeDataTransferController.setNeedToPrepareForNewBooking(true); - return "/channel/channel_booking_by_date?faces-redirect=true"; + return "/channel/channel_booking_by_month?faces-redirect=true"; } public String navigateBackToBookingsFromBillSession() { @@ -1903,7 +1740,7 @@ public String navigateBackToBookingsFromBillSession() { viewScopeDataTransferController.setNeedToFillMembershipDetails(false); viewScopeDataTransferController.setNeedToPrepareForNewBooking(true); - return "/channel/channel_booking_by_date?faces-redirect=true"; + return "/channel/channel_booking_by_month?faces-redirect=true"; } public String navigateBackToBookingsLoagingBillSessions() { @@ -2766,12 +2603,12 @@ public String startNewChannelBookingForSelectingSpeciality() { return navigateBackToBookingsFromSessionInstance(); } - public String startNewChannelBookingFormSelectingConsultant() { - resetToStartFromSelectingConsultant(); - generateSessions(); - printPreview = false; - return navigateBackToBookingsFromSessionInstance(); - } +// public String startNewChannelBookingFormSelectingConsultant() { +// resetToStartFromSelectingConsultant(); +// generateSessions(); +// printPreview = false; +// return navigateBackToBookingsFromSessionInstance(); +// } public String startNewChannelBookingForSelectingSession() { resetToStartFromSameSessionInstance(); @@ -3855,43 +3692,43 @@ public void calculateFeeForSessionInstances(List lstSs, Payment } } - public void generateSessions() { - sessionInstances = new ArrayList<>(); - String jpql; - Map params = new HashMap(); - params.put("staff", getStaff()); - params - .put("class", ServiceSession.class - ); - if (staff != null) { - jpql = "Select s From ServiceSession s " - + " where s.retired=false " - + " and s.staff=:staff " - + " and s.originatingSession is null" - + " and type(s)=:class "; - boolean listChannelSessionsForLoggedDepartmentOnly = configOptionApplicationController.getBooleanValueByKey("List Channel Sessions For Logged Department Only", false); - boolean listChannelSessionsForLoggedInstitutionOnly = configOptionApplicationController.getBooleanValueByKey("List Channel Sessions For Logged Institution Only", false); - if (listChannelSessionsForLoggedDepartmentOnly) { - jpql += " and s.department=:dept "; - params.put("dept", sessionController.getDepartment()); - } - if (listChannelSessionsForLoggedInstitutionOnly) { - jpql += " and s.institution=:ins "; - params.put("ins", sessionController.getInstitution()); - } - jpql += " order by s.sessionWeekday,s.startingTime "; - List selectedDoctorsServiceSessions = getServiceSessionFacade().findByJpql(jpql, params); - calculateFee(selectedDoctorsServiceSessions, channelBillController.getPaymentMethod()); - try { - sessionInstances = getChannelBean().generateSesionInstancesFromServiceSessions(selectedDoctorsServiceSessions, sessionStartingDate); - } catch (Exception e) { - } - generateSessionEvents(sessionInstances); - } else { - sessionInstances = new ArrayList<>(); - } - - } +// public void generateSessions() { +// sessionInstances = new ArrayList<>(); +// String jpql; +// Map params = new HashMap(); +// params.put("staff", getStaff()); +// params +// .put("class", ServiceSession.class +// ); +// if (staff != null) { +// jpql = "Select s From ServiceSession s " +// + " where s.retired=false " +// + " and s.staff=:staff " +// + " and s.originatingSession is null" +// + " and type(s)=:class "; +// boolean listChannelSessionsForLoggedDepartmentOnly = configOptionApplicationController.getBooleanValueByKey("List Channel Sessions For Logged Department Only", false); +// boolean listChannelSessionsForLoggedInstitutionOnly = configOptionApplicationController.getBooleanValueByKey("List Channel Sessions For Logged Institution Only", false); +// if (listChannelSessionsForLoggedDepartmentOnly) { +// jpql += " and s.department=:dept "; +// params.put("dept", sessionController.getDepartment()); +// } +// if (listChannelSessionsForLoggedInstitutionOnly) { +// jpql += " and s.institution=:ins "; +// params.put("ins", sessionController.getInstitution()); +// } +// jpql += " order by s.sessionWeekday,s.startingTime "; +// List selectedDoctorsServiceSessions = getServiceSessionFacade().findByJpql(jpql, params); +// calculateFee(selectedDoctorsServiceSessions, channelBillController.getPaymentMethod()); +// try { +// sessionInstances = getChannelBean().generateSesionInstancesFromServiceSessions(selectedDoctorsServiceSessions, sessionStartingDate); +// } catch (Exception e) { +// } +// generateSessionEvents(sessionInstances); +// } else { +// sessionInstances = new ArrayList<>(); +// } +// +// } public void generateSessionEvents(List sss) { eventModel = new DefaultScheduleModel(); @@ -3911,39 +3748,39 @@ public void onEventSelect(SelectEvent selectEvent) { fillBillSessions(); } - public void generateSessionsFutureBooking(SelectEvent event) { - fromDate = null; - fromDate = ((Date) event.getObject()); - sessionInstances = new ArrayList<>(); - Map m = new HashMap(); - - Date currenDate = new Date(); - if (getFromDate().before(currenDate)) { - JsfUtil.addErrorMessage("Please Select Future Date"); - return; - } - - String sql = ""; - - if (staff != null) { - Calendar c = Calendar.getInstance(); - c.setTime(getFromDate()); - int wd = c.get(Calendar.DAY_OF_WEEK); - - sql = "Select s From ServiceSession s " - + " where s.retired=false " - + " and s.staff=:staff " - + " and s.sessionWeekday=:wd "; - - m.put("staff", getStaff()); - m.put("wd", wd); - List tmp = getServiceSessionFacade().findByJpql(sql, m); - calculateFee(tmp, channelBillController.getPaymentMethod());//check work future bokking - sessionInstances = getChannelBean().generateSesionInstancesFromServiceSessions(tmp, fromDate); - } - - billSessions = new ArrayList<>(); - } +// public void generateSessionsFutureBooking(SelectEvent event) { +// fromDate = null; +// fromDate = ((Date) event.getObject()); +// sessionInstances = new ArrayList<>(); +// Map m = new HashMap(); +// +// Date currenDate = new Date(); +// if (getFromDate().before(currenDate)) { +// JsfUtil.addErrorMessage("Please Select Future Date"); +// return; +// } +// +// String sql = ""; +// +// if (staff != null) { +// Calendar c = Calendar.getInstance(); +// c.setTime(getFromDate()); +// int wd = c.get(Calendar.DAY_OF_WEEK); +// +// sql = "Select s From ServiceSession s " +// + " where s.retired=false " +// + " and s.staff=:staff " +// + " and s.sessionWeekday=:wd "; +// +// m.put("staff", getStaff()); +// m.put("wd", wd); +// List tmp = getServiceSessionFacade().findByJpql(sql, m); +// calculateFee(tmp, channelBillController.getPaymentMethod());//check work future bokking +// sessionInstances = getChannelBean().generateSesionInstancesFromServiceSessions(tmp, fromDate); +// } +// +// billSessions = new ArrayList<>(); +// } public boolean isPrintPreview() { return printPreview; @@ -6087,22 +5924,22 @@ public void setSelectedBillSession(BillSession selectedBillSession) { getChannelCancelController().setBillSession(selectedBillSession); } - @Override +// @Override public void toggalePatientEditable() { patientDetailsEditable = !patientDetailsEditable; } - @Override +// @Override public boolean isPatientDetailsEditable() { return patientDetailsEditable; } - @Override +// @Override public void setPatientDetailsEditable(boolean patientDetailsEditable) { this.patientDetailsEditable = patientDetailsEditable; } - @Override +// @Override public Patient getPatient() { if (patient == null) { patient = new Patient(); @@ -6113,7 +5950,7 @@ public Patient getPatient() { return patient; } - @Override +// @Override public void setPatient(Patient patient) { this.patient = patient; } @@ -6159,13 +5996,6 @@ public void setChannelSearchController(ChannelSearchController channelSearchCont this.channelSearchController = channelSearchController; } - public ChannelBean getChannelBean() { - return channelBean; - } - - public void setChannelBean(ChannelBean channelBean) { - this.channelBean = channelBean; - } public ItemFeeFacade getItemFeeFacade() { return ItemFeeFacade; @@ -7499,34 +7329,6 @@ public List getSessionInstancesFiltered() { return sessionInstancesFiltered; } - public List getSortedSessionInstances() { - - if (oldSessionInstancesFiltered == null) { - oldSessionInstancesFiltered = sessionInstancesFiltered; - } - - if (sortedSessionInstances == null) { - if (sessionInstancesFiltered != null) { - sessionInstances = channelBean.listSessionInstances(fromDate, toDate, null, null, null); - System.out.println("sortedSessionInstances == null"); - filterSessionInstances(); - sortSessions(); - } - } - - if (oldSessionInstancesFiltered != sessionInstancesFiltered) { - if (sessionInstancesFiltered != null) { - sessionInstances = channelBean.listSessionInstances(fromDate, toDate, null, null, null); - System.out.println("sortedSessionInstances == null"); - filterSessionInstances(); - sortSessions(); - } - oldSessionInstancesFiltered = sortedSessionInstances; - } - - return sortedSessionInstances; - } - private void sortSessions() { sortedSessionInstances = new ArrayList<>(sessionInstancesFiltered); Collections.sort(sortedSessionInstances, new Comparator() { @@ -7660,14 +7462,14 @@ public void setDisableRefund(boolean disableRefund) { this.disableRefund = disableRefund; } - @Override +// @Override public void selectQuickOneFromQuickSearchPatient() { setPatient(patient); setPatientDetailsEditable(false); quickSearchPatientList = null; } - @Override +// @Override public void saveSelected(Patient p) { if (patient == null) { return; @@ -7692,22 +7494,22 @@ public void saveSelected(Patient p) { } } - @Override +// @Override public void saveSelectedPatient() { saveSelected(patient); } - @Override +// @Override public String getQuickSearchPhoneNumber() { return quickSearchPhoneNumber; } - @Override +// @Override public void setQuickSearchPhoneNumber(String quickSearchPhoneNumber) { this.quickSearchPhoneNumber = quickSearchPhoneNumber; } - @Override +// @Override public void quickSearchPatientLongPhoneNumber() { Patient patientSearched = null; String j; @@ -7744,7 +7546,7 @@ public void quickSearchPatientLongPhoneNumber() { } } - @Override +// @Override public void quickSearchNewPatient() { quickSearchPatientList = null; setPatient(new Patient()); @@ -7755,12 +7557,12 @@ public void quickSearchNewPatient() { } } - @Override +// @Override public List getQuickSearchPatientList() { return quickSearchPatientList; } - @Override +// @Override public void setQuickSearchPatientList(List quickSearchPatientList) { this.quickSearchPatientList = quickSearchPatientList; } diff --git a/src/main/java/com/divudi/bean/common/ConfigOptionApplicationController.java b/src/main/java/com/divudi/bean/common/ConfigOptionApplicationController.java index d8442d7e06..d7b6ef1774 100644 --- a/src/main/java/com/divudi/bean/common/ConfigOptionApplicationController.java +++ b/src/main/java/com/divudi/bean/common/ConfigOptionApplicationController.java @@ -1,6 +1,7 @@ package com.divudi.bean.common; import com.divudi.bean.common.util.JsfUtil; +import com.divudi.data.Denomination; import com.divudi.data.OptionScope; import com.divudi.data.OptionValueType; import com.divudi.entity.Department; @@ -22,6 +23,7 @@ import javax.enterprise.context.ApplicationScoped; import javax.faces.context.ExternalContext; import javax.faces.context.FacesContext; +import org.json.JSONArray; /** * @@ -35,6 +37,7 @@ public class ConfigOptionApplicationController implements Serializable { private ConfigOptionFacade optionFacade; private List options; + private List denominations; /** * Creates a new instance of OptionController @@ -47,7 +50,27 @@ public ConfigOptionApplicationController() { @PostConstruct public void init() { loadApplicationOptions(); - + + } + + private void initializeDenominations() { + String denominationsStr = getLongTextValueByKey("Currency Denominations"); + denominations = Arrays.stream(denominationsStr.split(",")) + .map(Integer::parseInt) + .map(value -> new Denomination(value, 0)) + .collect(Collectors.toList()); + } + + public List getCurrencyDenominations() { + String denominationsStr = getLongTextValueByKey("Currency Denominations"); + return Arrays.stream(denominationsStr.split(",")) + .map(Integer::parseInt) + .collect(Collectors.toList()); + } + + public String getCurrencyDenominationsAsJson() { + List denominations = getCurrencyDenominations(); + return new JSONArray(denominations).toString(); } public void loadApplicationOptions() { @@ -56,6 +79,7 @@ public void loadApplicationOptions() { for (ConfigOption option : options) { applicationOptions.put(option.getOptionKey(), option); } + initializeDenominations(); } public ConfigOption getApplicationOption(String key) { @@ -79,6 +103,10 @@ public void saveOption(ConfigOption option) { } } + public List getDenominations() { + return denominations; + } + public void saveShortTextOption(String key, String value) { ConfigOption option = getApplicationOption(key); if (option == null) { diff --git a/src/main/java/com/divudi/data/Denomination.java b/src/main/java/com/divudi/data/Denomination.java new file mode 100644 index 0000000000..1dcf19c60a --- /dev/null +++ b/src/main/java/com/divudi/data/Denomination.java @@ -0,0 +1,33 @@ +package com.divudi.data; + +/** + * + * @author buddhika + */ +public class Denomination { + private int value; + private int count; + + public Denomination() {} + + public Denomination(int value, int count) { + this.value = value; + this.count = count; + } + + public int getValue() { + return value; + } + + public void setValue(int value) { + this.value = value; + } + + public int getCount() { + return count; + } + + public void setCount(int count) { + this.count = count; + } +} diff --git a/src/main/java/com/divudi/entity/Payment.java b/src/main/java/com/divudi/entity/Payment.java index 58f871b2db..9dbb3b3cfd 100644 --- a/src/main/java/com/divudi/entity/Payment.java +++ b/src/main/java/com/divudi/entity/Payment.java @@ -1,12 +1,17 @@ /* -* Dr M H B Ariyaratne + * Dr M H B Ariyaratne * buddhika.ari@gmail.com */ package com.divudi.entity; +import com.divudi.data.Denomination; import com.divudi.data.PaymentMethod; import java.io.Serializable; +import java.util.ArrayList; import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import javax.persistence.Entity; import javax.persistence.EnumType; import javax.persistence.Enumerated; @@ -16,15 +21,15 @@ import javax.persistence.Lob; import javax.persistence.ManyToOne; import javax.persistence.Temporal; +import javax.persistence.Transient; +import org.json.JSONArray; +import org.json.JSONObject; -/** - * - * @author Buddhika - */ @Entity public class Payment implements Serializable { static final long serialVersionUID = 1L; + @Id @GeneratedValue(strategy = GenerationType.AUTO) Long id; @@ -34,18 +39,21 @@ public class Payment implements Serializable { @Temporal(javax.persistence.TemporalType.DATE) Date writtenAt; + @Temporal(javax.persistence.TemporalType.DATE) Date toRealizeAt; @Enumerated(EnumType.STRING) PaymentMethod paymentMethod; - //Realization Properties boolean realized; + @Temporal(javax.persistence.TemporalType.DATE) Date realizedAt; + @ManyToOne - WebUser realiazer; + WebUser realizer; + @Lob String realizeComments; @@ -55,38 +63,49 @@ public class Payment implements Serializable { @Lob String comments; - //Created Properties @ManyToOne WebUser creater; + @Temporal(javax.persistence.TemporalType.TIMESTAMP) Date createdAt; - //Retairing properties + boolean retired; + @ManyToOne WebUser retirer; + @Temporal(javax.persistence.TemporalType.TIMESTAMP) Date retiredAt; + String retireComments; - // - //paymentMethord Details - // Can be use as a reference number for any payment method private String chequeRefNo; + @Temporal(javax.persistence.TemporalType.DATE) private Date chequeDate; + private String creditCardRefNo; double paidValue; - + private int creditDurationInDays; + @Lob + private String currencyDenominationsJson; + @ManyToOne Institution institution; + @ManyToOne Department department; + + @Transient + private List currencyDenominations; - + @Transient + private List humanReadableDenominations; + public Long getId() { return id; } @@ -94,6 +113,18 @@ public Long getId() { public void setId(Long id) { this.id = id; } + + public List getHumanReadableDenominations() { + List humanReadableList = new ArrayList<>(); + deserializeDenominations(); + if (this.currencyDenominations != null) { + for (Denomination denomination : this.currencyDenominations) { + String humanReadable = "Denomination: " + denomination.getValue() + ", Count: " + denomination.getCount() + ", Value: " + (denomination.getValue() * denomination.getCount()); + humanReadableList.add(humanReadable); + } + } + return humanReadableList; + } public Bill getBill() { return bill; @@ -143,12 +174,12 @@ public void setRealizedAt(Date realizedAt) { this.realizedAt = realizedAt; } - public WebUser getRealiazer() { - return realiazer; + public WebUser getRealizer() { + return realizer; } - public void setRealiazer(WebUser realiazer) { - this.realiazer = realiazer; + public void setRealizer(WebUser realizer) { + this.realizer = realizer; } public String getRealizeComments() { @@ -247,7 +278,7 @@ public boolean equals(Object object) { public String toString() { return "com.divudi.entity.Payment[ id=" + id + " ]"; } - + // Can be use as a reference number for any payment method public String getChequeRefNo() { return chequeRefNo; @@ -281,6 +312,14 @@ public void setPaidValue(double paidValue) { this.paidValue = paidValue; } + public int getCreditDurationInDays() { + return creditDurationInDays; + } + + public void setCreditDurationInDays(int creditDurationInDays) { + this.creditDurationInDays = creditDurationInDays; + } + public Institution getInstitution() { return institution; } @@ -307,10 +346,11 @@ public Payment copyAttributes() { newPayment.setPaymentMethod(this.paymentMethod); newPayment.setRealized(this.realized); newPayment.setRealizedAt(this.realizedAt); - newPayment.setRealiazer(this.realiazer); + newPayment.setRealizer(this.realizer); newPayment.setRealizeComments(this.realizeComments); newPayment.setBank(this.bank); newPayment.setComments(this.comments); + newPayment.setCurrencyDenominationsJson(this.currencyDenominationsJson); newPayment.setCreater(this.creater); newPayment.setCreatedAt(this.createdAt); newPayment.setRetired(this.retired); @@ -329,12 +369,53 @@ public Payment copyAttributes() { return newPayment; } - public int getCreditDurationInDays() { - return creditDurationInDays; + public void setCurrencyDenominationsJson(String currencyDenominationsJson) { + this.currencyDenominationsJson = currencyDenominationsJson; + } + + public void serializeDenominations() { + if (this.currencyDenominations != null) { + JSONArray jsonArray = new JSONArray(); + for (Denomination denomination : this.currencyDenominations) { + if (denomination != null) { + JSONObject jsonObject = new JSONObject(); + jsonObject.put("value", denomination.getValue()); + jsonObject.put("count", denomination.getCount()); + jsonArray.put(jsonObject); + } + } + this.currencyDenominationsJson = jsonArray.toString(); + } else { + this.currencyDenominationsJson = "[]"; // Empty JSON array if currencyDenominations is null + } } + + - public void setCreditDurationInDays(int creditDurationInDays) { - this.creditDurationInDays = creditDurationInDays; + public void deserializeDenominations() { + if (this.currencyDenominationsJson != null && !this.currencyDenominationsJson.isEmpty()) { + try { + JSONArray jsonArray = new JSONArray(this.currencyDenominationsJson); + this.currencyDenominations = new ArrayList<>(); + for (int i = 0; i < jsonArray.length(); i++) { + JSONObject jsonObject = jsonArray.getJSONObject(i); + if (jsonObject.has("value") && jsonObject.has("count")) { + int value = jsonObject.getInt("value"); + int count = jsonObject.getInt("count"); + this.currencyDenominations.add(new Denomination(value, count)); + } + } + } catch (Exception e) { + System.out.println("Error deserializing currency denominations: " + e.getMessage()); + this.currencyDenominations = new ArrayList<>(); // Initialize to an empty list on error + } + } else { + this.currencyDenominations = new ArrayList<>(); // Initialize to an empty list if JSON is null or empty + } } + + public String getCurrencyDenominationsJson() { + return currencyDenominationsJson; + } } diff --git a/src/main/webapp/cashier/initial_fund_bill.xhtml b/src/main/webapp/cashier/initial_fund_bill.xhtml index 972bfbfcfd..f3b68abcae 100644 --- a/src/main/webapp/cashier/initial_fund_bill.xhtml +++ b/src/main/webapp/cashier/initial_fund_bill.xhtml @@ -75,20 +75,56 @@ - - - - - + + + + + + + + + + + + + + + + + + + + +
Total Value + +
Denominations
+ + + + + +
+
+ + + + + + + + + - + @@ -169,6 +205,14 @@ + + + +
+
+ #{bp.currencyDenominationsJson} +
+ + xmlns:ez="http://xmlns.jcp.org/jsf/composite/ezcomp" + xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> Channel Booking By Date @@ -49,16 +50,19 @@
- +
- - - - - + + + + +
@@ -71,13 +75,13 @@ styleClass="ui-button-warning mx-1" action="#{opdBillController.navigateToNewOpdBill()}" rendered="#{configOptionApplicationController.getBooleanValueByKey('Enable Navigation Button To OPD Billing From Channel Booking By Date')}"/> - + + action="#{bookingControllerViewScopeMonth.listCompleted}" /> + action="#{bookingControllerViewScopeMonth.listOngoing}" /> + action="#{bookingControllerViewScopeMonth.listPending}" /> + action="#{bookingControllerViewScopeMonth.listCancelled}" /> @@ -110,7 +114,7 @@ title="All" icon="fa fa-list" styleClass="ui-button-primary mx-1" - action="#{bookingControllerViewScopeMonth.listAllSesionInstances()}" /> + action="#{bookingControllerViewScopeMonth.listAll}" /> @@ -123,7 +127,7 @@
- +
@@ -265,10 +269,352 @@
- - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #{ps.person.name} + + + #{ps.person.phone} + + + #{ps.person.mobile} + + + + + + + + + + + + + + + + +
+
+ + + + + +
+
+ + + + + + +
+
+ +
+
+ + + + +
+
+
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+
+
+ +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/src/main/webapp/channel/manage_booking_by_month.xhtml b/src/main/webapp/channel/manage_booking_by_month.xhtml new file mode 100644 index 0000000000..b21e72b603 --- /dev/null +++ b/src/main/webapp/channel/manage_booking_by_month.xhtml @@ -0,0 +1,1743 @@ + + + + + + + + + + + +
+
+
+ | +
+ + () -
+ +
+ +
+ + +
+
+ +
+ + +
+
+ + + + + + + + + + + + + + +
+
+
+
+ + + + + + + + + + + + + +
+
+ + +
+ + +
+
+ +
+ +
+ +
+ + + + + + + + + + + + +
+
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+
+
+
+ + +
+
+ +
+ +
+ +
+ + + + + + + + + + + + + +
+
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+
+
+
+ + +
+
+ +
+ +
+ +
+ + + + + + + + + + + + + +
+
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+
+
+
+ + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + +
+
+ + + + + +
+ +
+ + + + +
+
+ +
+ + +
+
+
+ + + + + +
+
+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + +
+
+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + +
+
+
+ + + + + + + + + #{ix.institutionCode} + #{ix.name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +
+
+ + + + + + + + +
+
+
+
+ + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+
+ + + +
+ + + + + + + +
+
+
+
+ +
+
+ + +
+ + + + +
+ +
+ +

You Do Not Have Permission to Access The Requested Page

+
+
+ +
+ +
+ +
+ + +
+ + + + + + + + + + + + + + +
+
+
+
+
+ + + + + + + + + + + + + + + + +
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
+ +
+ + + + + + + + + + + + + + + +
+
+ +

Are you sure you want to cancel the channel booking?

+ + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + +
+
+ + +
+ + + +
+ + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #{bs.bill.bookingId} + + + + + + + + #{bs.serviceSession.staff.speciality.name} + + + + + + + + + #{bs.serviceSession.staff.person.nameWithTitle} + + + + + + + + + #{bs.serviceSession.name} + + + + + + + + + #{bs.serialNo} + + + + + + + + + #{bs.bill.patient.person.nameWithTitle} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ +
+
+ + + +
+
+ + + + + + Name + #{myItem.name} + + + Consultant + + + + + + + Session Date + + + + + + + Session TIme + + + + + + + + +
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file diff --git a/src/main/webapp/channel/session_instance.xhtml b/src/main/webapp/channel/session_instance.xhtml index 697b3008ac..bcefacc0c3 100644 --- a/src/main/webapp/channel/session_instance.xhtml +++ b/src/main/webapp/channel/session_instance.xhtml @@ -16,73 +16,73 @@
- - () + + ()
- +
+ rendered="#{bookingControllerViewScopeMonth.selectedSessionInstance.completed}"> - - - - - - - + @@ -151,7 +151,7 @@ icon="pi pi-user-plus" title="OPD" ajax="false" - action="#{bookingControllerViewScope.navigateToOpdBilling(bs)}" + action="#{bookingControllerViewScopeMonth.navigateToOpdBilling(bs)}" disabled="#{(bs.bill.paidAmount eq 0 and bs.bill.paymentMethod eq 'OnCall')}" class="ui-button-secondary mx-1"> @@ -159,7 +159,7 @@ icon="pi pi-cog" title="Manage Booking" ajax="false" - action="#{bookingControllerViewScope.navigateToManageBooking(bs)}" + action="#{bookingControllerViewScopeMonth.navigateToManageBooking(bs)}" class="ui-button-secondary "> @@ -190,7 +190,7 @@ ajax="false" id="btnSave" value="Save" - action="#{bookingControllerViewScope.saveSessionInstanceDetails()}" + action="#{bookingControllerViewScopeMonth.saveSessionInstanceDetails()}" class="ui-button ui-button-warning" icon="pi pi-save"> @@ -199,7 +199,7 @@ ajax="false" id="btnEditSession" value="To Edit" - action="#{bookingControllerViewScope.navigateToEditSessionInstance()}" + action="#{bookingControllerViewScopeMonth.navigateToEditSessionInstance()}" class="ui-button ui-button-info" icon="pi pi-pencil"> @@ -208,7 +208,7 @@ ajax="false" id="btnEditOriginSession" value="To Edit Originating Session" - action="#{bookingControllerViewScope.navigateToEditOriginatingSession()}" + action="#{bookingControllerViewScopeMonth.navigateToEditOriginatingSession()}" class="ui-button ui-button-secondary" icon="pi pi-external-link"> @@ -220,31 +220,31 @@ - + - - + + + rendered="#{bookingControllerViewScopeMonth.selectedSessionInstance.sessionDate ne null}" > - - - - - - - - - + + + + + + + + + - - + + @@ -252,43 +252,43 @@ - - - + - + - + - - + - + - + @@ -305,8 +305,8 @@ + value="#{bookingControllerViewScopeMonth.selectedSessionInstance.sessionWeekday}" + disabled="#{bookingControllerViewScopeMonth.selectedSessionInstance.id ne null}"> @@ -323,7 +323,7 @@ - + @@ -335,28 +335,28 @@ - + - + - + - - + - + - + - + @@ -367,10 +367,10 @@ - + - + @@ -378,7 +378,7 @@ - + @@ -408,7 +408,7 @@ - + @@ -498,42 +498,42 @@ - - + + - + - + - + - + - + - + - + - + - + - + diff --git a/src/main/webapp/resources/ezcomp/common/patient_details_view_scope.xhtml b/src/main/webapp/resources/ezcomp/common/patient_details_view_scope.xhtml index 217d5420d4..e1ff5f6a2c 100644 --- a/src/main/webapp/resources/ezcomp/common/patient_details_view_scope.xhtml +++ b/src/main/webapp/resources/ezcomp/common/patient_details_view_scope.xhtml @@ -11,7 +11,8 @@ - + + @@ -134,8 +135,6 @@
@@ -212,8 +207,6 @@ yearNavigator="true" monthNavigator="true" inputStyleClass="form-control" - required="#{configOptionApplicationController.getBooleanValueByKey('Patients Date of Birth is Mandatory')}" - requiredMessage="Please select a date of birth" pattern="#{sessionController.applicationPreference.longDateFormat}" placeholder="Date of Birth (dd/mm/yyyy)" > @@ -232,8 +225,6 @@ placeholder="Mobile Number" value="#{cc.attrs.controller.patient.mobileNumberStringTransient}" class="form-control" - required="#{configOptionApplicationController.getBooleanValueByKey('Patients Mobile Number is Mandatory')}" - requiredMessage="Please enter a Mobile Number" validatorMessage="Please enter valid Number"> @@ -245,8 +236,6 @@ id="txtPhone" autocomplete="off" placeholder="Phone Number" - required="#{configOptionApplicationController.getBooleanValueByKey('Patients Phone Number is Mandatory')}" - requiredMessage="Please enter a Mobile Number" value="#{cc.attrs.controller.patient.phoneNumberStringTransient}" class="form-control" validatorMessage="Please enter valid Number"> @@ -256,8 +245,6 @@
@@ -293,11 +276,10 @@
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #{ps.person.name} + + + #{ps.person.phone} + + + #{ps.person.mobile} + + + + + + + + + + + + + + + + +
+
+ + + + + +
+
+ + + + + + +
+
+ +
+
+ + + + +
+
+
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+
+
+ +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ \ No newline at end of file diff --git a/src/main/webapp/resources/ezcomp/menu.xhtml b/src/main/webapp/resources/ezcomp/menu.xhtml index a938bedbde..54dc7a7edc 100644 --- a/src/main/webapp/resources/ezcomp/menu.xhtml +++ b/src/main/webapp/resources/ezcomp/menu.xhtml @@ -888,12 +888,6 @@ action="#{bookingControllerViewScopeMonth.navigateToChannelBookingFromMenuByMonth()}" rendered="#{webUserController.hasPrivilege('ChannellingChannelBooking')}" > - - Date: Sat, 20 Jul 2024 17:27:19 +0530 Subject: [PATCH 02/27] CLoses #6474 Signed-off-by: buddhika75 --- src/main/webapp/channel/channel_booking_by_month.xhtml | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/main/webapp/channel/channel_booking_by_month.xhtml b/src/main/webapp/channel/channel_booking_by_month.xhtml index 8a5b7703eb..c4ee972eeb 100644 --- a/src/main/webapp/channel/channel_booking_by_month.xhtml +++ b/src/main/webapp/channel/channel_booking_by_month.xhtml @@ -107,7 +107,6 @@ styleClass="ui-button-danger mx-1" action="#{bookingControllerViewScopeMonth.listCancelled}" /> - - -
From 34477fefa6f4b1196598cba2a2383c273c094f36 Mon Sep 17 00:00:00 2001 From: buddhika75 Date: Sat, 20 Jul 2024 18:19:43 +0530 Subject: [PATCH 03/27] Closes #6477 Signed-off-by: buddhika75 --- pom.xml | 4 +- .../bean/channel/BookingController.java | 128 +++++++++--------- .../channel/BookingControllerViewScope.java | 14 -- .../ConfigOptionApplicationController.java | 15 +- src/main/resources/META-INF/persistence.xml | 4 +- src/main/webapp/WEB-INF/glassfish-web.xml | 2 +- 6 files changed, 79 insertions(+), 88 deletions(-) diff --git a/pom.xml b/pom.xml index 353cd12134..f70ead4452 100644 --- a/pom.xml +++ b/pom.xml @@ -3,10 +3,10 @@ 4.0.0 com.divudi - sethmademo + sethma 3.0.0 war - sethmademo + sethma ${project.build.directory}/endorsed diff --git a/src/main/java/com/divudi/bean/channel/BookingController.java b/src/main/java/com/divudi/bean/channel/BookingController.java index bfd01fd87f..b4f58b7272 100644 --- a/src/main/java/com/divudi/bean/channel/BookingController.java +++ b/src/main/java/com/divudi/bean/channel/BookingController.java @@ -205,8 +205,6 @@ public class BookingController implements Serializable, ControllerWithPatient { @Inject private CommonController commonController; - * Properties - */ private Speciality speciality; private Staff staff; private Staff toStaff; @@ -688,69 +686,69 @@ public String smsBody(BillSession r) { + url; return b; } - - public void sendChannellingStatusUpdateNotificationSms(BillSession methodBillSession) { - if (methodBillSession == null) { - JsfUtil.addErrorMessage("Nothing to send"); - return; - } - if (methodBillSession.getSessionInstance() == null) { - JsfUtil.addErrorMessage("No Session"); - return; - } - if (methodBillSession.getSessionInstance().getOriginatingSession() == null) { - JsfUtil.addErrorMessage("No Originating Session"); - return; - } - if (methodBillSession.getBill() == null) { - JsfUtil.addErrorMessage("No Bill"); - return; - } - if (methodBillSession.getBill().getPatient() == null) { - JsfUtil.addErrorMessage("No Bill"); - return; - } - - if (!methodBillSession.getBill().getPatient().getPerson().getSmsNumber().trim().equals("")) { - Sms e = new Sms(); - e.setCreatedAt(new Date()); - e.setCreater(sessionController.getLoggedUser()); - e.setBill(methodBillSession.getBill()); - e.setCreatedAt(new Date()); - e.setSmsType(MessageType.ChannelStatusUpdate); - e.setCreater(sessionController.getLoggedUser()); - e.setReceipientNumber(methodBillSession.getBill().getPatient().getPerson().getSmsNumber()); - e.setSendingMessage(smsBody(methodBillSession)); - e.setDepartment(getSessionController().getLoggedUser().getDepartment()); - e.setInstitution(getSessionController().getLoggedUser().getInstitution()); - e.setPending(false); - getSmsFacade().create(e); - - Boolean sent = smsManager.sendSms(e); - e.setSentSuccessfully(sent); - getSmsFacade().edit(e); - - } - - JsfUtil.addSuccessMessage("SMS Sent"); - } - - public String smsBody(BillSession r) { - String securityKey = sessionController.getApplicationPreference().getEncrptionKey(); - if (securityKey == null || securityKey.trim().equals("")) { - sessionController.getApplicationPreference().setEncrptionKey(securityController.generateRandomKey(10)); - sessionController.savePreferences(sessionController.getApplicationPreference()); - } - Calendar c = Calendar.getInstance(); - c.add(Calendar.DATE, 2); - String temId = securityController.encryptAlphanumeric(r.getId().toString(), securityKey); - String url = commonController.getBaseUrl() + "faces/requests/cbss.xhtml?id=" + temId; - String b = "Your session of " - + r.getSessionInstance().getOriginatingSession().getName() - + " Started. " - + url; - return b; - } +// +// public void sendChannellingStatusUpdateNotificationSms(BillSession methodBillSession) { +// if (methodBillSession == null) { +// JsfUtil.addErrorMessage("Nothing to send"); +// return; +// } +// if (methodBillSession.getSessionInstance() == null) { +// JsfUtil.addErrorMessage("No Session"); +// return; +// } +// if (methodBillSession.getSessionInstance().getOriginatingSession() == null) { +// JsfUtil.addErrorMessage("No Originating Session"); +// return; +// } +// if (methodBillSession.getBill() == null) { +// JsfUtil.addErrorMessage("No Bill"); +// return; +// } +// if (methodBillSession.getBill().getPatient() == null) { +// JsfUtil.addErrorMessage("No Bill"); +// return; +// } +// +// if (!methodBillSession.getBill().getPatient().getPerson().getSmsNumber().trim().equals("")) { +// Sms e = new Sms(); +// e.setCreatedAt(new Date()); +// e.setCreater(sessionController.getLoggedUser()); +// e.setBill(methodBillSession.getBill()); +// e.setCreatedAt(new Date()); +// e.setSmsType(MessageType.ChannelStatusUpdate); +// e.setCreater(sessionController.getLoggedUser()); +// e.setReceipientNumber(methodBillSession.getBill().getPatient().getPerson().getSmsNumber()); +// e.setSendingMessage(smsBody(methodBillSession)); +// e.setDepartment(getSessionController().getLoggedUser().getDepartment()); +// e.setInstitution(getSessionController().getLoggedUser().getInstitution()); +// e.setPending(false); +// getSmsFacade().create(e); +// +// Boolean sent = smsManager.sendSms(e); +// e.setSentSuccessfully(sent); +// getSmsFacade().edit(e); +// +// } +// +// JsfUtil.addSuccessMessage("SMS Sent"); +// } +// +// public String smsBody(BillSession r) { +// String securityKey = sessionController.getApplicationPreference().getEncrptionKey(); +// if (securityKey == null || securityKey.trim().equals("")) { +// sessionController.getApplicationPreference().setEncrptionKey(securityController.generateRandomKey(10)); +// sessionController.savePreferences(sessionController.getApplicationPreference()); +// } +// Calendar c = Calendar.getInstance(); +// c.add(Calendar.DATE, 2); +// String temId = securityController.encryptAlphanumeric(r.getId().toString(), securityKey); +// String url = commonController.getBaseUrl() + "faces/requests/cbss.xhtml?id=" + temId; +// String b = "Your session of " +// + r.getSessionInstance().getOriginatingSession().getName() +// + " Started. " +// + url; +// return b; +// } public String navigateToAddBooking() { if (staff == null) { diff --git a/src/main/java/com/divudi/bean/channel/BookingControllerViewScope.java b/src/main/java/com/divudi/bean/channel/BookingControllerViewScope.java index 2e054a28ff..d3e9362960 100644 --- a/src/main/java/com/divudi/bean/channel/BookingControllerViewScope.java +++ b/src/main/java/com/divudi/bean/channel/BookingControllerViewScope.java @@ -1959,15 +1959,6 @@ public String navigateToNurseViewWithItems() { } } - public String navigateToNurseViewWithItems() { - if (preSet()) { - getChannelReportController().fillNurseView(); - return "/channel/channel_views/channel_nurse_view_with_items?faces-redirect=true"; - } else { - return ""; - } - } - public String navigateToDoctorView() { if (preSet()) { getChannelReportController().fillDoctorView(); @@ -3136,11 +3127,6 @@ public long totalReservedNumberCount(SessionInstance s){ return reservedNumberCount; } - public long totalReservedNumberCount(SessionInstance s) { - List reservedNumbers = CommonFunctions.convertStringToIntegerList(s.getReserveNumbers()); - long reservedNumberCount = reservedNumbers.size(); - return reservedNumberCount; - } public BillSession addChannelBookingForOnlinePayment() { errorText = ""; diff --git a/src/main/java/com/divudi/bean/common/ConfigOptionApplicationController.java b/src/main/java/com/divudi/bean/common/ConfigOptionApplicationController.java index d7b6ef1774..8defc92dcd 100644 --- a/src/main/java/com/divudi/bean/common/ConfigOptionApplicationController.java +++ b/src/main/java/com/divudi/bean/common/ConfigOptionApplicationController.java @@ -11,6 +11,7 @@ import com.divudi.facade.ConfigOptionFacade; import javax.inject.Named; import java.io.Serializable; +import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Date; @@ -55,10 +56,16 @@ public void init() { private void initializeDenominations() { String denominationsStr = getLongTextValueByKey("Currency Denominations"); - denominations = Arrays.stream(denominationsStr.split(",")) - .map(Integer::parseInt) - .map(value -> new Denomination(value, 0)) - .collect(Collectors.toList()); + if (denominationsStr != null && !denominationsStr.trim().isEmpty()) { + denominations = Arrays.stream(denominationsStr.split(",")) + .map(String::trim) // Trim any extra spaces + .filter(s -> !s.isEmpty()) // Filter out empty strings + .map(Integer::parseInt) + .map(value -> new Denomination(value, 0)) + .collect(Collectors.toList()); + } else { + denominations = new ArrayList<>(); // Initialize to an empty list if the string is null or empty + } } public List getCurrencyDenominations() { diff --git a/src/main/resources/META-INF/persistence.xml b/src/main/resources/META-INF/persistence.xml index 6553951ab8..fcb739ccc4 100644 --- a/src/main/resources/META-INF/persistence.xml +++ b/src/main/resources/META-INF/persistence.xml @@ -1,14 +1,14 @@ - jdbc/demos + jdbc/sethma false - jdbc/demoaudit + jdbc/sethmaAudit false diff --git a/src/main/webapp/WEB-INF/glassfish-web.xml b/src/main/webapp/WEB-INF/glassfish-web.xml index d92795745e..2ef047d83a 100644 --- a/src/main/webapp/WEB-INF/glassfish-web.xml +++ b/src/main/webapp/WEB-INF/glassfish-web.xml @@ -1,7 +1,7 @@ - /sethmademo + /sethma From 1dd1dc1f75e40b57f72985eb1bd63a068b821549 Mon Sep 17 00:00:00 2001 From: buddhika75 Date: Sat, 20 Jul 2024 21:03:42 +0530 Subject: [PATCH 04/27] Signed-off-by: buddhika75 --- pom.xml | 4 +- .../FinancialTransactionController.java | 19 +++- src/main/java/com/divudi/entity/Payment.java | 10 ++ src/main/webapp/WEB-INF/glassfish-web.xml | 2 +- .../webapp/cashier/initial_fund_bill.xhtml | 92 +++++++++++++------ .../cashier/shift_end_summery_bill.xhtml | 19 ++-- 6 files changed, 101 insertions(+), 45 deletions(-) diff --git a/pom.xml b/pom.xml index f70ead4452..353cd12134 100644 --- a/pom.xml +++ b/pom.xml @@ -3,10 +3,10 @@ 4.0.0 com.divudi - sethma + sethmademo 3.0.0 war - sethma + sethmademo ${project.build.directory}/endorsed diff --git a/src/main/java/com/divudi/bean/cashTransaction/FinancialTransactionController.java b/src/main/java/com/divudi/bean/cashTransaction/FinancialTransactionController.java index 846cca694c..2e7baddb3e 100644 --- a/src/main/java/com/divudi/bean/cashTransaction/FinancialTransactionController.java +++ b/src/main/java/com/divudi/bean/cashTransaction/FinancialTransactionController.java @@ -23,6 +23,7 @@ import com.divudi.data.ReportTemplateRow; import com.divudi.data.ReportTemplateRowBundle; +import com.divudi.data.dataStructure.PaymentMethodData; import com.divudi.entity.WebUser; import com.divudi.java.CommonFunctions; import javax.inject.Named; @@ -74,6 +75,7 @@ public class FinancialTransactionController implements Serializable { // private Bill currentBill; private Payment currentPayment; + private PaymentMethodData paymentMethodData; private Payment removingPayment; private List currentBillPayments; private List currentBills; @@ -643,6 +645,7 @@ public void addPaymentToInitialFundBill() { getCurrentBillPayments().add(currentPayment); calculateInitialFundBillTotal(); currentPayment = null; + getCurrentPayment(); } public void addPaymentToFundTransferBill() { @@ -1522,9 +1525,23 @@ public Payment getCurrentPayment() { if (currentPayment == null) { currentPayment = new Payment(); } + if (currentPayment.getCurrencyDenominations() == null) { + currentPayment.setCurrencyDenominations(configOptionApplicationController.getDenominations()); + } return currentPayment; } + public PaymentMethodData getPaymentMethodData() { + if (paymentMethodData == null) { + paymentMethodData = new PaymentMethodData(); + } + return paymentMethodData; + } + + public void setPaymentMethodData(PaymentMethodData paymentMethodData) { + this.paymentMethodData = paymentMethodData; + } + public void updateCashDenominations(AjaxBehaviorEvent event) { System.out.println("updateCashDenominations called"); @@ -1534,7 +1551,7 @@ public void updateCashDenominations(AjaxBehaviorEvent event) { } double total = 0; - List denominations = configOptionApplicationController.getDenominations(); + List denominations = currentPayment.getCurrencyDenominations(); for (Denomination denomination : denominations) { int value = denomination.getCount(); System.out.println("Processing denomination: " + denomination.getValue() + " with count: " + value); diff --git a/src/main/java/com/divudi/entity/Payment.java b/src/main/java/com/divudi/entity/Payment.java index 9dbb3b3cfd..9240ddc60a 100644 --- a/src/main/java/com/divudi/entity/Payment.java +++ b/src/main/java/com/divudi/entity/Payment.java @@ -418,4 +418,14 @@ public void deserializeDenominations() { public String getCurrencyDenominationsJson() { return currencyDenominationsJson; } + + public List getCurrencyDenominations() { + return currencyDenominations; + } + + public void setCurrencyDenominations(List currencyDenominations) { + this.currencyDenominations = currencyDenominations; + } + + } diff --git a/src/main/webapp/WEB-INF/glassfish-web.xml b/src/main/webapp/WEB-INF/glassfish-web.xml index 2ef047d83a..d92795745e 100644 --- a/src/main/webapp/WEB-INF/glassfish-web.xml +++ b/src/main/webapp/WEB-INF/glassfish-web.xml @@ -1,7 +1,7 @@ - /sethma + /sethmademo diff --git a/src/main/webapp/cashier/initial_fund_bill.xhtml b/src/main/webapp/cashier/initial_fund_bill.xhtml index f3b68abcae..dad68501f7 100644 --- a/src/main/webapp/cashier/initial_fund_bill.xhtml +++ b/src/main/webapp/cashier/initial_fund_bill.xhtml @@ -5,11 +5,14 @@ xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:p="http://primefaces.org/ui" xmlns:prints="http://xmlns.jcp.org/jsf/composite/ezcomp/prints" + xmlns:pa="http://xmlns.jcp.org/jsf/composite/paymentMethod" xmlns:f="http://xmlns.jcp.org/jsf/core"> - - - + + + + + @@ -75,29 +78,31 @@
- + - - - - - - - - - - - - - - - - + + - -
Total Value - -
Denominations
+
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
-
+ +
-
+
+
+ + + + + + + + + + + + @@ -230,8 +259,11 @@ - - - + + + + + + diff --git a/src/main/webapp/cashier/shift_end_summery_bill.xhtml b/src/main/webapp/cashier/shift_end_summery_bill.xhtml index 24c68b8c0a..06fcbdfb62 100644 --- a/src/main/webapp/cashier/shift_end_summery_bill.xhtml +++ b/src/main/webapp/cashier/shift_end_summery_bill.xhtml @@ -8,10 +8,12 @@ xmlns:ez="http://xmlns.jcp.org/jsf/composite/ezcomp"> - - - + + + + +
@@ -27,16 +29,11 @@
- - - - - + + + - - - From 825789ad8b332336d15585c9afded52a358f42c5 Mon Sep 17 00:00:00 2001 From: Piyankara N W M G P Date: Sat, 20 Jul 2024 22:17:23 +0530 Subject: [PATCH 05/27] Signed-off-by: Piyankara N W M G P shift start bill --- .../bean/channel/BookingController.java | 130 +++++++++--------- .../channel/BookingControllerViewScope.java | 60 ++++---- src/main/resources/META-INF/persistence.xml | 4 +- ...h_headings_for_shift_start_fund_bill.xhtml | 11 +- 4 files changed, 105 insertions(+), 100 deletions(-) diff --git a/src/main/java/com/divudi/bean/channel/BookingController.java b/src/main/java/com/divudi/bean/channel/BookingController.java index bfd01fd87f..b2632e7796 100644 --- a/src/main/java/com/divudi/bean/channel/BookingController.java +++ b/src/main/java/com/divudi/bean/channel/BookingController.java @@ -205,8 +205,8 @@ public class BookingController implements Serializable, ControllerWithPatient { @Inject private CommonController commonController; - * Properties - */ +// * Properties +// */ private Speciality speciality; private Staff staff; private Staff toStaff; @@ -689,68 +689,70 @@ public String smsBody(BillSession r) { return b; } - public void sendChannellingStatusUpdateNotificationSms(BillSession methodBillSession) { - if (methodBillSession == null) { - JsfUtil.addErrorMessage("Nothing to send"); - return; - } - if (methodBillSession.getSessionInstance() == null) { - JsfUtil.addErrorMessage("No Session"); - return; - } - if (methodBillSession.getSessionInstance().getOriginatingSession() == null) { - JsfUtil.addErrorMessage("No Originating Session"); - return; - } - if (methodBillSession.getBill() == null) { - JsfUtil.addErrorMessage("No Bill"); - return; - } - if (methodBillSession.getBill().getPatient() == null) { - JsfUtil.addErrorMessage("No Bill"); - return; - } - - if (!methodBillSession.getBill().getPatient().getPerson().getSmsNumber().trim().equals("")) { - Sms e = new Sms(); - e.setCreatedAt(new Date()); - e.setCreater(sessionController.getLoggedUser()); - e.setBill(methodBillSession.getBill()); - e.setCreatedAt(new Date()); - e.setSmsType(MessageType.ChannelStatusUpdate); - e.setCreater(sessionController.getLoggedUser()); - e.setReceipientNumber(methodBillSession.getBill().getPatient().getPerson().getSmsNumber()); - e.setSendingMessage(smsBody(methodBillSession)); - e.setDepartment(getSessionController().getLoggedUser().getDepartment()); - e.setInstitution(getSessionController().getLoggedUser().getInstitution()); - e.setPending(false); - getSmsFacade().create(e); - - Boolean sent = smsManager.sendSms(e); - e.setSentSuccessfully(sent); - getSmsFacade().edit(e); - - } - - JsfUtil.addSuccessMessage("SMS Sent"); - } - - public String smsBody(BillSession r) { - String securityKey = sessionController.getApplicationPreference().getEncrptionKey(); - if (securityKey == null || securityKey.trim().equals("")) { - sessionController.getApplicationPreference().setEncrptionKey(securityController.generateRandomKey(10)); - sessionController.savePreferences(sessionController.getApplicationPreference()); - } - Calendar c = Calendar.getInstance(); - c.add(Calendar.DATE, 2); - String temId = securityController.encryptAlphanumeric(r.getId().toString(), securityKey); - String url = commonController.getBaseUrl() + "faces/requests/cbss.xhtml?id=" + temId; - String b = "Your session of " - + r.getSessionInstance().getOriginatingSession().getName() - + " Started. " - + url; - return b; - } + // ALREADY DEFIENED in line 629 + +// public void sendChannellingStatusUpdateNotificationSms(BillSession methodBillSession) { +// if (methodBillSession == null) { +// JsfUtil.addErrorMessage("Nothing to send"); +// return; +// } +// if (methodBillSession.getSessionInstance() == null) { +// JsfUtil.addErrorMessage("No Session"); +// return; +// } +// if (methodBillSession.getSessionInstance().getOriginatingSession() == null) { +// JsfUtil.addErrorMessage("No Originating Session"); +// return; +// } +// if (methodBillSession.getBill() == null) { +// JsfUtil.addErrorMessage("No Bill"); +// return; +// } +// if (methodBillSession.getBill().getPatient() == null) { +// JsfUtil.addErrorMessage("No Bill"); +// return; +// } +// +// if (!methodBillSession.getBill().getPatient().getPerson().getSmsNumber().trim().equals("")) { +// Sms e = new Sms(); +// e.setCreatedAt(new Date()); +// e.setCreater(sessionController.getLoggedUser()); +// e.setBill(methodBillSession.getBill()); +// e.setCreatedAt(new Date()); +// e.setSmsType(MessageType.ChannelStatusUpdate); +// e.setCreater(sessionController.getLoggedUser()); +// e.setReceipientNumber(methodBillSession.getBill().getPatient().getPerson().getSmsNumber()); +// e.setSendingMessage(smsBody(methodBillSession)); +// e.setDepartment(getSessionController().getLoggedUser().getDepartment()); +// e.setInstitution(getSessionController().getLoggedUser().getInstitution()); +// e.setPending(false); +// getSmsFacade().create(e); +// +// Boolean sent = smsManager.sendSms(e); +// e.setSentSuccessfully(sent); +// getSmsFacade().edit(e); +// +// } +// +// JsfUtil.addSuccessMessage("SMS Sent"); +// } +// +// public String smsBody(BillSession r) { +// String securityKey = sessionController.getApplicationPreference().getEncrptionKey(); +// if (securityKey == null || securityKey.trim().equals("")) { +// sessionController.getApplicationPreference().setEncrptionKey(securityController.generateRandomKey(10)); +// sessionController.savePreferences(sessionController.getApplicationPreference()); +// } +// Calendar c = Calendar.getInstance(); +// c.add(Calendar.DATE, 2); +// String temId = securityController.encryptAlphanumeric(r.getId().toString(), securityKey); +// String url = commonController.getBaseUrl() + "faces/requests/cbss.xhtml?id=" + temId; +// String b = "Your session of " +// + r.getSessionInstance().getOriginatingSession().getName() +// + " Started. " +// + url; +// return b; +// } public String navigateToAddBooking() { if (staff == null) { diff --git a/src/main/java/com/divudi/bean/channel/BookingControllerViewScope.java b/src/main/java/com/divudi/bean/channel/BookingControllerViewScope.java index 2e054a28ff..65d0bc0a90 100644 --- a/src/main/java/com/divudi/bean/channel/BookingControllerViewScope.java +++ b/src/main/java/com/divudi/bean/channel/BookingControllerViewScope.java @@ -1959,14 +1959,14 @@ public String navigateToNurseViewWithItems() { } } - public String navigateToNurseViewWithItems() { - if (preSet()) { - getChannelReportController().fillNurseView(); - return "/channel/channel_views/channel_nurse_view_with_items?faces-redirect=true"; - } else { - return ""; - } - } +// public String navigateToNurseViewWithItems() { +// if (preSet()) { +// getChannelReportController().fillNurseView(); +// return "/channel/channel_views/channel_nurse_view_with_items?faces-redirect=true"; +// } else { +// return ""; +// } +// } public String navigateToDoctorView() { if (preSet()) { @@ -2838,22 +2838,22 @@ public void setAbsentCount(double absentCount) { this.absentCount = absentCount; } -// public void errorCheckChannelNumber() { -// -// for (BillSession bs : billSessions) { -// //System.out.println("billSessions" + bs.getName()); -// for (BillItem bi : getSelectedBillSession().getBill().getBillItems()) { -// //System.out.println("billitem" + bi.getId()); -// if (bs.getSerialNo() == bi.getBillSession().getSerialNo()) { -// JsfUtil.addErrorMessage("Number you entered already exist"); -// setSelectedBillSession(bs); -// -// } -// -// } -// } -// -// } + public void errorCheckChannelNumber() { + + for (BillSession bs : billSessions) { + //System.out.println("billSessions" + bs.getName()); + for (BillItem bi : getSelectedBillSession().getBill().getBillItems()) { + //System.out.println("billitem" + bi.getId()); + if (bs.getSerialNo() == bi.getBillSession().getSerialNo()) { + JsfUtil.addErrorMessage("Number you entered already exist"); + setSelectedBillSession(bs); + + } + + } + } + + } public void updatePatient() { getPersonFacade().edit(getSelectedBillSession().getBill().getPatient().getPerson()); JsfUtil.addSuccessMessage("Patient Updated"); @@ -3135,12 +3135,12 @@ public long totalReservedNumberCount(SessionInstance s){ long reservedNumberCount = reservedNumbers.size(); return reservedNumberCount; } - - public long totalReservedNumberCount(SessionInstance s) { - List reservedNumbers = CommonFunctions.convertStringToIntegerList(s.getReserveNumbers()); - long reservedNumberCount = reservedNumbers.size(); - return reservedNumberCount; - } +// ALREADY DEFINED in line 3133 +// public long totalReservedNumberCount(SessionInstance s) { +// List reservedNumbers = CommonFunctions.convertStringToIntegerList(s.getReserveNumbers()); +// long reservedNumberCount = reservedNumbers.size(); +// return reservedNumberCount; +// } public BillSession addChannelBookingForOnlinePayment() { errorText = ""; diff --git a/src/main/resources/META-INF/persistence.xml b/src/main/resources/META-INF/persistence.xml index 6553951ab8..0e77e8aff2 100644 --- a/src/main/resources/META-INF/persistence.xml +++ b/src/main/resources/META-INF/persistence.xml @@ -1,14 +1,14 @@ - jdbc/demos + jdbc/hims false - jdbc/demoaudit + jdbc/himsAduit false diff --git a/src/main/webapp/resources/ezcomp/prints/five_five_paper_with_headings_for_shift_start_fund_bill.xhtml b/src/main/webapp/resources/ezcomp/prints/five_five_paper_with_headings_for_shift_start_fund_bill.xhtml index b44e8a3bdc..68d291e083 100644 --- a/src/main/webapp/resources/ezcomp/prints/five_five_paper_with_headings_for_shift_start_fund_bill.xhtml +++ b/src/main/webapp/resources/ezcomp/prints/five_five_paper_with_headings_for_shift_start_fund_bill.xhtml @@ -42,7 +42,7 @@
- +
@@ -67,7 +67,7 @@ - + @@ -83,7 +83,7 @@ - + : @@ -95,7 +95,7 @@ - + @@ -128,6 +128,9 @@ + + + From 129bb6a70a5779293f5fe83e66e6fdbe522e971c Mon Sep 17 00:00:00 2001 From: DamithDeshan Date: Sun, 21 Jul 2024 00:32:51 +0530 Subject: [PATCH 06/27] Signed-off-by: DamithDeshan --- .../bean/common/PackageItemController.java | 48 +++- src/main/java/com/divudi/entity/Item.java | 18 +- src/main/resources/META-INF/persistence.xml | 4 +- .../webapp/admin/pricing/package_item.xhtml | 216 +++++++++++++++--- 4 files changed, 236 insertions(+), 50 deletions(-) diff --git a/src/main/java/com/divudi/bean/common/PackageItemController.java b/src/main/java/com/divudi/bean/common/PackageItemController.java index 2a0a869a5c..39269c6cf6 100644 --- a/src/main/java/com/divudi/bean/common/PackageItemController.java +++ b/src/main/java/com/divudi/bean/common/PackageItemController.java @@ -36,7 +36,7 @@ /** * * @author Dr. M. H. B. Ariyaratne, MBBS, MSc, MD(Health Informatics) - Informatics) + * Informatics) */ @Named @SessionScoped @@ -64,6 +64,8 @@ public class PackageItemController implements Serializable { private List filteredItems; List serviceItems; + private boolean canRemovePackageItemfromPackage; + public List getServiceItems() { if (serviceItems == null) { String temSql; @@ -161,10 +163,39 @@ public void addToPackage() { pi.setItem(getCurrentItem()); pi.setCreatedAt(new Date()); pi.setCreater(sessionController.loggedUser); - getFacade().create(pi); + if(pi.getId() == null){ + getFacade().create(pi); + } + + pi.getItem().setCanRemoveItemfromPackage(canRemovePackageItemfromPackage); + + if(pi.getId() != null){ + itemFacade.edit(pi.getItem()); + } + JsfUtil.addSuccessMessage("Added"); recreateModel(); } + + public void EditPackageItem() { + if (getCurrentPackege() == null) { + JsfUtil.addErrorMessage("Please select a package"); + return; + } + if (getCurrent() == null) { + JsfUtil.addErrorMessage("Please select an item"); + return; + }else{ + getCurrent().getItem().setCanRemoveItemfromPackage(canRemovePackageItemfromPackage); + itemFacade.edit(getCurrent().getItem()); + } + + recreateModel(); + getItems(); + + JsfUtil.addSuccessMessage("Updated"); + + } public void removeFromPackage() { if (getCurrentPackege() == null) { @@ -252,6 +283,11 @@ public void setCurrent(PackageItem current) { private PackageItemFacade getFacade() { return ejbFacade; } + + public void clearValus(){ + canRemovePackageItemfromPackage = false; + + } /** * @@ -446,6 +482,14 @@ public void setFilteredItems(List filteredItems) { this.filteredItems = filteredItems; } + public boolean isCanRemovePackageItemfromPackage() { + return canRemovePackageItemfromPackage; + } + + public void setCanRemovePackageItemfromPackage(boolean canRemovePackageItemfromPackage) { + this.canRemovePackageItemfromPackage = canRemovePackageItemfromPackage; + } + /** * */ diff --git a/src/main/java/com/divudi/entity/Item.java b/src/main/java/com/divudi/entity/Item.java index 457b493f71..fd7591bc5e 100644 --- a/src/main/java/com/divudi/entity/Item.java +++ b/src/main/java/com/divudi/entity/Item.java @@ -72,9 +72,6 @@ public class Item implements Serializable, Comparable { @Id @GeneratedValue(strategy = GenerationType.AUTO) - - - Long id; int orderNo; @@ -258,10 +255,9 @@ public class Item implements Serializable, Comparable { @Column(name = "DTYPE", insertable = false, updatable = false) private String clazz; - - - + private boolean canRemoveItemfromPackage; + public double getVatPercentage() { return 0; } @@ -1389,8 +1385,14 @@ public boolean isCanSechduleForOtherDays() { public void setCanSechduleForOtherDays(boolean canSechduleForOtherDays) { this.canSechduleForOtherDays = canSechduleForOtherDays; } - - + + public boolean isCanRemoveItemfromPackage() { + return canRemoveItemfromPackage; + } + + public void setCanRemoveItemfromPackage(boolean canRemoveItemfromPackage) { + this.canRemoveItemfromPackage = canRemoveItemfromPackage; + } static class ReportItemComparator implements Comparator { diff --git a/src/main/resources/META-INF/persistence.xml b/src/main/resources/META-INF/persistence.xml index fcb739ccc4..f10263e018 100644 --- a/src/main/resources/META-INF/persistence.xml +++ b/src/main/resources/META-INF/persistence.xml @@ -1,14 +1,14 @@ - jdbc/sethma + jdbc/arogya false - jdbc/sethmaAudit + jdbc/arogyaAudit false diff --git a/src/main/webapp/admin/pricing/package_item.xhtml b/src/main/webapp/admin/pricing/package_item.xhtml index 937d37c68c..7ea025dfed 100644 --- a/src/main/webapp/admin/pricing/package_item.xhtml +++ b/src/main/webapp/admin/pricing/package_item.xhtml @@ -15,54 +15,194 @@
-
+
- + - +
-
- +
+ + +
+ +
+ - - + + + + + +
+ +
+
+ + + + + + + + + + +
-
- -
- - -
- - - - #{i.department.name} - - - #{i.category.parentCategory.name} - - - #{i.category.name} - - - #{i.name} - - +
+ + + +
+
+ +
+
+ + +
+
+ +
+
+ + + +
+ +
+ + +
+
+ + #{packageItemController.current.item.canRemoveItemfromPackage} + + + + + +
+ + +
+ + + + #{i.name} + + + #{i.category.name} + + + #{i.category.parentCategory.name} + + + #{i.department.name} + + + +
+ + +
+ + + + + + + + +
+ + +
+
+ From 49c8a9b527e0057179afe1d52ee9f39314548319 Mon Sep 17 00:00:00 2001 From: DamithDeshan Date: Sun, 21 Jul 2024 01:00:15 +0530 Subject: [PATCH 07/27] closes#6484 --- src/main/webapp/opd/opd_bill_package.xhtml | 29 ++++++++++++++-------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/src/main/webapp/opd/opd_bill_package.xhtml b/src/main/webapp/opd/opd_bill_package.xhtml index fdd736b359..aed333c8ee 100644 --- a/src/main/webapp/opd/opd_bill_package.xhtml +++ b/src/main/webapp/opd/opd_bill_package.xhtml @@ -117,7 +117,7 @@
- + - + No #{rowIndex+1} @@ -144,21 +144,22 @@ Item #{bi.billItem.item.name} - + Fee - + Department #{bi.billItem.item.department.name} - + - + No #{rowIndex+1} @@ -183,18 +184,24 @@ - + No #{rowIndex+1} - + + + Item + + + + Fee - + - + - + Payee From 1a674f3257d8517dcbc426d14bbda894cb666278 Mon Sep 17 00:00:00 2001 From: buddhika75 Date: Sun, 21 Jul 2024 06:52:43 +0530 Subject: [PATCH 08/27] Signed-off-by: buddhika75 --- src/main/webapp/cashier/initial_fund_bill.xhtml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/webapp/cashier/initial_fund_bill.xhtml b/src/main/webapp/cashier/initial_fund_bill.xhtml index dad68501f7..ecc0215df1 100644 --- a/src/main/webapp/cashier/initial_fund_bill.xhtml +++ b/src/main/webapp/cashier/initial_fund_bill.xhtml @@ -46,7 +46,7 @@
@@ -239,7 +239,6 @@
- #{bp.currencyDenominationsJson} From 50eff48bbce09e9262a1573f621dd86032290d0b Mon Sep 17 00:00:00 2001 From: DamithDeshan Date: Sun, 21 Jul 2024 08:07:47 +0530 Subject: [PATCH 09/27] Signed-off-by: DamithDeshan --- src/main/java/com/divudi/bean/common/CategoryController.java | 2 +- .../java/com/divudi/bean/common/PackageItemController.java | 4 ++++ .../java/com/divudi/bean/common/PackageItemFeeController.java | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/divudi/bean/common/CategoryController.java b/src/main/java/com/divudi/bean/common/CategoryController.java index 27cb5fb0f1..3591211889 100644 --- a/src/main/java/com/divudi/bean/common/CategoryController.java +++ b/src/main/java/com/divudi/bean/common/CategoryController.java @@ -70,7 +70,7 @@ public class CategoryController implements Serializable { public String navigateToManageFeeListTypes(){ fillFeeItemListTypes(); - return "/admin/pricing/fee_list_types"; + return "/admin/pricing/fee_list_types?faces-redirect=true"; } private void fillFeeItemListTypes(){ diff --git a/src/main/java/com/divudi/bean/common/PackageItemController.java b/src/main/java/com/divudi/bean/common/PackageItemController.java index 39269c6cf6..5d3e7735f0 100644 --- a/src/main/java/com/divudi/bean/common/PackageItemController.java +++ b/src/main/java/com/divudi/bean/common/PackageItemController.java @@ -79,6 +79,10 @@ public List getServiceItems() { return serviceItems; } + + public String navigateToPackageItemList(){ + return "/admin/pricing/package_item?faces-redirect=true"; + } public void updateFee() { if (getCurrentPackege() == null) { diff --git a/src/main/java/com/divudi/bean/common/PackageItemFeeController.java b/src/main/java/com/divudi/bean/common/PackageItemFeeController.java index fa3728f8b9..87652cd567 100644 --- a/src/main/java/com/divudi/bean/common/PackageItemFeeController.java +++ b/src/main/java/com/divudi/bean/common/PackageItemFeeController.java @@ -159,6 +159,10 @@ private void setPakageTotal() { currentPackege.setTotal(total); getPackegeFacade().edit(currentPackege); } + + public String navigateToPackageItemFees(){ + return "/admin/pricing/package_item_prices?faces-redirect=true"; + } public ItemFacade getEjbFacade() { return ejbFacade; From 3bf3a4ea4a6a3515f3772e9273f3f4e64a683412 Mon Sep 17 00:00:00 2001 From: DamithDeshan Date: Sun, 21 Jul 2024 08:08:04 +0530 Subject: [PATCH 10/27] Signed-off-by: DamithDeshan --- .../com/divudi/bean/common/PackageNameController.java | 5 +++++ src/main/java/com/divudi/entity/Item.java | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/src/main/java/com/divudi/bean/common/PackageNameController.java b/src/main/java/com/divudi/bean/common/PackageNameController.java index a3c583f1e7..e84b766905 100644 --- a/src/main/java/com/divudi/bean/common/PackageNameController.java +++ b/src/main/java/com/divudi/bean/common/PackageNameController.java @@ -50,6 +50,10 @@ public List completePack(String query) { } return suggestions; } + + public String navigateToPackageNames(){ + return "/admin/pricing/package_name?faces-redirect=true"; + } /** * @@ -156,6 +160,7 @@ public List getWithoutInativeItems() { private void recreateModel() { itemList = null; items = null; + current = null; } /** diff --git a/src/main/java/com/divudi/entity/Item.java b/src/main/java/com/divudi/entity/Item.java index fd7591bc5e..6f32cccd5c 100644 --- a/src/main/java/com/divudi/entity/Item.java +++ b/src/main/java/com/divudi/entity/Item.java @@ -252,6 +252,9 @@ public class Item implements Serializable, Comparable { @Transient private String transCodeFromName; + + @Lob + private String forGender; @Column(name = "DTYPE", insertable = false, updatable = false) private String clazz; @@ -1394,6 +1397,14 @@ public void setCanRemoveItemfromPackage(boolean canRemoveItemfromPackage) { this.canRemoveItemfromPackage = canRemoveItemfromPackage; } + public String getForGender() { + return forGender; + } + + public void setForGender(String forGender) { + this.forGender = forGender; + } + static class ReportItemComparator implements Comparator { @Override From 2ca86c881722a18779682e482a89d9ccb6de830d Mon Sep 17 00:00:00 2001 From: DamithDeshan Date: Sun, 21 Jul 2024 08:08:34 +0530 Subject: [PATCH 11/27] closes#6141 --- src/main/webapp/admin/pricing/index.xhtml | 137 +++++++++--------- .../admin/pricing/package_item_prices.xhtml | 6 +- .../webapp/admin/pricing/package_name.xhtml | 51 +++++-- 3 files changed, 110 insertions(+), 84 deletions(-) diff --git a/src/main/webapp/admin/pricing/index.xhtml b/src/main/webapp/admin/pricing/index.xhtml index 1135f2f972..b54c1af1b9 100644 --- a/src/main/webapp/admin/pricing/index.xhtml +++ b/src/main/webapp/admin/pricing/index.xhtml @@ -20,92 +20,103 @@ ajax="false" value="Item Fees" actionListener="#{viewScopeDataTransferController.makeAdminFeesAsPreviousPage()}" - action="#{itemFeeManager.navigateToItemFees()}"/> - - + + + - + action="#{categoryController.navigateToManageFeeListTypes()}"> + + - - + + + - + action="#{itemFeeManager.navigateToFeeListFees()}"> + - - - - + action="#{itemFeeManager.navigateToItemFeesMultiple()}"> + - - - + + + + - + + + + + + - + +
- - - -
- - - - + + + + + + + +
@@ -134,7 +145,7 @@ + action="/admin/pricing/membership/payment_scheme_discount_pharmacy_by_category?faces-redirect=true"/> -
- - - diff --git a/src/main/webapp/admin/pricing/package_item_prices.xhtml b/src/main/webapp/admin/pricing/package_item_prices.xhtml index d2c9da3f3e..91cfca7910 100644 --- a/src/main/webapp/admin/pricing/package_item_prices.xhtml +++ b/src/main/webapp/admin/pricing/package_item_prices.xhtml @@ -30,9 +30,9 @@ itemLabel="#{ix.name}" itemValue="#{ix}" size="30"> -
- - + +
+
diff --git a/src/main/webapp/admin/pricing/package_name.xhtml b/src/main/webapp/admin/pricing/package_name.xhtml index fd5099274e..8c18479dac 100644 --- a/src/main/webapp/admin/pricing/package_name.xhtml +++ b/src/main/webapp/admin/pricing/package_name.xhtml @@ -39,7 +39,7 @@ id="btnDelete" icon="fa fa-trash" onclick="if (!confirm('Are you sure you want to delete this record?')) - return false;" + return false;" action="#{packageNameController.delete()}" value="Delete" update="lstSelect gpDetail msg" process="btnDelete" @@ -49,11 +49,12 @@
-
+
@@ -63,13 +64,13 @@
-
+
- +
- +
-
- - - - +
+ + + + + +
+
+ +
+
+ +
+
+ + + + +
@@ -105,7 +123,8 @@ process="gpDetail btnSave" update="lstSelect selectFocus msg" action="#{packageNameController.saveSelected()}" - class="ui-button-info m-1" + ajax="false" + class="ui-button-info mt-2" > From eb17bc713ccca5e5c96dd731018d536df0790bcf Mon Sep 17 00:00:00 2001 From: buddhika75 Date: Sun, 21 Jul 2024 09:44:44 +0530 Subject: [PATCH 12/27] Closes #6473 Signed-off-by: buddhika75 --- .../FinancialTransactionController.java | 2 + src/main/resources/META-INF/persistence.xml | 4 +- .../webapp/cashier/initial_fund_bill.xhtml | 213 +----------------- .../ezcomp/ftm/ftmPaymentDetailCapture.xhtml | 162 +++++++++++++ .../ftmPaymentMethoDetailsAddedTable.xhtml | 138 ++++++++++++ 5 files changed, 310 insertions(+), 209 deletions(-) create mode 100644 src/main/webapp/resources/ezcomp/ftm/ftmPaymentDetailCapture.xhtml create mode 100644 src/main/webapp/resources/ezcomp/ftm/ftmPaymentMethoDetailsAddedTable.xhtml diff --git a/src/main/java/com/divudi/bean/cashTransaction/FinancialTransactionController.java b/src/main/java/com/divudi/bean/cashTransaction/FinancialTransactionController.java index 2e7baddb3e..3c5050cf64 100644 --- a/src/main/java/com/divudi/bean/cashTransaction/FinancialTransactionController.java +++ b/src/main/java/com/divudi/bean/cashTransaction/FinancialTransactionController.java @@ -646,6 +646,8 @@ public void addPaymentToInitialFundBill() { calculateInitialFundBillTotal(); currentPayment = null; getCurrentPayment(); + getCurrentPayment().setCurrencyDenominations(null); + getCurrentPayment().setCurrencyDenominationsJson(""); } public void addPaymentToFundTransferBill() { diff --git a/src/main/resources/META-INF/persistence.xml b/src/main/resources/META-INF/persistence.xml index f10263e018..6553951ab8 100644 --- a/src/main/resources/META-INF/persistence.xml +++ b/src/main/resources/META-INF/persistence.xml @@ -1,14 +1,14 @@ - jdbc/arogya + jdbc/demos false - jdbc/arogyaAudit + jdbc/demoaudit false diff --git a/src/main/webapp/cashier/initial_fund_bill.xhtml b/src/main/webapp/cashier/initial_fund_bill.xhtml index ecc0215df1..bc3d00cef6 100644 --- a/src/main/webapp/cashier/initial_fund_bill.xhtml +++ b/src/main/webapp/cashier/initial_fund_bill.xhtml @@ -4,15 +4,12 @@ xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:p="http://primefaces.org/ui" - xmlns:prints="http://xmlns.jcp.org/jsf/composite/ezcomp/prints" - xmlns:pa="http://xmlns.jcp.org/jsf/composite/paymentMethod" + xmlns:ftm="http://xmlns.jcp.org/jsf/composite/ezcomp/ftm" xmlns:f="http://xmlns.jcp.org/jsf/core"> - - @@ -27,7 +24,6 @@ -
@@ -43,136 +39,8 @@
- - -
- - - - - - - - - - - - - - - - - - - - - -
- -
- - - -
-
-
-
- -
-
- -
-
-
-
- -
-
- -
-
- -
-
- - - -
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
- -
- -
- - - -
-
- -
-
- - - -
-
- -
-
- - - - - - - - -
- -
-
- -
-
- - - -
-
-
- - - - - - - - -
-
-
- - - - - - -
-
+ + +
-
-
-
diff --git a/src/main/webapp/resources/ezcomp/ftm/ftmPaymentDetailCapture.xhtml b/src/main/webapp/resources/ezcomp/ftm/ftmPaymentDetailCapture.xhtml new file mode 100644 index 0000000000..f7a11605cb --- /dev/null +++ b/src/main/webapp/resources/ezcomp/ftm/ftmPaymentDetailCapture.xhtml @@ -0,0 +1,162 @@ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ +
+ + +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+
+ +
+ + + + +
+ + +
+
+
+
+
+
+ + +
+ + + + + + + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + +
+ \ No newline at end of file diff --git a/src/main/webapp/resources/ezcomp/ftm/ftmPaymentMethoDetailsAddedTable.xhtml b/src/main/webapp/resources/ezcomp/ftm/ftmPaymentMethoDetailsAddedTable.xhtml new file mode 100644 index 0000000000..c4533ef11c --- /dev/null +++ b/src/main/webapp/resources/ezcomp/ftm/ftmPaymentMethoDetailsAddedTable.xhtml @@ -0,0 +1,138 @@ + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+
+ + + + + + + + + + +
+
+
+ + +
+ +
+
+ +
+
+ + + + + +
+
+ + +
+ +
+
+ +
+
+ +
+
+ +
+
+ + + +
+ +
+
+ +
+
+ +
+
+ +
+
+ + +
+ +
+
+ +
+
+ + + + +
+
+ +
+
+
+ + + + + + + + + + + + +
+ +
+ +
+ \ No newline at end of file From 5460646c127e34fad2da3c023de3a2fcd03b29c6 Mon Sep 17 00:00:00 2001 From: Piyankara N W M G P Date: Sun, 21 Jul 2024 09:53:20 +0530 Subject: [PATCH 13/27] Signed-off-by: Piyankara N W M G P closed Issue#6491 --- src/main/resources/META-INF/persistence.xml | 4 ++-- ...ent_scheme_discount_pharmacy_by_category.xhtml | 15 ++++++++------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/main/resources/META-INF/persistence.xml b/src/main/resources/META-INF/persistence.xml index 6553951ab8..0e77e8aff2 100644 --- a/src/main/resources/META-INF/persistence.xml +++ b/src/main/resources/META-INF/persistence.xml @@ -1,14 +1,14 @@ - jdbc/demos + jdbc/hims false - jdbc/demoaudit + jdbc/himsAduit false diff --git a/src/main/webapp/admin/pricing/membership/payment_scheme_discount_pharmacy_by_category.xhtml b/src/main/webapp/admin/pricing/membership/payment_scheme_discount_pharmacy_by_category.xhtml index f1f1395b8b..edd6a2d22c 100644 --- a/src/main/webapp/admin/pricing/membership/payment_scheme_discount_pharmacy_by_category.xhtml +++ b/src/main/webapp/admin/pricing/membership/payment_scheme_discount_pharmacy_by_category.xhtml @@ -15,16 +15,17 @@ - - + + + var="mem" itemLabel="#{mem.name}" itemValue="#{mem}" class="w-100" + inputStyleClass="w-100"> - + - + - + - From 521743fe1c76b6fe268aeb71e890f9ac44a8f3ab Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 21 Jul 2024 12:39:45 +0000 Subject: [PATCH 14/27] Update version to 3.0.0.20240721.4 --- .github/counter.txt | 2 +- README.md | 2 +- src/main/resources/VERSION.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/counter.txt b/.github/counter.txt index 00750edc07..b8626c4cff 100644 --- a/.github/counter.txt +++ b/.github/counter.txt @@ -1 +1 @@ -3 +4 diff --git a/README.md b/README.md index dfcfa6f67f..9b224b8cdc 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Developed using Java Enterprise Edition, the system offers both a web applicatio ## Current Version -Current Version: 3.0.0.20240721.3 (This line will be automatically updated to reflect the latest version) +Current Version: 3.0.0.20240721.4 (This line will be automatically updated to reflect the latest version) ## History diff --git a/src/main/resources/VERSION.txt b/src/main/resources/VERSION.txt index 9645e9de5c..91579cba73 100644 --- a/src/main/resources/VERSION.txt +++ b/src/main/resources/VERSION.txt @@ -1 +1 @@ -3.0.0.20240721.3 +3.0.0.20240721.4 From 30f8fd226e78356c50a894dead7f9487cf2725ce Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 21 Jul 2024 14:18:27 +0000 Subject: [PATCH 15/27] Update version to 3.0.0.20240721.5 --- .github/counter.txt | 2 +- README.md | 2 +- src/main/resources/VERSION.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/counter.txt b/.github/counter.txt index b8626c4cff..7ed6ff82de 100644 --- a/.github/counter.txt +++ b/.github/counter.txt @@ -1 +1 @@ -4 +5 diff --git a/README.md b/README.md index 9b224b8cdc..63be856358 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Developed using Java Enterprise Edition, the system offers both a web applicatio ## Current Version -Current Version: 3.0.0.20240721.4 (This line will be automatically updated to reflect the latest version) +Current Version: 3.0.0.20240721.5 (This line will be automatically updated to reflect the latest version) ## History diff --git a/src/main/resources/VERSION.txt b/src/main/resources/VERSION.txt index 91579cba73..4db263297c 100644 --- a/src/main/resources/VERSION.txt +++ b/src/main/resources/VERSION.txt @@ -1 +1 @@ -3.0.0.20240721.4 +3.0.0.20240721.5 From 4d2de815cf35c14ea0060bf748e662774b0bda8e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 21 Jul 2024 14:24:23 +0000 Subject: [PATCH 16/27] Update version to 3.0.0.20240721.6 --- .github/counter.txt | 2 +- README.md | 2 +- src/main/resources/VERSION.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/counter.txt b/.github/counter.txt index 7ed6ff82de..1e8b314962 100644 --- a/.github/counter.txt +++ b/.github/counter.txt @@ -1 +1 @@ -5 +6 diff --git a/README.md b/README.md index 63be856358..bb7e253640 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Developed using Java Enterprise Edition, the system offers both a web applicatio ## Current Version -Current Version: 3.0.0.20240721.5 (This line will be automatically updated to reflect the latest version) +Current Version: 3.0.0.20240721.6 (This line will be automatically updated to reflect the latest version) ## History diff --git a/src/main/resources/VERSION.txt b/src/main/resources/VERSION.txt index 4db263297c..6a9a2dc229 100644 --- a/src/main/resources/VERSION.txt +++ b/src/main/resources/VERSION.txt @@ -1 +1 @@ -3.0.0.20240721.5 +3.0.0.20240721.6 From a90f867d1022248d63cc9c5a8c08a4cab88f8a53 Mon Sep 17 00:00:00 2001 From: "H.K. Damith Deshan" <108138918+DamithDeshan@users.noreply.github.com> Date: Sun, 21 Jul 2024 20:15:34 +0530 Subject: [PATCH 17/27] Update VERSION.txt From 9ebead0a047bfe000eacaa1f3ee0a1581a9caeac Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 21 Jul 2024 14:45:48 +0000 Subject: [PATCH 18/27] Update version to 3.0.0.20240721.7 --- .github/counter.txt | 2 +- README.md | 2 +- src/main/resources/VERSION.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/counter.txt b/.github/counter.txt index 1e8b314962..7f8f011eb7 100644 --- a/.github/counter.txt +++ b/.github/counter.txt @@ -1 +1 @@ -6 +7 diff --git a/README.md b/README.md index bb7e253640..b6b957b518 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Developed using Java Enterprise Edition, the system offers both a web applicatio ## Current Version -Current Version: 3.0.0.20240721.6 (This line will be automatically updated to reflect the latest version) +Current Version: 3.0.0.20240721.7 (This line will be automatically updated to reflect the latest version) ## History diff --git a/src/main/resources/VERSION.txt b/src/main/resources/VERSION.txt index 6a9a2dc229..58f773c348 100644 --- a/src/main/resources/VERSION.txt +++ b/src/main/resources/VERSION.txt @@ -1 +1 @@ -3.0.0.20240721.6 +3.0.0.20240721.7 From d6255e229859501d758c4ed65d2735d60e38893a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 21 Jul 2024 14:51:50 +0000 Subject: [PATCH 19/27] Update version to 3.0.0.20240721.8 --- .github/counter.txt | 2 +- README.md | 2 +- src/main/resources/VERSION.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/counter.txt b/.github/counter.txt index c7930257df..45a4fb75db 100644 --- a/.github/counter.txt +++ b/.github/counter.txt @@ -1 +1 @@ -7 \ No newline at end of file +8 diff --git a/README.md b/README.md index b6b957b518..c4f20e4bc9 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Developed using Java Enterprise Edition, the system offers both a web applicatio ## Current Version -Current Version: 3.0.0.20240721.7 (This line will be automatically updated to reflect the latest version) +Current Version: 3.0.0.20240721.8 (This line will be automatically updated to reflect the latest version) ## History diff --git a/src/main/resources/VERSION.txt b/src/main/resources/VERSION.txt index 58f773c348..b1f6e4ea88 100644 --- a/src/main/resources/VERSION.txt +++ b/src/main/resources/VERSION.txt @@ -1 +1 @@ -3.0.0.20240721.7 +3.0.0.20240721.8 From 17dbe280c74b532bdd9838880eceb088b9d6a542 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 21 Jul 2024 14:54:44 +0000 Subject: [PATCH 20/27] Update version to 3.0.0.20240721.9 --- .github/counter.txt | 2 +- README.md | 2 +- src/main/resources/VERSION.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/counter.txt b/.github/counter.txt index 301160a930..ec635144f6 100644 --- a/.github/counter.txt +++ b/.github/counter.txt @@ -1 +1 @@ -8 \ No newline at end of file +9 diff --git a/README.md b/README.md index c4f20e4bc9..d79a6bf93b 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Developed using Java Enterprise Edition, the system offers both a web applicatio ## Current Version -Current Version: 3.0.0.20240721.8 (This line will be automatically updated to reflect the latest version) +Current Version: 3.0.0.20240721.9 (This line will be automatically updated to reflect the latest version) ## History diff --git a/src/main/resources/VERSION.txt b/src/main/resources/VERSION.txt index fb65743ef4..a78e64703d 100644 --- a/src/main/resources/VERSION.txt +++ b/src/main/resources/VERSION.txt @@ -1 +1 @@ -3.0.0.20240721.8 \ No newline at end of file +3.0.0.20240721.9 From c908d0c3c035384c0bcdfbefc74522e3262306b1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 21 Jul 2024 15:04:23 +0000 Subject: [PATCH 21/27] Update version to 3.0.0.20240721.10 --- .github/counter.txt | 2 +- README.md | 2 +- src/main/resources/VERSION.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/counter.txt b/.github/counter.txt index ec635144f6..f599e28b8a 100644 --- a/.github/counter.txt +++ b/.github/counter.txt @@ -1 +1 @@ -9 +10 diff --git a/README.md b/README.md index e3fabc73f5..b3d831a386 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Developed using Java Enterprise Edition, the system offers both a web applicatio ## Current Version -Current Version: 3.0.0.20240721.9 (This line will be automatically updated to reflect the latest version) +Current Version: 3.0.0.20240721.10 (This line will be automatically updated to reflect the latest version) ## History diff --git a/src/main/resources/VERSION.txt b/src/main/resources/VERSION.txt index a78e64703d..4e7d10d6ec 100644 --- a/src/main/resources/VERSION.txt +++ b/src/main/resources/VERSION.txt @@ -1 +1 @@ -3.0.0.20240721.9 +3.0.0.20240721.10 From ddbafd886b9188c5a6d2ede65ff83cdbfe2ad7e7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 21 Jul 2024 15:15:19 +0000 Subject: [PATCH 22/27] Update version to 3.0.0.20240721.11 --- .github/counter.txt | 2 +- README.md | 2 +- src/main/resources/VERSION.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/counter.txt b/.github/counter.txt index f599e28b8a..b4de394767 100644 --- a/.github/counter.txt +++ b/.github/counter.txt @@ -1 +1 @@ -10 +11 diff --git a/README.md b/README.md index b3d831a386..61dcbf0be0 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Developed using Java Enterprise Edition, the system offers both a web applicatio ## Current Version -Current Version: 3.0.0.20240721.10 (This line will be automatically updated to reflect the latest version) +Current Version: 3.0.0.20240721.11 (This line will be automatically updated to reflect the latest version) ## History diff --git a/src/main/resources/VERSION.txt b/src/main/resources/VERSION.txt index 4e7d10d6ec..8ceed8fcb9 100644 --- a/src/main/resources/VERSION.txt +++ b/src/main/resources/VERSION.txt @@ -1 +1 @@ -3.0.0.20240721.10 +3.0.0.20240721.11 From 11aa719966fb7e4b92f37bd22e5b855d62ed7ba1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 21 Jul 2024 15:20:14 +0000 Subject: [PATCH 23/27] Update version to 3.0.0.20240721.12 --- .github/counter.txt | 2 +- README.md | 2 +- src/main/resources/VERSION.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/counter.txt b/.github/counter.txt index b4de394767..48082f72f0 100644 --- a/.github/counter.txt +++ b/.github/counter.txt @@ -1 +1 @@ -11 +12 diff --git a/README.md b/README.md index f7abcd51fd..14c845f90f 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ Developed using Java Enterprise Edition, the system offers both a web applicatio ## Current Version -Current Version: 3.0.0.20240721.11 (This line will be automatically updated to reflect the latest version) +Current Version: 3.0.0.20240721.12 (This line will be automatically updated to reflect the latest version) ## History diff --git a/src/main/resources/VERSION.txt b/src/main/resources/VERSION.txt index 8ceed8fcb9..1748f34066 100644 --- a/src/main/resources/VERSION.txt +++ b/src/main/resources/VERSION.txt @@ -1 +1 @@ -3.0.0.20240721.11 +3.0.0.20240721.12 From d8dc764cf64ca997e50dd6b13eef4fbae01c1918 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 21 Jul 2024 15:23:39 +0000 Subject: [PATCH 24/27] Update version to 3.0.0.20240721.13 --- .github/counter.txt | 2 +- README.md | 2 +- src/main/resources/VERSION.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/counter.txt b/.github/counter.txt index 3cacc0b93c..b1bd38b62a 100644 --- a/.github/counter.txt +++ b/.github/counter.txt @@ -1 +1 @@ -12 \ No newline at end of file +13 diff --git a/README.md b/README.md index 3dff7aeb7b..ab535406bc 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Developed using Java Enterprise Edition, the system offers both a web applicatio ## Current Version -Current Version: 3.0.0.20240721.12 (This line will be automatically updated to reflect the latest version) +Current Version: 3.0.0.20240721.13 (This line will be automatically updated to reflect the latest version) ## History diff --git a/src/main/resources/VERSION.txt b/src/main/resources/VERSION.txt index acc7c046a5..11bb56532b 100644 --- a/src/main/resources/VERSION.txt +++ b/src/main/resources/VERSION.txt @@ -1 +1 @@ -3.0.0.20240721.12 \ No newline at end of file +3.0.0.20240721.13 From c84852cfef2ba6f840a03e822b62734ad1a979dc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 21 Jul 2024 15:24:15 +0000 Subject: [PATCH 25/27] Update version to 3.0.0.20240721.14 --- .github/counter.txt | 2 +- README.md | 2 +- src/main/resources/VERSION.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/counter.txt b/.github/counter.txt index b1bd38b62a..8351c19397 100644 --- a/.github/counter.txt +++ b/.github/counter.txt @@ -1 +1 @@ -13 +14 diff --git a/README.md b/README.md index ab535406bc..b5ef315810 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Developed using Java Enterprise Edition, the system offers both a web applicatio ## Current Version -Current Version: 3.0.0.20240721.13 (This line will be automatically updated to reflect the latest version) +Current Version: 3.0.0.20240721.14 (This line will be automatically updated to reflect the latest version) ## History diff --git a/src/main/resources/VERSION.txt b/src/main/resources/VERSION.txt index 11bb56532b..0e98d9faa7 100644 --- a/src/main/resources/VERSION.txt +++ b/src/main/resources/VERSION.txt @@ -1 +1 @@ -3.0.0.20240721.13 +3.0.0.20240721.14 From 364665db674a6d6d6ef7c1674834afe9a11eb185 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 21 Jul 2024 15:28:48 +0000 Subject: [PATCH 26/27] Update version to 3.0.0.20240721.15 --- .github/counter.txt | 2 +- README.md | 2 +- src/main/resources/VERSION.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/counter.txt b/.github/counter.txt index 8351c19397..60d3b2f4a4 100644 --- a/.github/counter.txt +++ b/.github/counter.txt @@ -1 +1 @@ -14 +15 diff --git a/README.md b/README.md index b5ef315810..8ffa45e0df 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Developed using Java Enterprise Edition, the system offers both a web applicatio ## Current Version -Current Version: 3.0.0.20240721.14 (This line will be automatically updated to reflect the latest version) +Current Version: 3.0.0.20240721.15 (This line will be automatically updated to reflect the latest version) ## History diff --git a/src/main/resources/VERSION.txt b/src/main/resources/VERSION.txt index 0e98d9faa7..e1f8cdc22d 100644 --- a/src/main/resources/VERSION.txt +++ b/src/main/resources/VERSION.txt @@ -1 +1 @@ -3.0.0.20240721.14 +3.0.0.20240721.15 From 93c17ea4b31d9a9076c86a30c09833af0e2eb785 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 21 Jul 2024 15:33:42 +0000 Subject: [PATCH 27/27] Update version to 3.0.0.20240721.16 --- .github/counter.txt | 3 +-- README.md | 2 +- src/main/resources/VERSION.txt | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/counter.txt b/.github/counter.txt index 81400b0463..b6a7d89c68 100644 --- a/.github/counter.txt +++ b/.github/counter.txt @@ -1,2 +1 @@ -15 - +16 diff --git a/README.md b/README.md index 474687d83d..81c693db48 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ Developed using Java Enterprise Edition, the system offers both a web applicatio ## Current Version -Current Version: 3.0.0.20240721.15 (This line will be automatically updated to reflect the latest version) +Current Version: 3.0.0.20240721.16 (This line will be automatically updated to reflect the latest version) ## History diff --git a/src/main/resources/VERSION.txt b/src/main/resources/VERSION.txt index e1f8cdc22d..b55ed27b84 100644 --- a/src/main/resources/VERSION.txt +++ b/src/main/resources/VERSION.txt @@ -1 +1 @@ -3.0.0.20240721.15 +3.0.0.20240721.16