Skip to content

Commit

Permalink
Merge pull request #6763 from hmislk/Issue#6361
Browse files Browse the repository at this point in the history
Fixed #6361 Closes #6361
  • Loading branch information
DeshaniPubudu committed Aug 7, 2024
2 parents 29a2892 + aff5476 commit 17f03a7
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
23 changes: 22 additions & 1 deletion src/main/java/com/divudi/bean/common/EnumController.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public class EnumController implements Serializable {
@Inject
ConfigOptionApplicationController configOptionApplicationController;
List<PaymentMethod> paymentMethodsForOpdBilling;
List<PaymentMethod> paymentMethodsForOpdBillCanceling;
List<PaymentMethod> paymentMethodsForChanneling;
List<PaymentMethod> paymentMethodsForChannelSettling;
List<PaymentMethod> paymentMethodsForPharmacyBilling;
Expand Down Expand Up @@ -126,6 +127,16 @@ public void fillPaymentMethodsForOpdBilling() {
}
}
}

public void fillPaymentMethodsForOpdBillCanceling() {
paymentMethodsForOpdBillCanceling = new ArrayList<>();
for (PaymentMethod pm : PaymentMethod.values()) {
boolean include = configOptionApplicationController.getBooleanValueByKey(pm.getLabel() + " is available for OPD Bill Canceling", true);
if (include) {
paymentMethodsForOpdBillCanceling.add(pm);
}
}
}

public void fillPaymentMethodsForPackageBilling() {
paymentMethodsForOpdBilling = new ArrayList<>();
Expand Down Expand Up @@ -854,6 +865,17 @@ public void setPaymentMethodsForStaffCreditSettle(List<PaymentMethod> paymentMet
this.paymentMethodsForStaffCreditSettle = paymentMethodsForStaffCreditSettle;
}

public List<PaymentMethod> getPaymentMethodsForOpdBillCanceling() {
if (paymentMethodsForOpdBillCanceling == null) {
fillPaymentMethodsForOpdBillCanceling();
}
return paymentMethodsForOpdBillCanceling;
}

public void setPaymentMethodsForOpdBillCanceling(List<PaymentMethod> paymentMethodsForOpdBillCanceling) {
this.paymentMethodsForOpdBillCanceling = paymentMethodsForOpdBillCanceling;
}

public List<PaymentMethod> getPaymentMethodsForPatientDepositRefund() {
paymentMethodsForPatientDepositRefund = new ArrayList<>();
for (PaymentMethod pm : PaymentMethod.values()) {
Expand All @@ -868,5 +890,4 @@ public List<PaymentMethod> getPaymentMethodsForPatientDepositRefund() {
public void setPaymentMethodsForPatientDepositRefund(List<PaymentMethod> paymentMethodsForPatientDepositRefund) {
this.paymentMethodsForPatientDepositRefund = paymentMethodsForPatientDepositRefund;
}

}
2 changes: 1 addition & 1 deletion src/main/webapp/opd/batch_bill_cancel.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<p:selectOneMenu id="cmbPs" value="#{billController.paymentMethod}"
rendered="#{billController.batchBill.billType eq 'OpdBathcBill'}">
<f:selectItem itemLabel="Select paymentMethod"/>
<f:selectItems value="#{inwardPaymentController.paymentMethods}"/>
<f:selectItems value="#{enumController.paymentMethodsForOpdBillCanceling}"/>
</p:selectOneMenu>

<p:selectOneMenu id="cmbPs2" value="#{billController.paymentMethod}"
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/opd/bill_cancel.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
value="#{billSearch.paymentMethod}"
rendered="#{billSearch.bill.billType eq 'OpdBill'}">
<f:selectItem itemLabel="Select paymentMethod"/>
<f:selectItems value="#{inwardPaymentController.paymentMethods}"/>
<f:selectItems value="#{enumController.paymentMethodsForOpdBillCanceling}"/>
</p:selectOneMenu>

<p:selectOneMenu id="cmbPs2" value="#{billSearch.paymentMethod}"
Expand Down

0 comments on commit 17f03a7

Please sign in to comment.