diff --git a/src/main/java/com/divudi/bean/opd/OpdBillController.java b/src/main/java/com/divudi/bean/opd/OpdBillController.java index 4f38fc9c6e..b5e9ab6c40 100644 --- a/src/main/java/com/divudi/bean/opd/OpdBillController.java +++ b/src/main/java/com/divudi/bean/opd/OpdBillController.java @@ -294,6 +294,8 @@ public class OpdBillController implements Serializable, ControllerWithPatient, C private Double totalSaffFee; private boolean canChangeSpecialityAndDoctorInAddedBillItem; private String localNumber; + + private String refNo; /** * @@ -3168,6 +3170,8 @@ public List createPayment(Bill bill, PaymentMethod pm) { case Agent: case Credit: + p.setReferenceNo(cd.getPaymentMethodData().getCredit().getReferralNo()); + case PatientDeposit: if (getPatient().getRunningBalance() != null) { getPatient().setRunningBalance(getPatient().getRunningBalance() - cd.getPaymentMethodData().getPatient_deposit().getTotalValue()); @@ -3221,6 +3225,7 @@ public List createPayment(Bill bill, PaymentMethod pm) { case Agent: case Credit: + p.setReferenceNo(paymentMethodData.getCredit().getReferralNo()); case PatientDeposit: case Slip: p.setBank(paymentMethodData.getSlip().getInstitution()); @@ -4170,4 +4175,15 @@ public void setLocalNumber(String localNumber) { this.localNumber = localNumber; } + public String getRefNo() { + if(refNo == null){ + refNo = getPaymentMethodData().getCredit().getReferralNo(); + } + return refNo; + } + + public void setRefNo(String refNo) { + this.refNo = refNo; + } + } diff --git a/src/main/java/com/divudi/data/dataStructure/ComponentDetail.java b/src/main/java/com/divudi/data/dataStructure/ComponentDetail.java index 1bdf2f91b8..037b88852c 100644 --- a/src/main/java/com/divudi/data/dataStructure/ComponentDetail.java +++ b/src/main/java/com/divudi/data/dataStructure/ComponentDetail.java @@ -34,6 +34,9 @@ public class ComponentDetail { private PaymentMethodData paymentMethodData; private int creditDuration; private Staff toStaff; + private String referralNo; + + public List getMultiplePaymentMethodComponentDetails() { if (multiplePaymentMethodComponentDetails == null) { @@ -44,13 +47,13 @@ public List getMultiplePaymentMethodComponentDetails() { } return multiplePaymentMethodComponentDetails; } - - public void addAnotherPaymentDetail(){ + + public void addAnotherPaymentDetail() { ComponentDetail cd = new ComponentDetail(); getMultiplePaymentMethodComponentDetails().add(cd); } - - public void removePaymentDetail(ComponentDetail cd){ + + public void removePaymentDetail(ComponentDetail cd) { getMultiplePaymentMethodComponentDetails().remove(cd); } @@ -115,7 +118,7 @@ public void setPaymentMethod(PaymentMethod paymentMethod) { } public PaymentMethodData getPaymentMethodData() { - if(paymentMethodData==null){ + if (paymentMethodData == null) { paymentMethodData = new PaymentMethodData(); } return paymentMethodData; @@ -140,8 +143,13 @@ public Staff getToStaff() { public void setToStaff(Staff toStaff) { this.toStaff = toStaff; } - - - + + public String getReferralNo() { + return referralNo; + } + + public void setReferralNo(String referralNo) { + this.referralNo = referralNo; + } } diff --git a/src/main/java/com/divudi/entity/Payment.java b/src/main/java/com/divudi/entity/Payment.java index a96a83d636..fbdd8fbaa2 100644 --- a/src/main/java/com/divudi/entity/Payment.java +++ b/src/main/java/com/divudi/entity/Payment.java @@ -105,6 +105,8 @@ public class Payment implements Serializable { @Transient private List humanReadableDenominations; + private String referenceNo; + public Long getId() { return id; } @@ -428,4 +430,15 @@ public void setCurrencyDenominations(List currencyDenominations) { this.currencyDenominations = currencyDenominations; } + public String getReferenceNo() { + + return referenceNo; + } + + public void setReferenceNo(String referenceNo) { + this.referenceNo = referenceNo; + } + + + } diff --git a/src/main/resources/META-INF/persistence.xml b/src/main/resources/META-INF/persistence.xml index a0b27665e3..19c35b09ad 100644 --- a/src/main/resources/META-INF/persistence.xml +++ b/src/main/resources/META-INF/persistence.xml @@ -2,7 +2,6 @@ jdbc/arogya - false @@ -11,11 +10,8 @@ - jdbc/arogyaAudit - false - diff --git a/src/main/webapp/opd/opd_bill.xhtml b/src/main/webapp/opd/opd_bill.xhtml index 5d28892cd4..7d9a379d7a 100644 --- a/src/main/webapp/opd/opd_bill.xhtml +++ b/src/main/webapp/opd/opd_bill.xhtml @@ -645,48 +645,7 @@
- -
-
-
- - - - - - - - -
-
-
-
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
+ +
+ \ No newline at end of file diff --git a/src/main/webapp/resources/paymentMethod/creditCard.xhtml b/src/main/webapp/resources/paymentMethod/creditCard.xhtml index aefed9111a..63bebe1de4 100644 --- a/src/main/webapp/resources/paymentMethod/creditCard.xhtml +++ b/src/main/webapp/resources/paymentMethod/creditCard.xhtml @@ -35,6 +35,5 @@
- \ No newline at end of file