417 lines
9.1 KiB
PHP
417 lines
9.1 KiB
PHP
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<title><?php echo myLang($this->config->item("ProjectTitle")); ?> >> <?php echo isset($pageTitle) ? $pageTitle : " | Dashboard"; ?></title>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
<!-- Google Font: Source Sans Pro -->
|
|
|
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
|
|
|
|
<!-- Font Awesome Icons -->
|
|
|
|
<link rel="stylesheet" href="<?php echo base_url(); ?>plugins/fontawesome-free/css/all.min.css">
|
|
|
|
|
|
|
|
<script src="<?php echo base_url(); ?>plugins/jquery/jquery.min.js"></script>
|
|
<!-- Bootstrap 4 -->
|
|
|
|
<script src="<?php echo base_url(); ?>plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
|
|
<script src="<?php echo base_url(); ?>plugins/bootstrap/js/moment.js"></script>
|
|
|
|
<!-- DataTables -->
|
|
<link rel="stylesheet" href="<?php echo base_url(); ?>plugins/datatables-bs4/css/dataTables.bootstrap4.min.css">
|
|
<link rel="stylesheet" href="<?php echo base_url(); ?>plugins/datatables-responsive/css/responsive.bootstrap4.min.css">
|
|
<link rel="stylesheet" href="<?php echo base_url(); ?>plugins/datatables-buttons/css/buttons.bootstrap4.min.css">
|
|
<!-- Theme style -->
|
|
|
|
<link rel="stylesheet" href="<?php echo base_url(); ?>dist/css/adminlte.min.css">
|
|
<link rel="stylesheet" href="<?php echo base_url(); ?>plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css">
|
|
<link rel="stylesheet" href="<?php echo base_url(); ?>plugins/nepalidatepicker/nepaliDatePicker.min.css">
|
|
<link rel="stylesheet" href="<?php echo base_url(); ?>plugins/select2/css/select2.min.css">
|
|
<link rel="stylesheet" href="<?php echo base_url(); ?>plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css">
|
|
<link rel="stylesheet" href="<?php echo base_url(); ?>plugins/bstreeview/css/bstreeview.min.css">
|
|
<link rel="stylesheet" href="<?php echo base_url(); ?>dist/css/bbnepalcustom.css">
|
|
|
|
<!-- CSV File create -->
|
|
<script>
|
|
// function exportTableToCSVNew(filename) {
|
|
// const csvRows = [];
|
|
// const rows = document.querySelectorAll("#dataTable tr");
|
|
|
|
// for (const row of rows) {
|
|
// const cols = row.querySelectorAll("td, th");
|
|
// const csvRow = [];
|
|
|
|
// for (const col of cols) {
|
|
// // csvRow.push(col.innerText.replace(/,/g, '')); // Remove commas for CSV
|
|
// csvRow.push(col.innerText); // Include empty cells as ''
|
|
|
|
// }
|
|
// csvRows.push(csvRow.join(",")); // Join cells with commas
|
|
// }
|
|
|
|
// // Create a CSV string
|
|
// const csvString = csvRows.join("\n");
|
|
|
|
// // Create a Blob for the CSV string
|
|
// const blob = new Blob([csvString], {
|
|
// type: "text/csv"
|
|
// });
|
|
// const url = URL.createObjectURL(blob);
|
|
// const a = document.createElement("a");
|
|
// a.href = url;
|
|
// a.download = filename;
|
|
// document.body.appendChild(a);
|
|
// a.click();
|
|
// document.body.removeChild(a);
|
|
// }
|
|
|
|
function exportTableToCSV(filename) {
|
|
const csvRows = [];
|
|
const rows = document.querySelectorAll("#dataTable tr");
|
|
let rowSpanTracker = {};
|
|
|
|
for (const row of rows) {
|
|
const cols = row.querySelectorAll("td, th");
|
|
const csvRow = [];
|
|
let currentRow = [];
|
|
|
|
for (const col of cols) {
|
|
const colSpan = parseInt(col.getAttribute('colspan') || 1);
|
|
const rowSpan = parseInt(col.getAttribute('rowspan') || 1);
|
|
const cellValue = col.innerText.replace(/,/g, '').trim() || '';
|
|
|
|
// Handle row span by marking the cells
|
|
if (rowSpan > 1) {
|
|
for (let r = 0; r < rowSpan; r++) {
|
|
if (!rowSpanTracker[r]) rowSpanTracker[r] = {};
|
|
rowSpanTracker[r][currentRow.length] = true; // Mark this position for rowspan
|
|
}
|
|
}
|
|
|
|
// Fill CSV row with values
|
|
for (let i = 0; i < colSpan; i++) {
|
|
if (i === 0 && !rowSpanTracker[currentRow.length]?.[currentRow.length]) {
|
|
csvRow.push(cellValue); // First instance of the cell value
|
|
} else {
|
|
csvRow.push(''); // Other instances as empty
|
|
}
|
|
}
|
|
}
|
|
|
|
// Fill the empty spaces due to rowspan
|
|
if (rowSpanTracker[currentRow.length]) {
|
|
currentRow.forEach((_, index) => {
|
|
if (!rowSpanTracker[currentRow.length]?.[index]) {
|
|
csvRow[index] = ''; // Fill in empty spaces
|
|
}
|
|
});
|
|
}
|
|
|
|
csvRows.push(csvRow.join(",")); // Join cells with commas
|
|
}
|
|
|
|
// Create a CSV string
|
|
const csvString = csvRows.join("\n");
|
|
|
|
// Create a Blob for the CSV string
|
|
const blob = new Blob([csvString], {
|
|
type: "text/csv"
|
|
});
|
|
const url = URL.createObjectURL(blob);
|
|
const a = document.createElement("a");
|
|
a.href = url;
|
|
a.download = filename;
|
|
document.body.appendChild(a);
|
|
a.click();
|
|
document.body.removeChild(a);
|
|
}
|
|
</script>
|
|
<!-- csv printing ends -->
|
|
|
|
|
|
<!-- Override Defaults By Prajwal -->
|
|
<style>
|
|
body {
|
|
font-size: 13px !important;
|
|
}
|
|
|
|
html {
|
|
font-family: Roboto;
|
|
font-size: 15px;
|
|
}
|
|
|
|
.select2-container .select2-selection--single {
|
|
|
|
height: 38px;
|
|
|
|
}
|
|
|
|
.select2-container--default .select2-selection--single .select2-selection__arrow b {
|
|
|
|
margin-top: 3px;
|
|
}
|
|
|
|
.select2-container {
|
|
width: 100% !important;
|
|
}
|
|
|
|
.full-width {
|
|
width: 100%;
|
|
}
|
|
|
|
.hidden {
|
|
display: none;
|
|
}
|
|
|
|
.bold-text {
|
|
font-weight: bolder;
|
|
}
|
|
|
|
.table td,
|
|
.table th {
|
|
padding: 0.25rem;
|
|
}
|
|
|
|
fieldset {
|
|
border: 1px solid #ced4da;
|
|
-moz-border-radius: 8px;
|
|
-webkit-border-radius: 8px;
|
|
border-radius: 5px;
|
|
padding: 0px 15px 10px;
|
|
}
|
|
|
|
legend {
|
|
width: auto;
|
|
margin: 0px;
|
|
padding: 0px 10px;
|
|
font-size: 13px;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.currency {
|
|
width: 100%;
|
|
display: block;
|
|
text-align: right;
|
|
font-weight: bold;
|
|
}
|
|
|
|
span.underline-text {
|
|
width: 100%;
|
|
display: block;
|
|
border-bottom: 1px solid;
|
|
}
|
|
|
|
span.node-counts {
|
|
float: right;
|
|
}
|
|
|
|
.lp-30 {
|
|
padding-left: 30px;
|
|
}
|
|
|
|
.lp-60 {
|
|
padding-left: 60px;
|
|
}
|
|
|
|
.text-right {
|
|
text-align: right;
|
|
}
|
|
|
|
span.table-cell {
|
|
display: block;
|
|
width: 100%;
|
|
}
|
|
|
|
.table-group-heading {
|
|
/* background-color: #cdcdcd !important; */
|
|
color: #000 !important;
|
|
}
|
|
|
|
.table-group-total {
|
|
/* background-color: #cdcdcd !important; */
|
|
color: #000 !important;
|
|
}
|
|
|
|
.table-category-heading {
|
|
/* background-color: #dfdfdf !important; */
|
|
color: #000 !important;
|
|
}
|
|
|
|
.table-category-total {
|
|
/* background-color: #dfdfdf !important; */
|
|
color: #000 !important;
|
|
}
|
|
|
|
.mb-20 {
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.mt-30 {
|
|
margin-top: 30px;
|
|
}
|
|
|
|
.mt-100 {
|
|
margin-top: 100px;
|
|
}
|
|
|
|
@media screen {
|
|
div.divFooter {
|
|
display: none;
|
|
}
|
|
|
|
td.col-1 {
|
|
width: 100px;
|
|
}
|
|
}
|
|
|
|
@media print {
|
|
div.divFooter {
|
|
position: fixed;
|
|
bottom: 0;
|
|
}
|
|
|
|
.col-print-1 {
|
|
width: 8%;
|
|
float: left;
|
|
}
|
|
|
|
.col-print-2 {
|
|
width: 16%;
|
|
float: left;
|
|
}
|
|
|
|
.col-print-3 {
|
|
width: 25%;
|
|
float: left;
|
|
}
|
|
|
|
.col-print-4 {
|
|
width: 33%;
|
|
float: left;
|
|
}
|
|
|
|
.col-print-5 {
|
|
width: 42%;
|
|
float: left;
|
|
}
|
|
|
|
.col-print-6 {
|
|
width: 50%;
|
|
float: left;
|
|
}
|
|
|
|
.col-print-7 {
|
|
width: 58%;
|
|
float: left;
|
|
}
|
|
|
|
.col-print-8 {
|
|
width: 66%;
|
|
float: left;
|
|
}
|
|
|
|
.col-print-9 {
|
|
width: 75%;
|
|
float: left;
|
|
}
|
|
|
|
.col-print-10 {
|
|
width: 83%;
|
|
float: left;
|
|
}
|
|
|
|
.col-print-11 {
|
|
width: 92%;
|
|
float: left;
|
|
}
|
|
|
|
.col-print-12 {
|
|
width: 100%;
|
|
float: left;
|
|
}
|
|
|
|
.col-1 {
|
|
width: 8%;
|
|
float: left;
|
|
}
|
|
|
|
.col-2 {
|
|
width: 16%;
|
|
float: left;
|
|
}
|
|
|
|
.col-3 {
|
|
width: 25%;
|
|
float: left;
|
|
}
|
|
|
|
.col-4 {
|
|
width: 33%;
|
|
float: left;
|
|
}
|
|
|
|
.col-5 {
|
|
width: 42%;
|
|
float: left;
|
|
}
|
|
|
|
.col-6 {
|
|
width: 50%;
|
|
float: left;
|
|
}
|
|
|
|
.col-7 {
|
|
width: 58%;
|
|
float: left;
|
|
}
|
|
|
|
.col-8 {
|
|
width: 66%;
|
|
float: left;
|
|
}
|
|
|
|
.col-9 {
|
|
width: 75%;
|
|
float: left;
|
|
}
|
|
|
|
.col-10 {
|
|
width: 83%;
|
|
float: left;
|
|
}
|
|
|
|
.col-11 {
|
|
width: 92%;
|
|
float: left;
|
|
}
|
|
|
|
.col-12 {
|
|
width: 100%;
|
|
float: left;
|
|
}
|
|
|
|
}
|
|
|
|
.narration_display {
|
|
font-style: italic;
|
|
}
|
|
|
|
.text-bold .currency {
|
|
font-weight: 600 !important;
|
|
}
|
|
</style>
|
|
<!-- End Override Defaults By Prajwal -->
|
|
</head>
|
|
|
|
<body class="hold-transition sidebar-mini layout-footer-fixed">
|
|
|
|
<div class="wrapper">
|