Skip to content

Commit

Permalink
Merge pull request #10948 from hmislk/10935-the-float-transfer-receiv…
Browse files Browse the repository at this point in the history
…e-is-not-updating-in-the-drawer

10935 the float transfer receive is not updating in the drawer
  • Loading branch information
buddhika75 authored Mar 6, 2025
2 parents 8111c18 + 6e29364 commit cddda72
Show file tree
Hide file tree
Showing 2 changed files with 488 additions and 468 deletions.
202 changes: 103 additions & 99 deletions src/main/java/com/divudi/bean/common/SearchController.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// <editor-fold defaultstate="collapsed" desc="Template">
// </editor-fold>
// <editor-fold defaultstate="collapsed" desc="Importa">

import com.divudi.bean.cashTransaction.CashBookEntryController;
import com.divudi.bean.cashTransaction.DrawerController;
import com.divudi.bean.cashTransaction.DrawerEntryController;
Expand Down Expand Up @@ -66,6 +67,7 @@

import com.divudi.data.BillFinanceType;
import com.divudi.data.BillTypeAtomic;

import static com.divudi.data.BillTypeAtomic.OPD_BATCH_BILL_WITH_PAYMENT;
import static com.divudi.data.BillTypeAtomic.OPD_BILL_CANCELLATION;
import static com.divudi.data.BillTypeAtomic.OPD_BILL_REFUND;
Expand All @@ -80,6 +82,7 @@
import static com.divudi.data.BillTypeAtomic.PROFESSIONAL_PAYMENT_FOR_STAFF_FOR_INWARD_SERVICE_RETURN;
import static com.divudi.data.BillTypeAtomic.PROFESSIONAL_PAYMENT_FOR_STAFF_FOR_OPD_SERVICES;
import static com.divudi.data.BillTypeAtomic.PROFESSIONAL_PAYMENT_FOR_STAFF_FOR_OPD_SERVICES_RETURN;

import com.divudi.data.PaymentCategory;
import com.divudi.data.PaymentStatus;
import com.divudi.data.PaymentType;
Expand Down Expand Up @@ -6265,9 +6268,9 @@ public void createBillsBillItemsAndBillFeesTable(Set<Bill> bills, List<BillItem>
Row headerRow = sheet.createRow(rowIdx++);
// Expanding the headers to include all necessary fields
String[] headers = {
"Bill ID", "Insitution Name", "Department Name", "Patient Name", "Staff Name", "Bill Type", "Total", "Discount", "Net Total", "Payment Method",
"Bill Item Name", "Bill Item Code", "Item Type", "Quantity", "Rate", "Gross Value", "Bill Item Discount", "Net Value",
"Fee Name", "Fee Type", "Fee Value", "Institution Name", "Department Name", "Staff Name"
"Bill ID", "Insitution Name", "Department Name", "Patient Name", "Staff Name", "Bill Type", "Total", "Discount", "Net Total", "Payment Method",
"Bill Item Name", "Bill Item Code", "Item Type", "Quantity", "Rate", "Gross Value", "Bill Item Discount", "Net Value",
"Fee Name", "Fee Type", "Fee Value", "Institution Name", "Department Name", "Staff Name"
};
for (int i = 0; i < headers.length; i++) {
headerRow.createCell(i).setCellValue(headers[i]);
Expand Down Expand Up @@ -8599,9 +8602,9 @@ public void listOpdBilledBills() {
}

public void listBills(BillType billType, Class billClass, Boolean onlyCancelledBills, Boolean onlyReturnedBills,
Institution fromInstitution, Department fromDepartment,
Institution toInstitution, Department toDepartment,
Doctor referredDoctor, Institution referredInstitution) {
Institution fromInstitution, Department fromDepartment,
Institution toInstitution, Department toDepartment,
Doctor referredDoctor, Institution referredInstitution) {
bills = null;
String sql;
Map temMap = new HashMap();
Expand Down Expand Up @@ -8851,21 +8854,21 @@ public void createTableByKeyword(BillType billType, Institution ins, Department
}

public ReportTemplateRowBundle createBundleByKeywordForBills(List<BillTypeAtomic> billTypesAtomics,
Institution ins, Department dep,
Institution fromIns,
Department fromDep,
Institution toIns,
Department toDep) {
Institution ins, Department dep,
Institution fromIns,
Department fromDep,
Institution toIns,
Department toDep) {
return billService.createBundleByKeywordForBills(billTypesAtomics, ins, dep, fromIns, fromDep, toIns, toDep, null, fromDate, toDate, searchKeyword);
}

public ReportTemplateRowBundle createBundleForBills(List<BillTypeAtomic> billTypesAtomics,
Institution ins,
Department dep,
Institution fromIns,
Department fromDep,
Institution toIns,
Department toDep) {
Institution ins,
Department dep,
Institution fromIns,
Department fromDep,
Institution toIns,
Department toDep) {
return createBundleForBills(
billTypesAtomics,
ins,
Expand All @@ -8881,15 +8884,15 @@ public ReportTemplateRowBundle createBundleForBills(List<BillTypeAtomic> billTyp
}

public ReportTemplateRowBundle createBundleForBills(List<BillTypeAtomic> billTypesAtomics,
Institution ins,
Department dep,
Institution site,
Institution fromIns,
Department fromDep,
Institution toIns,
Department toDep,
Speciality paramSpeciality,
Staff paramStaff) {
Institution ins,
Department dep,
Institution site,
Institution fromIns,
Department fromDep,
Institution toIns,
Department toDep,
Speciality paramSpeciality,
Staff paramStaff) {
ReportTemplateRowBundle outputBundle = new ReportTemplateRowBundle();
List<ReportTemplateRow> outputRows;
bills = null;
Expand Down Expand Up @@ -8962,11 +8965,11 @@ public ReportTemplateRowBundle createBundleForBills(List<BillTypeAtomic> billTyp
}

public void createTableByKeyword(List<BillTypeAtomic> billTypesAtomics,
Institution ins, Department dep,
Institution fromIns,
Department fromDep,
Institution toIns,
Department toDep) {
Institution ins, Department dep,
Institution fromIns,
Department fromDep,
Institution toIns,
Department toDep) {
bills = null;
String sql;
Map temMap = new HashMap();
Expand Down Expand Up @@ -9043,13 +9046,13 @@ public void createTableByKeyword(List<BillTypeAtomic> billTypesAtomics,
}

public void createTableByKeywordForChannelBills(List<BillTypeAtomic> billTypesAtomics,
Institution ins, Department dep,
Institution fromIns,
Department fromDep,
Institution toIns,
Department toDep,
Staff consultant,
Speciality speciality
Institution ins, Department dep,
Institution fromIns,
Department fromDep,
Institution toIns,
Department toDep,
Staff consultant,
Speciality speciality
) {
bills = null;
String sql;
Expand Down Expand Up @@ -9137,12 +9140,12 @@ public void createTableByKeywordForChannelBills(List<BillTypeAtomic> billTypesAt
}

public void createTableByKeywords(List<BillTypeAtomic> billTypesAtomics,
Institution ins, Department dep,
Institution fromIns,
Department fromDep,
Institution toIns,
Department toDep,
Staff stf) {
Institution ins, Department dep,
Institution fromIns,
Department fromDep,
Institution toIns,
Department toDep,
Staff stf) {
bills = null;
String sql;
Map temMap = new HashMap();
Expand Down Expand Up @@ -9199,21 +9202,21 @@ public void createTableByKeywords(List<BillTypeAtomic> billTypesAtomics,
}

public void createTableByKeywordForBillFees(List<BillTypeAtomic> billTypesAtomics,
Institution ins, Department dep,
Institution fromIns,
Department fromDep,
Institution toIns,
Department toDep) {
Institution ins, Department dep,
Institution fromIns,
Department fromDep,
Institution toIns,
Department toDep) {
createTableByKeywordForBillFees(billTypesAtomics, ins, dep, fromIns, fromDep, toIns, toDep, null);
}

public ReportTemplateRowBundle createBundleByKeywordForBillFees(List<BillTypeAtomic> billTypesAtomics,
Institution ins, Department dep,
Institution fromIns,
Department fromDep,
Institution toIns,
Department toDep,
Category cat) {
Institution ins, Department dep,
Institution fromIns,
Department fromDep,
Institution toIns,
Department toDep,
Category cat) {
ReportTemplateRowBundle outputBundle = new ReportTemplateRowBundle();
List<ReportTemplateRow> outputRows;
String sql;
Expand Down Expand Up @@ -9302,12 +9305,12 @@ public ReportTemplateRowBundle createBundleByKeywordForBillFees(List<BillTypeAto
}

public void createTableByKeywordForBillFees(List<BillTypeAtomic> billTypesAtomics,
Institution ins, Department dep,
Institution fromIns,
Department fromDep,
Institution toIns,
Department toDep,
Category cat) {
Institution ins, Department dep,
Institution fromIns,
Department fromDep,
Institution toIns,
Department toDep,
Category cat) {

String sql;
Map temMap = new HashMap();
Expand Down Expand Up @@ -9389,22 +9392,22 @@ public void createTableByKeywordForBillFees(List<BillTypeAtomic> billTypesAtomic
}

public void createTableByKeywordForBillFee(List<BillTypeAtomic> billTypesAtomics,
Institution ins, Department dep,
Institution fromIns,
Department fromDep,
Institution toIns,
Department toDep,
Staff stf) {
Institution ins, Department dep,
Institution fromIns,
Department fromDep,
Institution toIns,
Department toDep,
Staff stf) {
createTableByKeywordBillFee(billTypesAtomics, ins, dep, fromIns, fromDep, toIns, toDep, stf);
}

public void createTableByKeywordBillFee(List<BillTypeAtomic> billTypesAtomics,
Institution ins, Department dep,
Institution fromIns,
Department fromDep,
Institution toIns,
Department toDep,
Staff stf) {
Institution ins, Department dep,
Institution fromIns,
Department fromDep,
Institution toIns,
Department toDep,
Staff stf) {

String sql;
Map temMap = new HashMap();
Expand Down Expand Up @@ -9461,11 +9464,11 @@ public void createTableByKeywordBillFee(List<BillTypeAtomic> billTypesAtomics,
}

public void createTableByKeywordForBillsWithoutToStaff(List<BillTypeAtomic> billTypesAtomics,
Institution ins, Department dep,
Institution fromIns,
Department fromDep,
Institution toIns,
Department toDep) {
Institution ins, Department dep,
Institution fromIns,
Department fromDep,
Institution toIns,
Department toDep) {
bills = null;
String sql;
Map temMap = new HashMap();
Expand Down Expand Up @@ -9543,11 +9546,11 @@ public void createTableByKeywordForBillsWithoutToStaff(List<BillTypeAtomic> bill
}

public void createTableByKeyword(BillType billType,
Institution ins, Department dep,
Institution fromIns,
Department fromDep,
Institution toIns,
Department toDep) {
Institution ins, Department dep,
Institution fromIns,
Department fromDep,
Institution toIns,
Department toDep) {
bills = null;
String sql;
Map temMap = new HashMap();
Expand Down Expand Up @@ -11626,11 +11629,11 @@ public void channelPaymentBills() {
Map m = new HashMap();

BillType[] bt = {
BillType.ChannelOnCall,
BillType.ChannelCash,
BillType.ChannelAgent,
BillType.ChannelStaff,
BillType.ChannelCredit,};
BillType.ChannelOnCall,
BillType.ChannelCash,
BillType.ChannelAgent,
BillType.ChannelStaff,
BillType.ChannelCredit,};

List<BillType> bts = Arrays.asList(bt);

Expand Down Expand Up @@ -11695,12 +11698,12 @@ public void channelPaymentBillsNew() {
Map m = new HashMap();

BillType[] bt = {
BillType.ChannelOnCall,
BillType.ChannelCash,
BillType.ChannelAgent,
BillType.ChannelStaff,
BillType.ChannelPaid,
BillType.ChannelCredit,};
BillType.ChannelOnCall,
BillType.ChannelCash,
BillType.ChannelAgent,
BillType.ChannelStaff,
BillType.ChannelPaid,
BillType.ChannelCredit,};

List<BillType> bts = Arrays.asList(bt);

Expand Down Expand Up @@ -15208,7 +15211,7 @@ public ReportTemplateRowBundle generateOpdProfessionalFees(String paymentStatusS
// If paymentStatus is ALL, no additional condition is added

// Add other conditions based on your filters
List<BillTypeAtomic> btas = BillTypeAtomic.findByServiceType(ServiceType.OPD);
List<BillTypeAtomic> btas = visitType.equalsIgnoreCase("OP") ? BillTypeAtomic.findByServiceType(ServiceType.OPD) : BillTypeAtomic.findByServiceType(ServiceType.INWARD);
bundle.setDescription("Bill Types Listed: " + btas);
if (!btas.isEmpty()) {
jpql += " and bi.bill.billTypeAtomic in :bts ";
Expand Down Expand Up @@ -17186,9 +17189,10 @@ public void generateChannelIncome() {
parameters.put("bfr", true);
parameters.put("br", true);

List<BillTypeAtomic> bts = BillTypeAtomic.findByServiceType(ServiceType.CHANNELLING);;
List<BillTypeAtomic> bts = BillTypeAtomic.findByServiceType(ServiceType.CHANNELLING);
;
if (bookingType != null) {
switch (bookingType) {
switch (bookingType) {
case "System Bookings":
bts.remove(BillTypeAtomic.CHANNEL_BOOKING_FOR_PAYMENT_ONLINE_COMPLETED_PAYMENT);
break;
Expand Down Expand Up @@ -18299,8 +18303,8 @@ public void createBillsBillItemsList(Set<Bill> bills, List<BillItem> billItems)
Row headerRow = sheet.createRow(rowIdx++);
// Headers for both bills and bill items
String[] headers = {
"Bill ID", "Institution Name", "Department Name", "Patient Name", "Staff Name", "User", "Bill Type", "Total", "Discount", "Net Total", "Payment Method",
"Bill Item Name", "Bill Item Code", "Item Type", "Quantity", "Rate", "Gross Value", "Bill Item Discount", "Net Value"
"Bill ID", "Institution Name", "Department Name", "Patient Name", "Staff Name", "User", "Bill Type", "Total", "Discount", "Net Total", "Payment Method",
"Bill Item Name", "Bill Item Code", "Item Type", "Quantity", "Rate", "Gross Value", "Bill Item Discount", "Net Value"
};
for (int i = 0; i < headers.length; i++) {
headerRow.createCell(i).setCellValue(headers[i]);
Expand Down
Loading

0 comments on commit cddda72

Please sign in to comment.