diff --git a/.github/workflows/custom_deployment.yml b/.github/workflows/custom_deployment.yml index 39bc8b4244..50aadfe1b2 100644 --- a/.github/workflows/custom_deployment.yml +++ b/.github/workflows/custom_deployment.yml @@ -13,7 +13,7 @@ on: - warning - debug tags: - description: 'Tags for the workflow' + description: 'Tags of the workflow' required: true type: string diff --git a/src/main/java/com/divudi/bean/common/ReportsController.java b/src/main/java/com/divudi/bean/common/ReportsController.java index e2d1e58747..291a264bb9 100644 --- a/src/main/java/com/divudi/bean/common/ReportsController.java +++ b/src/main/java/com/divudi/bean/common/ReportsController.java @@ -337,7 +337,6 @@ public class ReportsController implements Serializable { Map>> weeklyDailyBillItemMap7to1; Map>> weeklyDailyBillItemMap1to7; - private boolean showChart; public String getDischargedStatus() { @@ -404,7 +403,6 @@ public void setSelectedDateType(String selectedDateType) { this.selectedDateType = selectedDateType; } - public Investigation getInvestigation() { return investigation; } @@ -1834,17 +1832,31 @@ public void generateOPDWeeklyReport() { List opdBts = new ArrayList<>(); - opdBts.add(BillTypeAtomic.PACKAGE_OPD_BILL_WITH_PAYMENT); - opdBts.add(BillTypeAtomic.PACKAGE_OPD_BATCH_BILL_WITH_PAYMENT); - opdBts.add(BillTypeAtomic.PACKAGE_OPD_BILL_PAYMENT_COLLECTION_AT_CASHIER); - opdBts.add(BillTypeAtomic.PACKAGE_OPD_BATCH_BILL_CANCELLATION); - opdBts.add(BillTypeAtomic.PACKAGE_OPD_BILL_CANCELLATION); + if (visitType == null || visitType.equalsIgnoreCase("OP")) { + opdBts.add(BillTypeAtomic.PACKAGE_OPD_BILL_WITH_PAYMENT); + opdBts.add(BillTypeAtomic.PACKAGE_OPD_BATCH_BILL_WITH_PAYMENT); + opdBts.add(BillTypeAtomic.PACKAGE_OPD_BILL_PAYMENT_COLLECTION_AT_CASHIER); + opdBts.add(BillTypeAtomic.PACKAGE_OPD_BATCH_BILL_CANCELLATION); + opdBts.add(BillTypeAtomic.PACKAGE_OPD_BILL_CANCELLATION); + opdBts.add(BillTypeAtomic.OPD_BILL_WITH_PAYMENT); + opdBts.add(BillTypeAtomic.OPD_BATCH_BILL_WITH_PAYMENT); + opdBts.add(BillTypeAtomic.OPD_BILL_CANCELLATION); + opdBts.add(BillTypeAtomic.OPD_BILL_REFUND); + } + + if (visitType == null || visitType.equalsIgnoreCase("IP")) { + opdBts.add(BillTypeAtomic.INWARD_SERVICE_BATCH_BILL); + opdBts.add(BillTypeAtomic.INWARD_SERVICE_BILL); + opdBts.add(BillTypeAtomic.INWARD_SERVICE_BATCH_BILL_CANCELLATION); + opdBts.add(BillTypeAtomic.INWARD_SERVICE_BILL_CANCELLATION); + opdBts.add(BillTypeAtomic.INWARD_FINAL_BILL); + } - opdBts.add(BillTypeAtomic.INWARD_SERVICE_BATCH_BILL); - opdBts.add(BillTypeAtomic.INWARD_SERVICE_BILL); - opdBts.add(BillTypeAtomic.INWARD_SERVICE_BATCH_BILL_CANCELLATION); - opdBts.add(BillTypeAtomic.INWARD_SERVICE_BILL_CANCELLATION); - opdBts.add(BillTypeAtomic.INWARD_FINAL_BILL); + if (visitType == null) { + opdBts.add(BillTypeAtomic.CC_BILL); + opdBts.add(BillTypeAtomic.CC_BILL_REFUND); + opdBts.add(BillTypeAtomic.CC_BILL_CANCELLATION); + } System.out.println("bill items"); @@ -1871,7 +1883,7 @@ private void groupBillItemsDaily() { final Date billItemDate = billItem.getBill().getCreatedAt(); - if (billItemDate == null) { + if (billItemDate == null || billItem.getItem() == null) { continue; } @@ -1887,7 +1899,8 @@ private void groupBillItemsDaily() { Map> billItemMap = weeklyBillItemMap7to7.containsKey(weekOfMonth) ? weeklyBillItemMap7to7.get(weekOfMonth) : new HashMap<>(); billItemMap.computeIfAbsent(billItem.getItem().getName(), k -> new HashMap<>()) - .put(dayOfMonth, billItemMap.get(billItem.getItem().getName()).getOrDefault(dayOfMonth, 0.0) + 1.0); + .put(dayOfMonth, billItemMap.get(billItem.getItem().getName()) != null + ? billItemMap.get(billItem.getItem().getName()).getOrDefault(dayOfMonth, 0.0) + 1.0 : 1.0); weeklyBillItemMap7to7.put(weekOfMonth, billItemMap); } else if (hourOfDay < 13) { @@ -1895,7 +1908,8 @@ private void groupBillItemsDaily() { Map> billItemMap = weeklyBillItemMap7to1.containsKey(weekOfMonth) ? weeklyBillItemMap7to1.get(weekOfMonth) : new HashMap<>(); billItemMap.computeIfAbsent(billItem.getItem().getName(), k -> new HashMap<>()) - .put(dayOfMonth, billItemMap.get(billItem.getItem().getName()).getOrDefault(dayOfMonth, 0.0) + 1.0); + .put(dayOfMonth, billItemMap.get(billItem.getItem().getName()) != null + ? billItemMap.get(billItem.getItem().getName()).getOrDefault(dayOfMonth, 0.0) + 1.0 : 1.0); weeklyBillItemMap7to1.put(weekOfMonth, billItemMap); } else { @@ -1903,7 +1917,8 @@ private void groupBillItemsDaily() { Map> billItemMap = weeklyBillItemMap1to7.containsKey(weekOfMonth) ? weeklyBillItemMap1to7.get(weekOfMonth) : new HashMap<>(); billItemMap.computeIfAbsent(billItem.getItem().getName(), k -> new HashMap<>()) - .put(dayOfMonth, billItemMap.get(billItem.getItem().getName()).getOrDefault(dayOfMonth, 0.0) + 1.0); + .put(dayOfMonth, billItemMap.get(billItem.getItem().getName()) != null + ? billItemMap.get(billItem.getItem().getName()).getOrDefault(dayOfMonth, 0.0) + 1.0 : 1.0); weeklyBillItemMap1to7.put(weekOfMonth, billItemMap); } @@ -1979,7 +1994,7 @@ private void groupBillItemsWeekly() { final Date billItemDate = billItem.getBill().getCreatedAt(); - if (billItemDate == null) { + if (billItemDate == null || billItem.getItem() == null) { continue; } @@ -1992,15 +2007,18 @@ private void groupBillItemsWeekly() { if (hourOfDay >= 19 || hourOfDay < 7) { // Between 7 PM to 7 AM billItemMap7to7.computeIfAbsent(billItem.getItem().getName(), k -> new HashMap<>()) - .put(weekOfMonth, billItemMap7to7.get(billItem.getItem().getName()).getOrDefault(weekOfMonth, 0.0) + 1.0); + .put(weekOfMonth, billItemMap7to7.get(billItem.getItem().getName()) != null + ? billItemMap7to7.get(billItem.getItem().getName()).getOrDefault(weekOfMonth, 0.0) + 1.0 : 1.0); } else if (hourOfDay < 13) { // Between 7 AM to 1 PM billItemMap7to1.computeIfAbsent(billItem.getItem().getName(), k -> new HashMap<>()) - .put(weekOfMonth, billItemMap7to1.get(billItem.getItem().getName()).getOrDefault(weekOfMonth, 0.0) + 1.0); + .put(weekOfMonth, billItemMap7to1.get(billItem.getItem().getName()) != null + ? billItemMap7to1.get(billItem.getItem().getName()).getOrDefault(weekOfMonth, 0.0) + 1.0 : 1.0); } else { // Between 1 PM to 7 PM billItemMap1to7.computeIfAbsent(billItem.getItem().getName(), k -> new HashMap<>()) - .put(weekOfMonth, billItemMap1to7.get(billItem.getItem().getName()).getOrDefault(weekOfMonth, 0.0) + 1.0); + .put(weekOfMonth, billItemMap1to7.get(billItem.getItem().getName()) != null + ? billItemMap1to7.get(billItem.getItem().getName()).getOrDefault(weekOfMonth, 0.0) + 1.0 : 1.0); } } @@ -2069,13 +2087,12 @@ private ReportTemplateRowBundle generateWeeklyBillItems(List bts jpql += "AND bill.billTypeAtomic in :bts "; parameters.put("bts", bts); - if (visitType != null) { - if (visitType.equalsIgnoreCase("IP") || visitType.equalsIgnoreCase("OP")) { - jpql += "AND bill.ipOpOrCc = :type "; - parameters.put("type", visitType); - } - } - +// if (visitType != null) { +// if (visitType.equalsIgnoreCase("IP") || visitType.equalsIgnoreCase("OP")) { +// jpql += "AND bill.ipOpOrCc = :type "; +// parameters.put("type", visitType); +// } +// } if (getSearchKeyword().getItemName() != null && !getSearchKeyword().getItemName().trim().isEmpty()) { jpql += "AND ((bill.billPackege.name) like :itemName ) "; parameters.put("itemName", "%" + getSearchKeyword().getItemName().trim().toUpperCase() + "%"); @@ -2624,7 +2641,7 @@ public void generateDebtorBalanceReport(final boolean onlyDueBills) { } public ReportTemplateRowBundle generateDebtorBalanceReportBills(List bts, List billPaymentMethods, - boolean onlyDueBills) { + boolean onlyDueBills) { Map parameters = new HashMap<>(); String jpql = "SELECT new com.divudi.data.ReportTemplateRow(bill) " + "FROM Bill bill " @@ -3147,7 +3164,6 @@ private ReportTemplateRowBundle generateExternalLaboratoryWorkloadBillItems(List // + "LEFT JOIN PatientInvestigation pi ON pi.billItem = billItem " // + "WHERE bill.billTypeAtomic IN :bts " // + "AND bill.createdAt BETWEEN :fd AND :td "; - String jpql = "SELECT new com.divudi.data.ReportTemplateRow(billItem) " + "FROM PatientInvestigation pi " + "JOIN pi.billItem billItem " @@ -3354,14 +3370,14 @@ public void generateOpdAndInwardDueReport() { // opdBts.add(BillTypeAtomic.INWARD_FINAL_BILL); opdBts.add(BillTypeAtomic.INWARD_FINAL_BILL_PAYMENT_BY_CREDIT_COMPANY); } else if (visitType.equalsIgnoreCase("OP")) { - opdBts.add(BillTypeAtomic.OPD_BILL_WITH_PAYMENT); - opdBts.add(BillTypeAtomic.OPD_BILL_PAYMENT_COLLECTION_AT_CASHIER); +// opdBts.add(BillTypeAtomic.OPD_BILL_WITH_PAYMENT); +// opdBts.add(BillTypeAtomic.OPD_BILL_PAYMENT_COLLECTION_AT_CASHIER); opdBts.add(BillTypeAtomic.OPD_BATCH_BILL_WITH_PAYMENT); opdBts.add(BillTypeAtomic.OPD_BATCH_BILL_PAYMENT_COLLECTION_AT_CASHIER); opdBts.add(BillTypeAtomic.PACKAGE_OPD_BATCH_BILL_WITH_PAYMENT); opdBts.add(BillTypeAtomic.PACKAGE_OPD_BILL_PAYMENT_COLLECTION_AT_CASHIER); opdBts.add(BillTypeAtomic.OPD_BATCH_BILL_CANCELLATION); - opdBts.add(BillTypeAtomic.OPD_BILL_CANCELLATION); +// opdBts.add(BillTypeAtomic.OPD_BILL_CANCELLATION); opdBts.add(BillTypeAtomic.PACKAGE_OPD_BATCH_BILL_CANCELLATION); opdBts.add(BillTypeAtomic.PACKAGE_OPD_BILL_CANCELLATION); } @@ -3466,13 +3482,13 @@ private void groupBills() { Bill bill1 = row.getBill(); if (reportType != null && reportType.equalsIgnoreCase("paid")) { - if ((bill1.getNetTotal()-bill1.getPaidAmount()) != 0) { + if ((bill1.getNetTotal() - bill1.getPaidAmount()) != 0) { continue; } } if (reportType != null && reportType.equalsIgnoreCase("due")) { - if ((bill1.getNetTotal()-bill1.getPaidAmount()) == 0) { + if ((bill1.getNetTotal() - bill1.getPaidAmount()) == 0) { continue; } } @@ -3561,7 +3577,7 @@ public Double calculateDueAmountSubTotalByBills(List bills) { Double balance = 0.0; for (Bill bill : bills) { - balance += bill.getBalance(); + balance += bill.getNetTotal() - bill.getSettledAmountBySponsor() - bill.getSettledAmountByPatient(); } return balance; @@ -3632,7 +3648,7 @@ public Double calculateSponsorShareNetTotal() { return sponsorShareNetTotal; } - + public Double calculateNetAmountSubTotalByBills(List bills) { Double netTotal = 0.0; @@ -3653,7 +3669,6 @@ public Double calculateDiscountSubTotalByBills(List bills) { return discount; } - public Double calculateNetAmountNetTotal() { double netAmountNetTotal = 0.0; Map> billMap = bundle.getGroupedBillItemsByInstitution(); @@ -3686,16 +3701,22 @@ public void generateDiscountReport() { opdBts.add(BillTypeAtomic.INWARD_SERVICE_BILL_CANCELLATION); opdBts.add(BillTypeAtomic.INWARD_FINAL_BILL); } else if (visitType.equalsIgnoreCase("OP")) { - opdBts.add(BillTypeAtomic.OPD_BILL_WITH_PAYMENT); - opdBts.add(BillTypeAtomic.OPD_BILL_PAYMENT_COLLECTION_AT_CASHIER); - opdBts.add(BillTypeAtomic.OPD_BATCH_BILL_WITH_PAYMENT); - opdBts.add(BillTypeAtomic.OPD_BATCH_BILL_PAYMENT_COLLECTION_AT_CASHIER); + opdBts.add(BillTypeAtomic.PACKAGE_OPD_BILL_WITH_PAYMENT); opdBts.add(BillTypeAtomic.PACKAGE_OPD_BATCH_BILL_WITH_PAYMENT); opdBts.add(BillTypeAtomic.PACKAGE_OPD_BILL_PAYMENT_COLLECTION_AT_CASHIER); - opdBts.add(BillTypeAtomic.OPD_BATCH_BILL_CANCELLATION); - opdBts.add(BillTypeAtomic.OPD_BILL_CANCELLATION); opdBts.add(BillTypeAtomic.PACKAGE_OPD_BATCH_BILL_CANCELLATION); opdBts.add(BillTypeAtomic.PACKAGE_OPD_BILL_CANCELLATION); + opdBts.add(BillTypeAtomic.PACKAGE_OPD_BILL_REFUND); + + opdBts.add(BillTypeAtomic.OPD_BILL_WITH_PAYMENT); + opdBts.add(BillTypeAtomic.OPD_BILL_CANCELLATION); + opdBts.add(BillTypeAtomic.OPD_BILL_REFUND); + + opdBts.add(BillTypeAtomic.OPD_BATCH_BILL_WITH_PAYMENT); + opdBts.add(BillTypeAtomic.OPD_BATCH_BILL_CANCELLATION); + + opdBts.add(BillTypeAtomic.OPD_BILL_PAYMENT_COLLECTION_AT_CASHIER); + opdBts.add(BillTypeAtomic.OPD_BATCH_BILL_PAYMENT_COLLECTION_AT_CASHIER); } if (reportType.equalsIgnoreCase("detail")) { @@ -4004,9 +4025,7 @@ public void exportCollectionCenterBillWiseDetailReportToExcel() { response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); response.setHeader("Content-Disposition", "attachment; filename=Collection_Center_Report.xlsx"); - try (XSSFWorkbook workbook = new XSSFWorkbook(); - OutputStream out = response.getOutputStream()) { - + try (XSSFWorkbook workbook = new XSSFWorkbook(); OutputStream out = response.getOutputStream()) { XSSFSheet sheet = workbook.createSheet("Report"); int rowIndex = 0; @@ -4278,8 +4297,8 @@ public void exportDetailedWeeklyOPDReportToPDF() { } private void addWeeklyReportSection(Document document, String sectionTitle, List itemList, - List daysOfWeek, Map>> weeklyDailyBillItemMap, - int week, com.itextpdf.text.Font headerFont, com.itextpdf.text.Font regularFont) throws DocumentException { + List daysOfWeek, Map>> weeklyDailyBillItemMap, + int week, com.itextpdf.text.Font headerFont, com.itextpdf.text.Font regularFont) throws DocumentException { document.add(new com.itextpdf.text.Paragraph(sectionTitle, headerFont)); document.add(com.itextpdf.text.Chunk.NEWLINE); @@ -4382,8 +4401,7 @@ public void exportDetailedWeeklyOPDReportToExcel() { } } - private void populateDataRows(Sheet sheet, int rowIndex, List itemList, List daysOfWeek, Map - >> weeklyDailyBillItemMap, int week) { + private void populateDataRows(Sheet sheet, int rowIndex, List itemList, List daysOfWeek, Map>> weeklyDailyBillItemMap, int week) { for (String item : itemList) { Row dataRow = sheet.createRow(rowIndex++); int colIndex = 0; @@ -4407,8 +4425,7 @@ public void exportRouteAnalysisDetailReportToExcel() { response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); response.setHeader("Content-Disposition", "attachment; filename=Collecting_Center_Monthly_Report.xlsx"); - try (XSSFWorkbook workbook = new XSSFWorkbook(); - OutputStream out = response.getOutputStream()) { + try (XSSFWorkbook workbook = new XSSFWorkbook(); OutputStream out = response.getOutputStream()) { XSSFSheet sheet = workbook.createSheet("Monthly Report"); int rowIndex = 0; @@ -4634,4 +4651,143 @@ public void exportRouteAnalysisSummaryReportToExcel() { e.printStackTrace(); } } + + public Double calculateIpGrossAmountSubTotalByBills(List bills) { + Double billTotal = 0.0; + + for (Bill bill : bills) { + billTotal += bill.getPatientEncounter().getFinalBill().getGrantTotal(); + } + + return billTotal; + } + + public Double calculateIpDiscountSubTotalByBills(List bills) { + Double discount = 0.0; + + for (Bill bill : bills) { + discount += bill.getPatientEncounter().getFinalBill().getDiscount(); + } + + return discount; + } + + public Double calculateIpNetAmountSubTotalByBills(List bills) { + Double netTotal = 0.0; + + for (Bill bill : bills) { + netTotal += bill.getPatientEncounter().getFinalBill().getNetTotal(); + } + + return netTotal; + } + + public Double calculateIpPatientShareSubTotalByBills(List bills) { + Double settledAmountByPatient = 0.0; + + for (Bill bill : bills) { + settledAmountByPatient += bill.getPatientEncounter().getFinalBill().getSettledAmountByPatient(); + } + + return settledAmountByPatient; + } + + public Double calculateIpSponsorShareSubTotalByBills(List bills) { + Double settledAmountBySponsor = 0.0; + + for (Bill bill : bills) { + settledAmountBySponsor += bill.getPatientEncounter().getFinalBill().getSettledAmountBySponsor(); + } + + return settledAmountBySponsor; + } + + public Double calculateIpDueAmountSubTotalByBills(List bills) { + Double balance = 0.0; + + for (Bill bill : bills) { + balance += bill.getPatientEncounter().getFinalBill().getNetTotal() - bill.getPatientEncounter().getFinalBill().getSettledAmountBySponsor() - bill.getPatientEncounter().getFinalBill().getSettledAmountByPatient(); + } + + return balance; + } + + public Double calculateIpGrossAmountNetTotal() { + double grossAmountNetTotal = 0.0; + Map> billMap = bundle.getGroupedBillItemsByInstitution(); + + for (Map.Entry> entry : billMap.entrySet()) { + List bills = entry.getValue(); + + grossAmountNetTotal += calculateIpGrossAmountSubTotalByBills(bills); + } + + return grossAmountNetTotal; + } + + public Double calculateIpDiscountNetTotal() { + double discountNetTotal = 0.0; + Map> billMap = bundle.getGroupedBillItemsByInstitution(); + + for (Map.Entry> entry : billMap.entrySet()) { + List bills = entry.getValue(); + + discountNetTotal += calculateIpDiscountSubTotalByBills(bills); + } + + return discountNetTotal; + } + + public Double calculateIpNetAmountNetTotal() { + double netAmountNetTotal = 0.0; + Map> billMap = bundle.getGroupedBillItemsByInstitution(); + + for (Map.Entry> entry : billMap.entrySet()) { + List bills = entry.getValue(); + + netAmountNetTotal += calculateIpNetAmountSubTotalByBills(bills); + } + + return netAmountNetTotal; + } + + public Double calculateIpPatientShareNetTotal() { + double patientShareNetTotal = 0.0; + Map> billMap = bundle.getGroupedBillItemsByInstitution(); + + for (Map.Entry> entry : billMap.entrySet()) { + List bills = entry.getValue(); + + patientShareNetTotal += calculateIpPatientShareSubTotalByBills(bills); + } + + return patientShareNetTotal; + } + + public Double calculateIpSponsorShareNetTotal() { + double sponsorShareNetTotal = 0.0; + Map> billMap = bundle.getGroupedBillItemsByInstitution(); + + for (Map.Entry> entry : billMap.entrySet()) { + List bills = entry.getValue(); + + sponsorShareNetTotal += calculateIpSponsorShareSubTotalByBills(bills); + + } + + return sponsorShareNetTotal; + } + + public Double calculateIpDueAmountNetTotal() { + double dueAmountNetTotal = 0.0; + Map> billMap = bundle.getGroupedBillItemsByInstitution(); + + for (Map.Entry> entry : billMap.entrySet()) { + List bills = entry.getValue(); + + dueAmountNetTotal += calculateIpDueAmountSubTotalByBills(bills); + } + + return dueAmountNetTotal; + } } diff --git a/src/main/java/com/divudi/bean/common/SearchController.java b/src/main/java/com/divudi/bean/common/SearchController.java index 8e1eebeb49..1cddbc3fad 100644 --- a/src/main/java/com/divudi/bean/common/SearchController.java +++ b/src/main/java/com/divudi/bean/common/SearchController.java @@ -4265,7 +4265,7 @@ public void createPharmacyAdjustmentBillItemTable() { sql += " order by bi.id desc"; - billItems = getBillItemFacade().findByJpql(sql, m, TemporalType.TIMESTAMP, 50); + billItems = getBillItemFacade().findByJpql(sql, m, TemporalType.TIMESTAMP); } diff --git a/src/main/java/com/divudi/bean/pharmacy/PharmacyController.java b/src/main/java/com/divudi/bean/pharmacy/PharmacyController.java index c577bee323..d0dba578c2 100644 --- a/src/main/java/com/divudi/bean/pharmacy/PharmacyController.java +++ b/src/main/java/com/divudi/bean/pharmacy/PharmacyController.java @@ -791,6 +791,7 @@ public String generateFileNameForReport(String reportName) { return reportName.trim(); } + @Deprecated public void generateGRNReportTableByBillItem(List bt) { bills = null; totalCreditPurchaseValue = 0.0; @@ -847,33 +848,34 @@ public void generateGRNReportTableByBillItem(List bt) { } public String navigateToPrinteGeneratedGrnDetailedRportTable() { - if(bills==null){ + if (bills == null) { JsfUtil.addErrorMessage("No Bills"); return null; } - if(bills.isEmpty()){ + if (bills.isEmpty()) { JsfUtil.addErrorMessage("Bill List Empty"); return null; } - for(Bill b:bills){ - if(b.getBillItems()==null || b.getBillItems().isEmpty()){ - b.setBillItems(billService.fetchBillItems(b)); + for (Bill b : bills) { + if (b.getBillItems() == null || b.getBillItems().isEmpty()) { + b.setBillItems(billService.fetchBillItems(b)); } } return "/reports/inventoryReports/grn_report_detail_print?faces-redirect=true"; } + public String navigateToPrinteGeneratedGrnReturnReportTable() { - if(bills==null){ + if (bills == null) { JsfUtil.addErrorMessage("No Bills"); return null; } - if(bills.isEmpty()){ + if (bills.isEmpty()) { JsfUtil.addErrorMessage("Bill List Empty"); return null; } - for(Bill b:bills){ - if(b.getBillItems()==null || b.getBillItems().isEmpty()){ - b.setBillItems(billService.fetchBillItems(b)); + for (Bill b : bills) { + if (b.getBillItems() == null || b.getBillItems().isEmpty()) { + b.setBillItems(billService.fetchBillItems(b)); } } return "/reports/inventoryReports/grn_report_return_print?faces-redirect=true"; @@ -881,10 +883,9 @@ public String navigateToPrinteGeneratedGrnReturnReportTable() { public String navigateBackToGeneratedGrnDetailedRportTable() { return "/reports/inventoryReports/grn_report?faces-redirect=true"; - } - - - public void generateGRNReportTable() { + } + + public void generateGrnReportTable() { bills = null; totalCreditPurchaseValue = 0.0; totalCashPurchaseValue = 0.0; @@ -893,10 +894,8 @@ public void generateGRNReportTable() { List bt = new ArrayList<>(); if ("detailReport".equals(reportType)) { bt.add(BillType.PharmacyGrnBill); - generateGRNReportTableByBillItem(bt); } else if ("returnReport".equals(reportType)) { bt.add(BillType.PharmacyGrnReturn); - generateGRNReportTableByBillItem(bt); } else if ("summeryReport".equals(reportType)) { bt.add(BillType.PharmacyGrnBill); bt.add(BillType.PharmacyGrnReturn); @@ -936,10 +935,14 @@ public void generateGRNReportTable() { tmp.put("pm", paymentMethod); } - if (fromInstitution != null) { + if (fromInstitution != null && "detailReport".equals(reportType)) { sql += " AND b.fromInstitution = :supplier"; tmp.put("supplier", fromInstitution); } + if (fromInstitution != null && "returnReport".equals(reportType)) { + sql += " AND b.toInstitution = :supplier"; + tmp.put("supplier", fromInstitution); + } sql += " order by b.id desc"; @@ -983,8 +986,8 @@ private void resetFields() { } public void generateConsumptionReportTableByBill(BillType billType) { - List bt = new ArrayList<>(); - bt.add(BillType.PharmacyIssue); +// List bt = new ArrayList<>(); +// bt.add(BillType.PharmacyIssue); bills = new ArrayList<>(); String sql = "SELECT b FROM Bill b WHERE b.retired = false" @@ -1091,7 +1094,6 @@ public void generateConsumptionReportTableByBillItems(BillType billType) { } } - @Deprecated public void generateConsumptionReportTableAsSummary(BillType billType) { // Initialize bill types List bt = new ArrayList<>(); @@ -1488,6 +1490,7 @@ public List calculateTotalsForBillItems(List billItemLi } public void createStockTransferReport() { + resetFields(); BillType bt; if ("issue".equals(transferType)) { @@ -1497,24 +1500,12 @@ public void createStockTransferReport() { } if ("summeryReport".equals(reportType)) { - - bills = null; - departmentSummaries = null; - issueDepartmentCategoryWiseItems = null; generateConsumptionReportTableAsSummary(bt); } else if ("detailReport".equals(reportType)) { - - billItems = null; - departmentSummaries = null; - issueDepartmentCategoryWiseItems = null; generateConsumptionReportTableByBillItems(bt); } else if ("byBill".equals(reportType)) { - - bills = null; - billItems = null; - issueDepartmentCategoryWiseItems = null; generateConsumptionReportTableByBill(bt); } diff --git a/src/main/java/com/divudi/bean/pharmacy/PharmacySaleController.java b/src/main/java/com/divudi/bean/pharmacy/PharmacySaleController.java index 6a36dab3d8..5d31ac906c 100644 --- a/src/main/java/com/divudi/bean/pharmacy/PharmacySaleController.java +++ b/src/main/java/com/divudi/bean/pharmacy/PharmacySaleController.java @@ -2069,10 +2069,6 @@ public List createMultiplePayments(Bill bill, PaymentMethod pm) { } public void settleBillWithPay() { - Date startTime = new Date(); - Date fromDate = null; - Date toDate = null; - editingQty = null; if (sessionController.getApplicationPreference().isCheckPaymentSchemeValidation()) { diff --git a/src/main/java/com/divudi/bean/pharmacy/SaleReturnController.java b/src/main/java/com/divudi/bean/pharmacy/SaleReturnController.java index 7f4aec76e3..6d42892e1d 100644 --- a/src/main/java/com/divudi/bean/pharmacy/SaleReturnController.java +++ b/src/main/java/com/divudi/bean/pharmacy/SaleReturnController.java @@ -168,6 +168,7 @@ private void savePreReturnBill() { getReturnBill().copy(getBill()); getReturnBill().setBillType(BillType.PharmacyPre); + //getReturnBill().setBillTypeAtomic(BillTypeAtomic.PHARMACY_RETAIL_SALE_RETURN_ITEMS_AND_PAYMENTS); getReturnBill().setBilledBill(getBill()); diff --git a/src/main/java/com/divudi/bean/pharmacy/TransferIssueController.java b/src/main/java/com/divudi/bean/pharmacy/TransferIssueController.java index 0c50dbbbbc..39be24681a 100644 --- a/src/main/java/com/divudi/bean/pharmacy/TransferIssueController.java +++ b/src/main/java/com/divudi/bean/pharmacy/TransferIssueController.java @@ -106,6 +106,21 @@ public String navigateToPharmacyIssueForRequests() { return "/pharmacy/pharmacy_transfer_issue"; } +// public boolean isFullyIssued() { +// for (BillItem originalItem : billItems) { +// +// if (originalItem.getIssuedPhamaceuticalItemQty() == originalItem.getQty()) { +// if (originalItem.getPharmaceuticalBillItem().getItemBatch() == null) { +// continue; +// } +// System.out.println(originalItem.getIssuedPhamaceuticalItemQty() + " originalItem.getIssuedPhamaceuticalItemQty " + originalItem.getQty() + " originalItem.getQty()"); +// return true; +// } +// } +// +// return false; +// } + public boolean isFullyIssued(Bill bill) { if (bill == null || bill.getBillItems() == null || bill.getBillItems().isEmpty()) { return false; // Null or empty bills are not considered fully issued @@ -114,7 +129,9 @@ public boolean isFullyIssued(Bill bill) { for (BillItem originalItem : billItems) { if (originalItem.getPharmaceuticalBillItem().getQty() > 0) { - return false; // If any item's issued quantity is less than its original quantity + return false; + }else if(originalItem.getPharmaceuticalBillItem().getItemBatch() == null){ + return false; } } @@ -251,13 +268,14 @@ public void generateBillComponent() { double issuableQty = i.getQty() - (Math.abs(billedIssue) - Math.abs(cancelledIssue)); + //i.setIssuedPhamaceuticalItemQty(i.getQty() - issuableQty); List stockQtys = pharmacyBean.getStockByQty(i.getItem(), issuableQty, getSessionController().getDepartment()); for (StockQty sq : stockQtys) { - if (sq.getQty() == 0) { - continue; - } +// if (sq.getQty() == 0) { +// continue; +// } //Checking User Stock Entity if (!userStockController.isStockAvailable(sq.getStock(), sq.getQty(), getSessionController().getLoggedUser())) { @@ -271,6 +289,15 @@ public void generateBillComponent() { bItem.setReferanceBillItem(i); bItem.setQty(i.getQty()); bItem.setTmpQty(sq.getQty()); + bItem.setIssuedPhamaceuticalItemQty(i.getQty() - sq.getQty()); + + if (stockQtys.size() > 1) { + double billedIssueByItemBatch = getPharmacyCalculation().getBilledIssuedByRequestedItemBatch(i, BillType.PharmacyTransferIssue, sq.getStock().getItemBatch()); + System.out.println(billedIssueByItemBatch + " billedIssueByItemBatch"); + double cancelledIssueByItemBatch = getPharmacyCalculation().getCancelledIssuedByRequestedItemBatch(i, BillType.PharmacyTransferIssue, sq.getStock().getItemBatch()); + System.out.println(cancelledIssueByItemBatch + " cancelledIssueByItemBatch"); + bItem.setIssuedPhamaceuticalItemQty(Math.abs(billedIssueByItemBatch) + Math.abs(cancelledIssueByItemBatch)); + } // s bItem.setTmpSuggession(getSuggession(i.getBillItem().getItem())); // //System.err.println("List "+bItem.getTmpSuggession()); @@ -290,6 +317,15 @@ public void generateBillComponent() { UserStock us = userStockController.saveUserStock(bItem, getSessionController().getLoggedUser(), usc); bItem.setTransUserStock(us); +// double totalIssueAmount = 0; +// +// if (stockQtys.size() > 1) { +// for (StockQty s : stockQtys) { +// totalIssueAmount += s.getQty(); +// } +// bItem.setIssuedPhamaceuticalItemQty(totalIssueAmount); +// +// } getBillItems().add(bItem); flagStockFound = true; @@ -512,6 +548,25 @@ public void settle() { return; } + for (BillItem bi : getBillItems()) { + if (bi.getPharmaceuticalBillItem().getItemBatch() != null) { + if (bi.getPharmaceuticalBillItem().getStock().getStock() < bi.getPharmaceuticalBillItem().getQty()) { + JsfUtil.addErrorMessage("Available quantity is less than issued quantity in " + bi.getPharmaceuticalBillItem().getItemBatch().getItem().getName()); + return; + } + } else if (bi.getPharmaceuticalBillItem().getItemBatch() == null) { + if (bi.getPharmaceuticalBillItem().getQty() > 0) { + JsfUtil.addErrorMessage(bi.getItem().getName() + " is not available in the stock"); + return; + } + } + + if (bi.getReferanceBillItem().getQty() < (bi.getPharmaceuticalBillItem().getQty()+bi.getIssuedPhamaceuticalItemQty())) { + JsfUtil.addErrorMessage("Issued quantity is higher than requested quantity in " + bi.getItem().getName()); + return; + } + } + saveBill(); for (BillItem i : getBillItems()) { @@ -580,9 +635,13 @@ public void settle() { } getIssuedBill().setInstitution(getSessionController().getInstitution()); - getIssuedBill().setDepartment(getIssuedBill().getFromDepartment()); -// - getIssuedBill().setToInstitution(getIssuedBill().getToDepartment().getInstitution()); + getIssuedBill().setDepartment(getSessionController().getDepartment()); + + getIssuedBill().setFromInstitution(getSessionController().getInstitution()); + getIssuedBill().setFromDepartment(getSessionController().getDepartment()); + + getIssuedBill().setToInstitution(getRequestedBill().getFromInstitution()); + getIssuedBill().setToDepartment(getRequestedBill().getFromDepartment()); getIssuedBill().setCreater(getSessionController().getLoggedUser()); getIssuedBill().setCreatedAt(Calendar.getInstance().getTime()); diff --git a/src/main/java/com/divudi/bean/pharmacy/TransferReceiveController.java b/src/main/java/com/divudi/bean/pharmacy/TransferReceiveController.java index efb7b18e2c..51d390de96 100644 --- a/src/main/java/com/divudi/bean/pharmacy/TransferReceiveController.java +++ b/src/main/java/com/divudi/bean/pharmacy/TransferReceiveController.java @@ -511,6 +511,8 @@ public void saveBill() { getReceivedBill().setFromStaff(getIssuedBill().getToStaff()); getReceivedBill().setFromInstitution(getIssuedBill().getInstitution()); getReceivedBill().setFromDepartment(getIssuedBill().getDepartment()); + getReceivedBill().setToInstitution(sessionController.getInstitution()); + getReceivedBill().setToDepartment(sessionController.getDepartment()); if (getReceivedBill().getId() == null) { getBillFacade().create(getReceivedBill()); diff --git a/src/main/java/com/divudi/bean/report/PharmacyReportController.java b/src/main/java/com/divudi/bean/report/PharmacyReportController.java index 33da428708..98f48e003a 100644 --- a/src/main/java/com/divudi/bean/report/PharmacyReportController.java +++ b/src/main/java/com/divudi/bean/report/PharmacyReportController.java @@ -99,6 +99,8 @@ import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletResponse; import org.hl7.fhir.r5.model.Bundle; +import java.time.temporal.ChronoUnit; + /** * @@ -2172,7 +2174,7 @@ public void processExpiryItemReport() { m.put("td", toDate); jpql = "select s" - + " from StockHistory s " + + " from Stock s " + " where s.itemBatch.dateOfExpire between :fd and :td "; if (institution != null) { jpql += " and s.institution=:ins "; @@ -2193,10 +2195,21 @@ public void processExpiryItemReport() { m.put("itm", item); } - jpql += " order by s.createdAt "; - stocks = facade.findByJpql(jpql, m, TemporalType.TIMESTAMP); + jpql += " order by s.id "; + stocks = stockFacade.findByJpql(jpql, m, TemporalType.TIMESTAMP); } - + +public long calculateDaysRemaining(Date dateOfExpire) { + if (dateOfExpire == null) { + return 0; // Default behavior for null dates + } + // Convert Date to LocalDate + LocalDate today = LocalDate.now(); + LocalDate expiryDate = dateOfExpire.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + + // Calculate the difference in days + return ChronoUnit.DAYS.between(today, expiryDate); +} public void processLabTestWiseCountReport() { String jpql = "select new com.divudi.data.TestWiseCountReport(" + "bi.item.name, " diff --git a/src/main/java/com/divudi/ejb/PharmacyBean.java b/src/main/java/com/divudi/ejb/PharmacyBean.java index abeb463c56..09807631bc 100644 --- a/src/main/java/com/divudi/ejb/PharmacyBean.java +++ b/src/main/java/com/divudi/ejb/PharmacyBean.java @@ -611,9 +611,9 @@ public List deductFromStock(Item item, double qty, Department depa } public List getStockByQty(Item item, double qty, Department department) { - if (qty <= 0) { - return new ArrayList<>(); - } +// if (qty <= 0) { +// return new ArrayList<>(); +// } String sql = ""; Map m = new HashMap(); diff --git a/src/main/java/com/divudi/ejb/PharmacyCalculation.java b/src/main/java/com/divudi/ejb/PharmacyCalculation.java index a9c2a159c9..98a0e826a3 100644 --- a/src/main/java/com/divudi/ejb/PharmacyCalculation.java +++ b/src/main/java/com/divudi/ejb/PharmacyCalculation.java @@ -162,8 +162,8 @@ public double getTotalQty(BillItem b, BillType billType, Bill bill) { //System.err.println("GETTING TOTAL QTY " + value); return value; } - - public double getTotalQtyWithFreeQty(BillItem b, BillType billType, Bill bill) { + + public double getTotalQtyWithFreeQty(BillItem b, BillType billType, Bill bill) { String sql = "Select sum(p.pharmaceuticalBillItem.qty+p.pharmaceuticalBillItem.freeQty) from BillItem p where" + " type(p.bill)=:class and p.creater is not null and" + " p.referanceBillItem=:bt and p.bill.billType=:btp"; @@ -178,7 +178,7 @@ public double getTotalQtyWithFreeQty(BillItem b, BillType billType, Bill bill) { //System.err.println("GETTING TOTAL QTY " + value); return value; } - + public double getTotalFreeQty(BillItem b, BillType billType, Bill bill) { String sql = "Select sum(p.pharmaceuticalBillItem.freeQty) from BillItem p where" + " type(p.bill)=:class and p.creater is not null and" @@ -209,7 +209,7 @@ public double getTotalQty(BillItem b, BillType billType) { //System.err.println("GETTING TOTAL QTY " + value); return value; } - + public double getTotalFreeQty(BillItem b, BillType billType) { String sql = "Select sum(p.pharmaceuticalBillItem.freeQty) from BillItem p where" + " p.creater is not null and" @@ -240,6 +240,26 @@ public double getBilledIssuedByRequestedItem(BillItem b, BillType billType) { return value; } + public double getBilledIssuedByRequestedItemBatch(BillItem b, BillType billType, ItemBatch batch) { + String sql = "Select sum(p.pharmaceuticalBillItem.qty) from BillItem p where" + + " p.creater is not null and type(p.bill)=:class and " + + " p.referanceBillItem=:bt and p.bill.billType=:btp " + + " and p.pharmaceuticalBillItem.itemBatch = :batch"; + + BillItem bb = new BillItem(); + bb.getPharmaceuticalBillItem().getItemBatch(); + + HashMap hm = new HashMap(); + hm.put("bt", b); + hm.put("batch", batch); + hm.put("class", BilledBill.class); + hm.put("btp", billType); + + double value = getPharmaceuticalBillItemFacade().findDoubleByJpql(sql, hm); + + return value; + } + public double getBilledInwardPharmacyRequest(BillItem b, BillType billType) { String sql = "Select sum(p.pharmaceuticalBillItem.qty) from BillItem p where" + " p.creater is not null and type(p.bill)=:class and " @@ -269,6 +289,23 @@ public double getCancelledIssuedByRequestedItem(BillItem b, BillType billType) { return value; } + + public double getCancelledIssuedByRequestedItemBatch(BillItem b, BillType billType, ItemBatch batch) { + String sql = "Select sum(p.pharmaceuticalBillItem.qty) from BillItem p where" + + " p.creater is not null and type(p.bill)=:class and " + + " p.referanceBillItem.referanceBillItem=:bt and p.bill.billType=:btp " + + " and p.pharmaceuticalBillItem.itemBatch = :batch "; + + HashMap hm = new HashMap(); + hm.put("bt", b); + hm.put("batch", batch); + hm.put("class", CancelledBill.class); + hm.put("btp", billType); + + double value = getPharmaceuticalBillItemFacade().findDoubleByJpql(sql, hm); + + return value; + } public double getCancelledInwardPharmacyRequest(BillItem b, BillType billType) { String sql = "Select sum(p.pharmaceuticalBillItem.qty) " @@ -343,7 +380,7 @@ public double getReturnedTotalQty(BillItem b, BillType billType, Bill bill) { return getPharmaceuticalBillItemFacade().findDoubleByJpql(sql, hm); } - + public double getReturnedTotalQtyWithFreeQty(BillItem b, BillType billType, Bill bill) { String sql = "Select sum(p.pharmaceuticalBillItem.qty+p.pharmaceuticalBillItem.freeQty) from BillItem p where" + " type(p.bill)=:class and p.bill.creater is not null and" @@ -357,7 +394,7 @@ public double getReturnedTotalQtyWithFreeQty(BillItem b, BillType billType, Bill return getPharmaceuticalBillItemFacade().findDoubleByJpql(sql, hm); } - + public double getReturnedTotalFreeQty(BillItem b, BillType billType, Bill bill) { String sql = "Select sum(p.pharmaceuticalBillItem.freeQty) from BillItem p where" + " type(p.bill)=:class and p.bill.creater is not null and" @@ -384,7 +421,7 @@ public double getReturnedTotalQty(BillItem b, BillType billType) { return getPharmaceuticalBillItemFacade().findDoubleByJpql(sql, hm); } - + public double getReturnedTotalFreeQty(BillItem b, BillType billType) { String sql = "Select sum(p.pharmaceuticalBillItem.freeQty) from BillItem p where" + " p.bill.creater is not null and" @@ -417,7 +454,7 @@ public double calQty(PharmaceuticalBillItem po) { return (Math.abs(recieveNet) - Math.abs(retuernedNet)); } - + public double calFreeQty(PharmaceuticalBillItem po) { double billed = getTotalFreeQty(po.getBillItem(), BillType.PharmacyGrnBill, new BilledBill()); @@ -442,27 +479,22 @@ public double calQtyInTwoSql(PharmaceuticalBillItem po) { double grns = getTotalQty(po.getBillItem(), BillType.PharmacyGrnBill); double grnReturn = getReturnedTotalQty(po.getBillItem(), BillType.PharmacyGrnReturn); - double netQty = grns - grnReturn; - return netQty; } - + public double calFreeQtyInTwoSql(PharmaceuticalBillItem po) { double grnsFree = getTotalFreeQty(po.getBillItem(), BillType.PharmacyGrnBill); double grnReturnFree = getReturnedTotalFreeQty(po.getBillItem(), BillType.PharmacyGrnReturn); - double netFreeQty = grnsFree - grnReturnFree; - return netFreeQty; } - public double calQty2(BillItem bil) { double returnBill = getTotalQty(bil, BillType.PharmacySale, new RefundBill()); @@ -558,7 +590,7 @@ public double getRemainingQty(PharmaceuticalBillItem ph) { return remainsFree; } - + public double getRemainingFreeQty(PharmaceuticalBillItem ph) { String sql = "Select p from PharmaceuticalBillItem p where p.billItem.id = " + ph.getBillItem().getReferanceBillItem().getId(); @@ -869,7 +901,7 @@ public void calculateRetailSaleValueAndFreeValueAtPurchaseRate(Bill b) { public boolean checkItemBatch(List list) { for (BillItem i : list) { - if (i.getPharmaceuticalBillItem().getQty() != 0.0 ) { + if (i.getPharmaceuticalBillItem().getQty() != 0.0) { if (i.getPharmaceuticalBillItem().getDoe() == null || i.getPharmaceuticalBillItem().getStringValue().trim().equals("")) { return true; } @@ -878,7 +910,6 @@ public boolean checkItemBatch(List list) { } } - } return false; diff --git a/src/main/java/com/divudi/entity/BillItem.java b/src/main/java/com/divudi/entity/BillItem.java index 51f00b6a42..806fef32b1 100644 --- a/src/main/java/com/divudi/entity/BillItem.java +++ b/src/main/java/com/divudi/entity/BillItem.java @@ -165,6 +165,16 @@ public class BillItem implements Serializable, RetirableEntity { private double previousRecieveQtyInUnit; @Transient private double previousRecieveFreeQtyInUnit; + @Transient + private double issuedPhamaceuticalItemQty; + + public double getIssuedPhamaceuticalItemQty() { + return issuedPhamaceuticalItemQty; + } + + public void setIssuedPhamaceuticalItemQty(double issuedPhamaceuticalItemQty) { + this.issuedPhamaceuticalItemQty = issuedPhamaceuticalItemQty; + } // @Transient // private double totalHospitalFeeValueTransient; @@ -172,7 +182,6 @@ public class BillItem implements Serializable, RetirableEntity { // private double totalDoctorFeeValueTransient; // @Transient // private double totalProcedureFeeValueTransient; - @OneToMany(mappedBy = "billItem", fetch = FetchType.EAGER, cascade = CascadeType.ALL) private List billFees = new ArrayList<>(); @OneToMany(mappedBy = "referenceBillItem", fetch = FetchType.LAZY) @@ -264,7 +273,7 @@ public void copy(BillItem billItem) { vatPlusNetValue = billItem.getVatPlusNetValue(); // referanceBillItem=billItem.getReferanceBillItem(); } - + public void copyWithoutFinancialData(BillItem billItem) { item = billItem.getItem(); sessionDate = billItem.getSessionDate(); @@ -471,7 +480,6 @@ public boolean isRefunded() { // public boolean getRefunded() { // return refunded; // } - public void setRefunded(boolean refunded) { this.refunded = refunded; } @@ -492,34 +500,42 @@ public void setCreatedAt(Date createdAt) { this.createdAt = createdAt; } + @Override public boolean isRetired() { return retired; } + @Override public void setRetired(boolean retired) { this.retired = retired; } + @Override public WebUser getRetirer() { return retirer; } + @Override public void setRetirer(WebUser retirer) { this.retirer = retirer; } + @Override public Date getRetiredAt() { return retiredAt; } + @Override public void setRetiredAt(Date retiredAt) { this.retiredAt = retiredAt; } + @Override public String getRetireComments() { return retireComments; } + @Override public void setRetireComments(String retireComments) { this.retireComments = retireComments; } @@ -632,7 +648,7 @@ public Double getQty() { } return qty; } - + @Transient public double getQtyAbsolute() { return Math.abs(getQty()); @@ -642,8 +658,6 @@ public void setQty(Double Qty) { this.qty = Qty; } - - public double getRemainingQty() { return remainingQty; @@ -990,8 +1004,6 @@ public void setPreviousRecieveFreeQtyInUnit(double previousRecieveFreeQtyInUnit) // } // } // } - - // public double getTotalHospitalFeeValueTransient() { // calculateFeeTotals(); // return totalHospitalFeeValueTransient; @@ -1006,7 +1018,6 @@ public void setPreviousRecieveFreeQtyInUnit(double previousRecieveFreeQtyInUnit) // calculateFeeTotals(); // return totalProcedureFeeValueTransient; // } - public double getOtherFee() { return otherFee; } @@ -1023,7 +1034,6 @@ public void setFeeValue(double feeValue) { this.feeValue = feeValue; } - public PatientInvestigation getPatientInvestigation() { return patientInvestigation; } @@ -1063,7 +1073,5 @@ public Department getPeformedDepartment() { public void setPeformedDepartment(Department peformedDepartment) { this.peformedDepartment = peformedDepartment; } - - } diff --git a/src/main/java/com/divudi/entity/Patient.java b/src/main/java/com/divudi/entity/Patient.java index d8dfa44db5..567907cdb5 100644 --- a/src/main/java/com/divudi/entity/Patient.java +++ b/src/main/java/com/divudi/entity/Patient.java @@ -4,6 +4,7 @@ */ package com.divudi.entity; +import com.divudi.bean.common.RetirableEntity; import com.divudi.java.CommonFunctions; import java.io.Serializable; import java.util.Date; @@ -31,7 +32,7 @@ * @author buddhika */ @Entity -public class Patient implements Serializable { +public class Patient implements Serializable, RetirableEntity { static final long serialVersionUID = 1L; @Id diff --git a/src/main/java/com/divudi/entity/Person.java b/src/main/java/com/divudi/entity/Person.java index ce455f6ed6..8ef4200b01 100644 --- a/src/main/java/com/divudi/entity/Person.java +++ b/src/main/java/com/divudi/entity/Person.java @@ -7,6 +7,7 @@ */ package com.divudi.entity; +import com.divudi.bean.common.RetirableEntity; import com.divudi.data.Sex; import com.divudi.data.Title; import com.divudi.entity.membership.MembershipScheme; @@ -36,7 +37,7 @@ * Consultant (Health Informatics) */ @Entity -public class Person implements Serializable { +public class Person implements Serializable, RetirableEntity { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @@ -328,10 +329,12 @@ public void setSex(Sex sex) { this.sex = sex; } + @Override public String getRetireComments() { return retireComments; } + @Override public void setRetireComments(String retireComments) { this.retireComments = retireComments; } @@ -415,26 +418,32 @@ public void setZoneCode(String zoneCode) { this.zoneCode = zoneCode; } + @Override public boolean isRetired() { return retired; } + @Override public void setRetired(boolean retired) { this.retired = retired; } + @Override public Date getRetiredAt() { return retiredAt; } + @Override public void setRetiredAt(Date retiredAt) { this.retiredAt = retiredAt; } + @Override public WebUser getRetirer() { return retirer; } + @Override public void setRetirer(WebUser retirer) { this.retirer = retirer; } diff --git a/src/main/java/com/divudi/entity/pharmacy/PharmaceuticalBillItem.java b/src/main/java/com/divudi/entity/pharmacy/PharmaceuticalBillItem.java index ec468f56aa..2130c0cc53 100644 --- a/src/main/java/com/divudi/entity/pharmacy/PharmaceuticalBillItem.java +++ b/src/main/java/com/divudi/entity/pharmacy/PharmaceuticalBillItem.java @@ -4,12 +4,10 @@ */ package com.divudi.entity.pharmacy; -import com.divudi.bean.common.RetirableEntity; import com.divudi.bean.common.TimeUtils; import com.divudi.entity.BillItem; import com.divudi.entity.Category; import com.divudi.entity.Institution; -import com.divudi.entity.WebUser; import java.io.Serializable; import java.util.Date; import javax.persistence.Entity; @@ -28,7 +26,7 @@ * @author Buddhika */ @Entity -public class PharmaceuticalBillItem implements Serializable, RetirableEntity { +public class PharmaceuticalBillItem implements Serializable { @OneToOne(mappedBy = "pbItem") private StockHistory stockHistory; @@ -110,19 +108,6 @@ public class PharmaceuticalBillItem implements Serializable, RetirableEntity { private boolean transThisIsStockOut; @Transient private boolean transThisIsStockIn; - - private boolean retired; - - @ManyToOne - private WebUser retirer; - - @ManyToOne - private WebUser currentHolder; - - @Temporal(javax.persistence.TemporalType.TIMESTAMP) - private Date retiredAt; - - private String retireComments; public String getSerialNo() { return serialNo; @@ -699,46 +684,6 @@ public double getRetailPackValue() { public void setRetailPackValue(double retailPackValue) { this.retailPackValue = retailPackValue; } - - public boolean isRetired() { - return retired; - } - - public void setRetired(boolean retired) { - this.retired = retired; - } - - public WebUser getRetirer() { - return retirer; - } - - public void setRetirer(WebUser retirer) { - this.retirer = retirer; - } - - public WebUser getCurrentHolder() { - return currentHolder; - } - - public void setCurrentHolder(WebUser currentHolder) { - this.currentHolder = currentHolder; - } - - public Date getRetiredAt() { - return retiredAt; - } - - public void setRetiredAt(Date retiredAt) { - this.retiredAt = retiredAt; - } - - public String getRetireComments() { - return retireComments; - } - - public void setRetireComments(String retireComments) { - this.retireComments = retireComments; - } diff --git a/src/main/java/com/divudi/ws/channel/ChannelApi.java b/src/main/java/com/divudi/ws/channel/ChannelApi.java index 84b999e89d..30e11754e8 100644 --- a/src/main/java/com/divudi/ws/channel/ChannelApi.java +++ b/src/main/java/com/divudi/ws/channel/ChannelApi.java @@ -1086,6 +1086,11 @@ public Response createBooking(@Context HttpServletRequest requestContext, Map billList = channelService.findBillFromRefNo(clientsReferanceNo, creditCompany, BillClassType.BilledBill); System.out.println(billList.size()); diff --git a/src/main/resources/META-INF/persistence_for_production.xml b/src/main/resources/META-INF/persistence_for_production.xml index 672eeeee9c..e1279e8abb 100644 --- a/src/main/resources/META-INF/persistence_for_production.xml +++ b/src/main/resources/META-INF/persistence_for_production.xml @@ -1,22 +1,24 @@ - + org.eclipse.persistence.jpa.PersistenceProvider - jdbc/ruhunu + ${JDBC_DATASOURCE} false - - - + + + + + - jdbc/ruhunuAudit + ${JDBC_AUDIT_DATASOURCE} false - - + + diff --git a/src/main/resources/META-INF/persistence_pro.xml b/src/main/resources/META-INF/persistence_pro.xml new file mode 100644 index 0000000000..d0db19cf78 --- /dev/null +++ b/src/main/resources/META-INF/persistence_pro.xml @@ -0,0 +1,25 @@ + + + + org.eclipse.persistence.jpa.PersistenceProvider + ${JDBC_DATASOURCE} + false + + + + + + + + + + + ${JDBC_AUDIT_DATASOURCE} + false + + + + + + + diff --git a/src/main/webapp/WEB-INF/glassfish-web.xml b/src/main/webapp/WEB-INF/glassfish-web.xml index 8947aba09c..157dde8610 100644 --- a/src/main/webapp/WEB-INF/glassfish-web.xml +++ b/src/main/webapp/WEB-INF/glassfish-web.xml @@ -1,7 +1,7 @@ - /coop + /rh diff --git a/src/main/webapp/inward/pharmacy_bill_issue_bht.xhtml b/src/main/webapp/inward/pharmacy_bill_issue_bht.xhtml index 131c8b1360..8e78a97a51 100644 --- a/src/main/webapp/inward/pharmacy_bill_issue_bht.xhtml +++ b/src/main/webapp/inward/pharmacy_bill_issue_bht.xhtml @@ -159,9 +159,9 @@ > -   +   @@ -226,9 +226,9 @@ -   +   @@ -372,35 +372,8 @@ - - - - - -
- - - -
+
@@ -411,16 +384,16 @@
- + - +
- +
@@ -429,6 +402,10 @@
+ + + + diff --git a/src/main/webapp/pharmacy/pharmacy_bill_retail_sale_1.xhtml b/src/main/webapp/pharmacy/pharmacy_bill_retail_sale_1.xhtml index 748e7ab0a7..697e219326 100644 --- a/src/main/webapp/pharmacy/pharmacy_bill_retail_sale_1.xhtml +++ b/src/main/webapp/pharmacy/pharmacy_bill_retail_sale_1.xhtml @@ -672,62 +672,36 @@ - - +
- - - - +

- - - - +
- -
- - - -
-
- -
- - - -
+ + - -
- - - -
+ + + + + + + + +
- - - - - diff --git a/src/main/webapp/pharmacy/pharmacy_bill_retail_sale_2.xhtml b/src/main/webapp/pharmacy/pharmacy_bill_retail_sale_2.xhtml index b83bf791a2..8c6313fbb4 100644 --- a/src/main/webapp/pharmacy/pharmacy_bill_retail_sale_2.xhtml +++ b/src/main/webapp/pharmacy/pharmacy_bill_retail_sale_2.xhtml @@ -620,10 +620,6 @@ - - - - @@ -683,62 +679,35 @@ - - +
- - - - +

- - - - +
- -
- - - -
-
- -
- - - -
+ + - -
- - - -
-
+ + + + + + + + +
- - - - - diff --git a/src/main/webapp/pharmacy/pharmacy_bill_retail_sale_3.xhtml b/src/main/webapp/pharmacy/pharmacy_bill_retail_sale_3.xhtml index 4f47f85453..2dca0457cd 100644 --- a/src/main/webapp/pharmacy/pharmacy_bill_retail_sale_3.xhtml +++ b/src/main/webapp/pharmacy/pharmacy_bill_retail_sale_3.xhtml @@ -669,58 +669,35 @@ - - +
- - - - +

- - - - +
- -
- - - -
-
- -
- - - -
+ + - -
- - - -
+ + + + + + + + +
- - diff --git a/src/main/webapp/pharmacy/pharmacy_reprint_bill_sale.xhtml b/src/main/webapp/pharmacy/pharmacy_reprint_bill_sale.xhtml index b3233a99b8..0b16ec7821 100644 --- a/src/main/webapp/pharmacy/pharmacy_reprint_bill_sale.xhtml +++ b/src/main/webapp/pharmacy/pharmacy_reprint_bill_sale.xhtml @@ -85,7 +85,10 @@ - +
+ + +
diff --git a/src/main/webapp/pharmacy/pharmacy_search_pre_bill_for_return_item_and_cash.xhtml b/src/main/webapp/pharmacy/pharmacy_search_pre_bill_for_return_item_and_cash.xhtml index 2c96160c47..f7442c0f88 100644 --- a/src/main/webapp/pharmacy/pharmacy_search_pre_bill_for_return_item_and_cash.xhtml +++ b/src/main/webapp/pharmacy/pharmacy_search_pre_bill_for_return_item_and_cash.xhtml @@ -125,7 +125,7 @@ ajax="false" class="mx-2" value="Return Item and Cash" - action="pharmacy_bill_return_retail" + action="pharmacy_bill_return_retail?faces-redirect=true" disabled="#{bill.cancelled eq true}"> diff --git a/src/main/webapp/pharmacy/pharmacy_search_pre_bill_for_return_item_only.xhtml b/src/main/webapp/pharmacy/pharmacy_search_pre_bill_for_return_item_only.xhtml index 2676c25444..22bbb05d7a 100644 --- a/src/main/webapp/pharmacy/pharmacy_search_pre_bill_for_return_item_only.xhtml +++ b/src/main/webapp/pharmacy/pharmacy_search_pre_bill_for_return_item_only.xhtml @@ -108,7 +108,7 @@ diff --git a/src/main/webapp/pharmacy/pharmacy_transfer_issue.xhtml b/src/main/webapp/pharmacy/pharmacy_transfer_issue.xhtml index e0950385e4..277b511f8d 100644 --- a/src/main/webapp/pharmacy/pharmacy_transfer_issue.xhtml +++ b/src/main/webapp/pharmacy/pharmacy_transfer_issue.xhtml @@ -45,8 +45,12 @@
+ + + + - + diff --git a/src/main/webapp/reports/financialReports/discount.xhtml b/src/main/webapp/reports/financialReports/discount.xhtml index ddf8ebaf30..564112da16 100644 --- a/src/main/webapp/reports/financialReports/discount.xhtml +++ b/src/main/webapp/reports/financialReports/discount.xhtml @@ -347,7 +347,7 @@ - + @@ -417,7 +417,7 @@ - + + value="#{bill.netTotal - bill.settledAmountBySponsor - bill.settledAmountByPatient}"> @@ -576,9 +576,6 @@ - - - @@ -611,7 +608,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/reports/inventoryReports/expiry_item.xhtml b/src/main/webapp/reports/inventoryReports/expiry_item.xhtml index 6bbaa8f38b..0ab770f3f3 100644 --- a/src/main/webapp/reports/inventoryReports/expiry_item.xhtml +++ b/src/main/webapp/reports/inventoryReports/expiry_item.xhtml @@ -224,7 +224,12 @@
- + @@ -239,7 +244,8 @@
Expiry Item Report
- - + - + - + - + - + - + - + - + - + - + - + - + - - + + - + - + - + @@ -323,6 +331,7 @@ +
@@ -334,4 +343,5 @@ + diff --git a/src/main/webapp/reports/inventoryReports/grn_report.xhtml b/src/main/webapp/reports/inventoryReports/grn_report.xhtml index 4d33069b18..26243bdf7a 100644 --- a/src/main/webapp/reports/inventoryReports/grn_report.xhtml +++ b/src/main/webapp/reports/inventoryReports/grn_report.xhtml @@ -147,7 +147,7 @@ icon="fas fa-cogs" ajax="false" value="Process" - action="#{pharmacyController.generateGRNReportTable()}"> + action="#{pharmacyController.generateGrnReportTable()}"> diff --git a/src/main/webapp/reports/inventoryReports/stock_transfer_report.xhtml b/src/main/webapp/reports/inventoryReports/stock_transfer_report.xhtml index 5e69e6679b..1d13073e4e 100644 --- a/src/main/webapp/reports/inventoryReports/stock_transfer_report.xhtml +++ b/src/main/webapp/reports/inventoryReports/stock_transfer_report.xhtml @@ -336,6 +336,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/resources/css/inward_direct_issue_bill_five_five_custom_3.css b/src/main/webapp/resources/css/inward_direct_issue_bill_five_five_custom_3.css new file mode 100644 index 0000000000..26b6e03e71 --- /dev/null +++ b/src/main/webapp/resources/css/inward_direct_issue_bill_five_five_custom_3.css @@ -0,0 +1,167 @@ +/* General Container */ +.receipt-container { + font-family: "Courier New", "Liberation Mono", monospace; + font-size: 12px; + line-height: 1.2; + width: 11cm; + height: 14cm; + margin: auto; + padding: 2px; + box-sizing: border-box; + border: 1px solid #000; +} + +/* Header */ +.hospital-name { + font-family: sans-serif !important; + text-align: center!important; + font-weight: normal!important; + font-size: 16px!important; /* Larger font for hospital name */ + text-transform: uppercase!important; +} + +.hospital-details { + text-align: center; + font-size: 12px; + font-family: sans-serif !important; + line-height: 1.2; +} + +/* Line Separator */ +.separator { + border-top: 1px solid #000; + margin: 2px 0; +} + +/* Patient and Bill Info Table */ +.info-table { + width: 100%; + border-collapse: collapse; + margin-bottom: 2px; +} + +.info-table td { + font-size: 12px; + padding: 5px; +} + +.info-table .label { + font-weight: normal!important; + text-align: left; +} + +.info-table .value { + text-align: left; +} + +.info-table .spacer { + width: 10px; /* Adds space between the two columns */ +} + +/* Item Table */ +.receipt-table { + width: 100%; + border-collapse: collapse; + font-size: 12px; + margin-bottom: 2px; +} + +.receipt-table th, +.receipt-table td { + text-align: left; + padding: 2px; + font-family: sans-serif !important; + line-height: 1.2; + /* border-bottom: 1px solid #000;*/ +} + +.receipt-table th { + font-weight: normal!important; + text-transform: uppercase; + font-family: sans-serif !important; + line-height: 1.2; +} + +/* Total Section Table */ +.total-table { + width: 100%; + border-collapse: collapse; + margin-top: 2px; + font-size: 15px; + font-family: sans-serif !important; + line-height: 1.2; +} + +.total-table td { + padding: 2px; + font-family: sans-serif !important; + line-height: 1.2; +} + +.total-table .label { + font-weight: normal!important; + text-align: left; + font-family: sans-serif !important; + line-height: 1.2; +} + +.total-table .value { + text-align: right; + font-weight: normal!important; + font-family: sans-serif !important; + line-height: 1.2; +} + +/* Footer */ +.receipt-footer { + text-align: center; + font-size: 12px; + margin-top: 20px; + font-style: italic; + font-family: sans-serif !important; + line-height: 1.2; +} + +/* Print Styles */ +@media print { + .receipt-container { + border: none; + width: 10cm!important; + height: 9.5cm!important; + margin-left: 0cm!important; + margin-right: 2.5cm!important; + margin-bottom: 1.0cm!important; + margin-top: 2.5cm!important; + font-family: sans-serif !important; + padding-left: 0.25cm; + /* font-family: sans-serif !important; + border: none; + width: 11cm!important; + height: 14cm!important; + margin-left: 0cm!important; + margin-right: 1.5cm!important; + margin-top: 1cm!important; + margin-bottom: 0cm!important; + padding: 2px!important; + line-height: 1.2!important;*/ + } + + .hospital-name { + font-size: 12px; + font-family: sans-serif !important; + line-height: 1.2; + } + + .receipt-table th, + .receipt-table td { + padding: 2px; + font-family: sans-serif !important; + line-height: 1.2; + } + + .separator { + margin: 2px; + font-family: sans-serif !important; + line-height: 1.2; + } +} diff --git a/src/main/webapp/resources/css/pharmacypos.css b/src/main/webapp/resources/css/pharmacypos.css index 026da17d95..1f8af9695b 100644 --- a/src/main/webapp/resources/css/pharmacypos.css +++ b/src/main/webapp/resources/css/pharmacypos.css @@ -133,7 +133,7 @@ position: sticky; top:11.5cm!important; width: 90%; - font-size: 12px; + font-size: 11px!important; color: black; } diff --git a/src/main/webapp/resources/css/sale_bill_five_five_custom_3.css b/src/main/webapp/resources/css/sale_bill_five_five_custom_3.css index 83092fe0a5..26b6e03e71 100644 --- a/src/main/webapp/resources/css/sale_bill_five_five_custom_3.css +++ b/src/main/webapp/resources/css/sale_bill_five_five_custom_3.css @@ -2,39 +2,42 @@ .receipt-container { font-family: "Courier New", "Liberation Mono", monospace; font-size: 12px; - line-height: 1.4; - width: 12cm; + line-height: 1.2; + width: 11cm; height: 14cm; margin: auto; - padding: 10px; + padding: 2px; box-sizing: border-box; border: 1px solid #000; } /* Header */ .hospital-name { - text-align: center; - font-weight: bold; - font-size: 16px; /* Larger font for hospital name */ - text-transform: uppercase; + font-family: sans-serif !important; + text-align: center!important; + font-weight: normal!important; + font-size: 16px!important; /* Larger font for hospital name */ + text-transform: uppercase!important; } .hospital-details { text-align: center; - font-size: 12px; /* Smaller font for address, phone, and email */ + font-size: 12px; + font-family: sans-serif !important; + line-height: 1.2; } /* Line Separator */ .separator { border-top: 1px solid #000; - margin: 10px 0; + margin: 2px 0; } /* Patient and Bill Info Table */ .info-table { width: 100%; border-collapse: collapse; - margin-bottom: 10px; + margin-bottom: 2px; } .info-table td { @@ -43,7 +46,7 @@ } .info-table .label { - font-weight: bold; + font-weight: normal!important; text-align: left; } @@ -60,41 +63,53 @@ width: 100%; border-collapse: collapse; font-size: 12px; - margin-bottom: 10px; + margin-bottom: 2px; } .receipt-table th, .receipt-table td { text-align: left; - padding: 5px; - border-bottom: 1px solid #000; + padding: 2px; + font-family: sans-serif !important; + line-height: 1.2; + /* border-bottom: 1px solid #000;*/ } .receipt-table th { - font-weight: bold; + font-weight: normal!important; text-transform: uppercase; + font-family: sans-serif !important; + line-height: 1.2; } /* Total Section Table */ .total-table { width: 100%; border-collapse: collapse; - margin-top: 10px; - font-size: 12px; + margin-top: 2px; + font-size: 15px; + font-family: sans-serif !important; + line-height: 1.2; } .total-table td { - padding: 5px; + padding: 2px; + font-family: sans-serif !important; + line-height: 1.2; } .total-table .label { - font-weight: bold; + font-weight: normal!important; text-align: left; + font-family: sans-serif !important; + line-height: 1.2; } .total-table .value { text-align: right; - font-weight: bold; + font-weight: normal!important; + font-family: sans-serif !important; + line-height: 1.2; } /* Footer */ @@ -103,26 +118,50 @@ font-size: 12px; margin-top: 20px; font-style: italic; + font-family: sans-serif !important; + line-height: 1.2; } /* Print Styles */ @media print { .receipt-container { border: none; - width: 12cm; - height: 14cm; + width: 10cm!important; + height: 9.5cm!important; + margin-left: 0cm!important; + margin-right: 2.5cm!important; + margin-bottom: 1.0cm!important; + margin-top: 2.5cm!important; + font-family: sans-serif !important; + padding-left: 0.25cm; + /* font-family: sans-serif !important; + border: none; + width: 11cm!important; + height: 14cm!important; + margin-left: 0cm!important; + margin-right: 1.5cm!important; + margin-top: 1cm!important; + margin-bottom: 0cm!important; + padding: 2px!important; + line-height: 1.2!important;*/ } .hospital-name { - font-size: 14px; + font-size: 12px; + font-family: sans-serif !important; + line-height: 1.2; } .receipt-table th, .receipt-table td { - border-bottom: 1px solid #000; + padding: 2px; + font-family: sans-serif !important; + line-height: 1.2; } .separator { - margin: 5px 0; + margin: 2px; + font-family: sans-serif !important; + line-height: 1.2; } } diff --git a/src/main/webapp/resources/pharmacy/inward_direct_issue_bill_five_five_custom_3.xhtml b/src/main/webapp/resources/pharmacy/inward_direct_issue_bill_five_five_custom_3.xhtml new file mode 100644 index 0000000000..20c4c4ba48 --- /dev/null +++ b/src/main/webapp/resources/pharmacy/inward_direct_issue_bill_five_five_custom_3.xhtml @@ -0,0 +1,217 @@ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Patient Name: + + Patient Age/Sex: + +
BHT: + + Room No: + +
Bill Date: + + + + Bill Time: + + + +
Bill No:#{cc.attrs.bill.deptId}Department:Pharmacy
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
NoItem NameRateQtyValue
#{s.index +1} #{item.item.name} + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
Total: + + + +
Discount: + + + +
Net Total: + + + +
No of Items: + + + +
+ + + + + + + +
+ + +
+
+ + +
+
+
+ +
+ + + + + + + + +
+ + + +
+ + + +
+ +
+ \ No newline at end of file diff --git a/src/main/webapp/resources/pharmacy/sale_bill_five_five_custom_3.xhtml b/src/main/webapp/resources/pharmacy/sale_bill_five_five_custom_3.xhtml index 5d275895da..b4d4679c98 100644 --- a/src/main/webapp/resources/pharmacy/sale_bill_five_five_custom_3.xhtml +++ b/src/main/webapp/resources/pharmacy/sale_bill_five_five_custom_3.xhtml @@ -7,123 +7,107 @@ xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:p="http://primefaces.org/ui"> - - - - - - - - - - - - - -
-
- - - -
- -
- -
-
- -
-
- -
-
- - -
+ + + + + + + + + + + + + + + + + + +
+ +
+ + +
-
-
- -
-
- -
-
- - - - - - -
-
+ +
- -
-
- -
-
- -
-
- -
-
-
- - -
-
- -
-
- -
-
- -
-
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Patient Name: + + Patient Age/Sex: + +
Bill Date: + + + + Bill Time: + + + +
Bill No:#{cc.attrs.bill.deptId}Department:Pharmacy
+ +
-
- - - - - - - - - + +
+ - - - - - + + + + + - - - - - - + + + + + + - - @@ -131,162 +115,90 @@
NOPARTICULARQTYRATEAMOUNTNoItem NameRateQtyValue
#{status.index + 1}#{bip.item.name} - - +
#{s.index +1} #{item.item.name} + + - - + + + - + +
-
- -
-
-
- -
-
- - - - - - - - - - - - -
- - - - - -
- -
- -
-
-
- - - -
- - - -
-
-
-
- - -
- + +
+ + +
+ + + + + + - - - + - - - - - - - - - - - - + -
Total: + + + +
- - - - - + Discount: +
- - - - - - - -
- - - - + Net Total:
-
-
+ - + +
+
+ + + + + + + + + + + + + + + + + + + +
- - - - - - -
- - - - - -
+ -
- + \ No newline at end of file