Skip to content

Commit

Permalink
Merge pull request #5968 from hmislk/Issue#5961
Browse files Browse the repository at this point in the history
Issue#5961 Closed #5961
  • Loading branch information
DeshaniPubudu authored Jun 26, 2024
2 parents e377d50 + f73177d commit 9d21d03
Show file tree
Hide file tree
Showing 13 changed files with 635 additions and 303 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ public void calculateDueFees() {
}

if (getSelectedServiceSession() != null) {
sql += " and b.bill.singleBillSession.serviceSession.originatingSession=:ss";
sql += " and b.bill.singleBillSession.sessionInstance.originatingSession=:ss";
hm.put("ss", getSelectedServiceSession());
}

Expand Down
8 changes: 6 additions & 2 deletions src/main/java/com/divudi/bean/common/OpdTokenController.java
Original file line number Diff line number Diff line change
Expand Up @@ -450,8 +450,12 @@ public void recallToken() {
JsfUtil.addErrorMessage("Please select valid Token");
return;
}

currentToken.setCalled(true);

if (currentToken.isCalled()) {
currentToken.setCalled(false);
}else{
currentToken.setCalled(true);
}
tokenFacade.edit(currentToken);
}

Expand Down
71 changes: 57 additions & 14 deletions src/main/java/com/divudi/bean/common/SearchController.java
Original file line number Diff line number Diff line change
Expand Up @@ -2686,8 +2686,26 @@ private Bill getActiveRefBillnotApprove(Bill b, BillType billType) {
}

public void makeNull() {
fromDate = null;
toDate = null;
department = null;
departments = null;
institution = null;
paymentMethod = null;
searchKeyword = null;
bills = null;
billSummaryRows = null;
netTotal = 0.0;
discount = 0.0;
grossTotal = 0.0;

cashTotal = 0.0;
cardTotal = 0.0;
chequeTotal = 0.0;
slipTotal = 0.0;
totalOfOtherPayments = 0.0;
billCount = 0.0;
totalPaying = 0.0;
}

public void createTableByBillType() {
Expand Down Expand Up @@ -7170,28 +7188,39 @@ public void processAllFinancialTransactionalSummary() {
// b.getDiscount();
// b.getNetTotal();
// b.getBillTypeAtomic();
if (webUser == null) {
jpql += "and b.creater=:bc ";
params.put("bc", sessionController.getLoggedUser());
if (institution == null && department == null) {
jpql += " and b.institution=:ins";
params.put("ins", sessionController.getInstitution());

} else if (institution != null && department == null) {
jpql += " and b.institution=:ins";
params.put("ins", getInstitution());

jpql += " and b.department=:dept";
params.put("dept", sessionController.getDepartment());

} else {
jpql += "and b.creater=:bc ";
params.put("bc", webUser);
jpql += " and b.institution=:ins";
params.put("ins", getInstitution());

jpql += " and b.department=:dept";
params.put("dept", getDepartment());
}

jpql += "group by b.billTypeAtomic order by b.billTypeAtomic";
jpql += " group by b.billTypeAtomic order by b.billTypeAtomic";

params.put("toDate", getToDate());
params.put("fromDate", getFromDate());
params.put("ret", false);
params.put("abts", billTypesToFilter);

billSummaryRows = getBillFacade().findLightsByJpql(jpql, params, TemporalType.TIMESTAMP);

for (BillSummaryRow bss : billSummaryRows) {
grossTotal += bss.getGrossTotal();
discount += bss.getDiscount();
netTotal += bss.getNetTotal();
}

}

private List<Department> departments;
Expand Down Expand Up @@ -8120,7 +8149,9 @@ public void createCollectingBillItemTable() {
temMap.put("toDate", getToDate());
temMap.put("fromDate", getFromDate());
temMap.put("ins", getSessionController().getInstitution());
temMap.put("class", BilledBill.class);
temMap
.put("class", BilledBill.class
);

billItems = getBillItemFacade().findByJpql(sql, temMap, TemporalType.TIMESTAMP, 50);
////System.out.println("billItems = " + billItems);
Expand Down Expand Up @@ -8175,7 +8206,9 @@ public void createCollectingBillItemTableAll() {
temMap.put("toDate", getToDate());
temMap.put("fromDate", getFromDate());
temMap.put("ins", getSessionController().getInstitution());
temMap.put("class", BilledBill.class);
temMap
.put("class", BilledBill.class
);

billItems = getBillItemFacade().findByJpql(sql, temMap, TemporalType.TIMESTAMP);
////System.out.println("billItems = " + billItems);
Expand Down Expand Up @@ -8403,7 +8436,9 @@ public void channelPaymentBills() {
m.put("toDate", getToDate());
m.put("bt", BillType.PaymentBill);
m.put("bts", bts);
m.put("class", BilledBill.class);
m
.put("class", BilledBill.class
);

if (getReportKeyWord().isAdditionalDetails()) {
billItems = getBillItemFacade().findByJpql(sql, m, TemporalType.TIMESTAMP);
Expand Down Expand Up @@ -8471,7 +8506,9 @@ public void channelPaymentBillsNew() {
m.put("toDate", getToDate());
m.put("bt", BillType.ChannelProPayment);
m.put("bts", bts);
m.put("class", BilledBill.class);
m
.put("class", BilledBill.class
);
if (getReportKeyWord().isAdditionalDetails()) {
billItems = getBillItemFacade().findByJpql(sql, m, TemporalType.TIMESTAMP);
} else {
Expand Down Expand Up @@ -8580,7 +8617,9 @@ public void createChannelDueBillFee() {
//hm.put("ins", sessionController.getInstitution());
hm.put("bt", bts);
hm.put("ftp", FeeType.Staff);
hm.put("class", BilledBill.class);
hm
.put("class", BilledBill.class
);
if (getReportKeyWord().isAdditionalDetails()) {
billFees = billFeeFacade.findByJpql(sql, hm, TemporalType.TIMESTAMP);
} else {
Expand Down Expand Up @@ -8623,7 +8662,9 @@ public void createChannelDueBillFeeByAgent() {
//hm.put("ins", sessionController.getInstitution());
hm.put("bt", BillType.ChannelAgent);
hm.put("ftp", FeeType.OtherInstitution);
hm.put("class", BilledBill.class);
hm
.put("class", BilledBill.class
);
billFees = billFeeFacade.findByJpql(sql, hm, TemporalType.TIMESTAMP);

}
Expand Down Expand Up @@ -8749,7 +8790,9 @@ public void createInwardServiceTable() {

sql += " order by b.bill.insId desc ";
temMap.put("billType", BillType.InwardBill);
temMap.put("class", BilledBill.class);
temMap
.put("class", BilledBill.class
);
temMap.put("toDate", toDate);
temMap.put("fromDate", fromDate);

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/divudi/data/BillTypeAtomic.java
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ public enum BillTypeAtomic {
FUND_WITHDRAWAL_BILL_CANCELLED("Withdrawal Fund Bill - Cancelled", BillCategory.CANCELLATION, ServiceType.OTHER, BillFinanceType.BANK_OUT),
// Professional Payments
PROFESSIONAL_PAYMENT_FOR_STAFF_FOR_INWARD_SERVICE("Inward Payment for Staff", BillCategory.BILL, ServiceType.OTHER, BillFinanceType.CASH_IN),
PROFESSIONAL_PAYMENT_FOR_STAFF_FOR_CHANNELING_SERVICE("Channelling Payment for Staff", BillCategory.BILL, ServiceType.OTHER, BillFinanceType.CASH_OUT),
PROFESSIONAL_PAYMENT_FOR_STAFF_FOR_CHANNELING_SERVICE_SESSION("Channelling session Payment for Staff", BillCategory.BILL, ServiceType.OTHER, BillFinanceType.CASH_OUT),
PROFESSIONAL_PAYMENT_FOR_STAFF_FOR_CHANNELING_SERVICE("Channelling Payment for Staff", BillCategory.PAYMENTS, ServiceType.OTHER, BillFinanceType.CASH_OUT),
PROFESSIONAL_PAYMENT_FOR_STAFF_FOR_CHANNELING_SERVICE_SESSION("Channelling session Payment for Staff", BillCategory.PAYMENTS, ServiceType.OTHER, BillFinanceType.CASH_OUT),
PROFESSIONAL_PAYMENT_FOR_STAFF_FOR_CHANNELING_SERVICE_FOR_AGENCIES("Channelling Payment for Staff for agencies", BillCategory.BILL, ServiceType.OTHER, BillFinanceType.CASH_IN),
PROFESSIONAL_PAYMENT_FOR_STAFF_FOR_OPD_SERVICES("OPD Professional Payment bill", BillCategory.PAYMENTS, ServiceType.OPD, BillFinanceType.CASH_OUT),
PETTY_CASH_ISSUE("Petty Cash Issue", BillCategory.PAYMENTS, ServiceType.OTHER, BillFinanceType.CASH_OUT),
Expand Down
14 changes: 3 additions & 11 deletions src/main/resources/META-INF/persistence.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,12 @@
<persistence version="2.2" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_2.xsd">
<persistence-unit name="hmisPU" transaction-type="JTA">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<jta-data-source>jdbc/arogyaNew</jta-data-source>
<jta-data-source>jdbc/arogya</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="eclipselink.logging.level.sql" value="SEVERE"/>
<property name="eclipselink.logging.parameters" value="false"/>
<!-- <property name="eclipselink.logging.level.sql" value="SEVERE"/>
<property name="eclipselink.logging.parameters" value="true"/>
<property name="eclipselink.ddl-generation.index-foreign-keys" value="false"/>
<property name="javax.persistence.schema-generation.database.action" value="create"/>-->
<!--<property name="javax.persistence.schema-generation.database.action" value="create-or-extend-tables"/>-->
<property name="javax.persistence.schema-generation.database.action" value="create-or-extend-tables"/>
</properties>
</persistence-unit>
<persistence-unit name="hmisAuditPU" transaction-type="JTA">
Expand All @@ -21,11 +17,7 @@
<properties>
<property name="eclipselink.logging.level.sql" value="SEVERE"/>
<property name="eclipselink.logging.parameters" value="false"/>
<!--<property name="javax.persistence.schema-generation.database.action" value="create-or-extend-tables"/>-->
<!-- <property name="eclipselink.ddl-generation" value="create-or-extend-tables"/>
<property name="eclipselink.logging.level.sql" value="SEVERE"/>
<property name="eclipselink.logging.parameters" value="true"/>
<property name="eclipselink.ddl-generation.index-foreign-keys" value="false"/>-->
<property name="javax.persistence.schema-generation.database.action" value="create-or-extend-tables"/>
</properties>
</persistence-unit>
</persistence>
Loading

0 comments on commit 9d21d03

Please sign in to comment.