218 lines
5.8 KiB
PHP
Executable File
218 lines
5.8 KiB
PHP
Executable File
<!-- Report_consolidate_m -->
|
|
|
|
<script>
|
|
$(document).ready(function() {
|
|
|
|
$("#client_name").select2();
|
|
$("#item_name").select2();
|
|
$("#purchaseorder_number").select2();
|
|
|
|
|
|
});
|
|
</script>
|
|
|
|
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
|
|
<style>
|
|
table {
|
|
width: auto;
|
|
}
|
|
|
|
.dataTables_filter input {
|
|
padding: 4px;
|
|
}
|
|
|
|
.dataTables_filter {
|
|
/* width: 50%; */
|
|
float: right;
|
|
text-align: right;
|
|
}
|
|
|
|
.dataTables_paginate {
|
|
width: 50%;
|
|
float: right;
|
|
text-align: right;
|
|
}
|
|
|
|
div.dt-buttons {
|
|
position: relative;
|
|
/* float: right; */
|
|
|
|
}
|
|
</style>
|
|
|
|
<div class="content-page">
|
|
<div class="content">
|
|
<!-- Start Content-->
|
|
<div class="container-fluid">
|
|
<!-- start page title -->
|
|
<div>
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="page-title-box page-title-box-alt">
|
|
<div class="page-title-right">
|
|
<ol class="breadcrumb m-0">
|
|
<li class="breadcrumb-item"><a href="javascript: void(0);">Reports</a></li>
|
|
<li class="breadcrumb-item"><a href="javascript: void(0);">Purchase</a></li>
|
|
<li class="breadcrumb-item active">
|
|
<h4 class="page-title"><b> Report - Purchase Consolidate <?php echo isset($month) ? $month : ''; ?> </b></h4>
|
|
</li>
|
|
</ol>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="card">
|
|
<!-- <form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;"> -->
|
|
|
|
<div class="card-body">
|
|
|
|
<table id="cc" class="table table-bordered table-hover wrap" style="background-color:#fff;width: 100% !important;">
|
|
<thead>
|
|
<tr>
|
|
<th style="text-align:center" rowspan="2">Supplier Name</th>
|
|
<th style="text-align:center" rowspan="2">Material Name</th>
|
|
<th style="text-align:center" colspan="2"><?php echo date('M-Y'); ?></th>
|
|
</tr>
|
|
<tr>
|
|
<th style="text-align:center">Quantity</th>
|
|
<th style="text-align:center">Value (₹)</th>
|
|
|
|
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
|
|
if (!empty($spurchse)) {
|
|
$tqt = 0;
|
|
$tvt = 0;
|
|
$ab = $financialyear;
|
|
$m = $month;
|
|
//echo $month;
|
|
$month = date('F');
|
|
//echo $month;
|
|
foreach ($spurchse as $rel) {
|
|
?>
|
|
<tr>
|
|
|
|
<td><span>
|
|
<a href="<?= base_url() ?>report/link_purchase?ab=<?php echo $ab; ?>&sid=<?php echo $rel->sid; ?>&mid=<?php echo $rel->mid; ?>&month=<?php echo $m; ?>"><?php echo $rel->supplier_name; ?> </a>
|
|
</span></td>
|
|
<td><span><?php echo $rel->material_name; ?></span></td>
|
|
<td style="text-align:right"><span><?php
|
|
$tqt = $tqt + round($rel->quantity);
|
|
echo round($rel->quantity); ?></span></td>
|
|
<td style="text-align:right"><span><?php
|
|
$tvt = $tvt + number_format($rel->total, 2, '.', '');
|
|
echo number_format($rel->total, 2, '.', ''); ?></span></td>
|
|
|
|
|
|
</tr>
|
|
<?php
|
|
}
|
|
|
|
?>
|
|
</tbody>
|
|
<tfoot width="100%">
|
|
<tr>
|
|
<td style="text-align:center;"><strong>Total</strong></td>
|
|
|
|
|
|
<td style="text-align:right"><strong>
|
|
<?php {
|
|
echo '';
|
|
}
|
|
?>
|
|
</strong>
|
|
</td>
|
|
<td style="text-align:right">
|
|
<strong>
|
|
<?php {
|
|
echo $tqt;
|
|
}
|
|
?>
|
|
</strong>
|
|
</td>
|
|
<td style="text-align:right">
|
|
<strong>
|
|
<?php {
|
|
echo number_format($tvt, 2, '.', '');
|
|
}
|
|
?>
|
|
</strong>
|
|
</td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
</tfoot>
|
|
<?php
|
|
}
|
|
|
|
?>
|
|
</table>
|
|
</div> <!-- end card body-->
|
|
</div> <!-- end card -->
|
|
</div><!-- end col-->
|
|
</div>
|
|
</div>
|
|
</div> <!-- container -->
|
|
</div> <!-- content -->
|
|
</div>
|
|
|
|
|
|
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
|
|
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
|
|
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
|
|
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
|
|
<script>
|
|
// Bootstrap datepicker
|
|
// Set up your table
|
|
$(document).ready(function() {
|
|
// Initialize the DataTable with only pagination enabled
|
|
var table = $('#cc').DataTable({
|
|
dom: 'Blfrtip',
|
|
buttons: [{
|
|
extend: 'excel',
|
|
text: 'Excel',
|
|
}],
|
|
paging: true, // Enable pagination
|
|
searching: true, // Disable search
|
|
ordering: false, // Disable column sorting
|
|
info: false, // Disable table information
|
|
lengthChange: false, // Disable page length options
|
|
pageLength: 10, // Default rows per page
|
|
responsive: true, // Keep responsive design
|
|
language: {
|
|
paginate: {
|
|
next: '<i class="fas fa-angle-right"></i>', // Next button icon
|
|
previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
|
|
}
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
|
|
|
|
<script>
|
|
function toggleTables(which) {
|
|
|
|
if (which == "1") {
|
|
document.getElementById('a').style.display = "block";
|
|
document.getElementById('b').style.display = "none";
|
|
|
|
}
|
|
if (which == "2") {
|
|
document.getElementById('b').style.display = "block";
|
|
document.getElementById('a').style.display = "none";
|
|
|
|
}
|
|
}
|
|
</script>
|