257 lines
7.6 KiB
PHP
Executable File
257 lines
7.6 KiB
PHP
Executable File
<!-- Report_supplier_summary.php -->
|
|
<script>
|
|
$(document).ready(function() {
|
|
$("#client_name").select2();
|
|
$("#financialyear").select2();
|
|
$("#month").select2();
|
|
});
|
|
</script>
|
|
|
|
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
|
|
|
|
<style>
|
|
table {
|
|
width: auto;
|
|
}
|
|
</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);">Report</a></li>
|
|
<li class="breadcrumb-item"><a href="javascript: void(0);"> Inward</a></li>
|
|
<li class="breadcrumb-item active">
|
|
<h4 class="page-title"><b> Inward Summary
|
|
</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">
|
|
|
|
<form method="post" action="<?php echo base_url($this->uri->uri_string()); ?>">
|
|
|
|
<div class="form-group has-feedback">
|
|
<div class="col-md-2">
|
|
<label for="to_date">
|
|
<?php echo 'Year'; ?>
|
|
</label>
|
|
<div class="input-group">
|
|
<select class="form-control" id="financialyear" name="financialyear">
|
|
<option value="">Select Year</option>
|
|
<?php
|
|
|
|
|
|
foreach ($finyear as $item): { ?>
|
|
|
|
<option value="<?php echo $item->financial_year; ?>"><?php echo $item->financial_year; ?></option>
|
|
|
|
|
|
<?php }
|
|
endforeach; ?>
|
|
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-2">
|
|
<label for="to_date">
|
|
<?php echo 'Month'; ?>
|
|
</label>
|
|
<div class="input-group">
|
|
<select class="form-control" id="month" name="month">
|
|
<option value="">Select Month</option>
|
|
<option value="January">January</option>
|
|
<option value="February">February</option>
|
|
<option value="March">March</option>
|
|
<option value="April">April</option>
|
|
<option value="May">May</option>
|
|
<option value="June">June</option>
|
|
<option value="July">July</option>
|
|
<option value="August">August</option>
|
|
<option value="September">September</option>
|
|
<option value="October">October</option>
|
|
<option value="November">November</option>
|
|
<option value="December">December</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-2">
|
|
<label for="from_date">
|
|
<?php echo 'From Date'; ?>
|
|
</label>
|
|
<div class="input-group">
|
|
<input name="from_date" id="max-date" class="form-control datepicker">
|
|
<span class="input-group-addon">
|
|
<i class="fa fa-calendar fa-fw"></i>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="col-md-2">
|
|
<label for="to_date">
|
|
<?php echo 'To Date'; ?>
|
|
</label>
|
|
<div class="input-group">
|
|
<input name="to_date" id="min-date" class="form-control datepicker">
|
|
<span class="input-group-addon">
|
|
<i class="fa fa-calendar fa-fw"></i>
|
|
</span>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="col-md-2 "><br>
|
|
<input type="submit" class="btn btn-success" name="btn_submit"
|
|
value="View Report">
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</form>
|
|
|
|
<div class="table-responsive">
|
|
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;">
|
|
<thead>
|
|
<tr>
|
|
<th style="text-align:center">Supplier Name</th>
|
|
<th style="text-align:center">Quantity</th>
|
|
<th style="text-align:center">Value (₹)</th>
|
|
|
|
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php if (!empty($spurchse)) {
|
|
$tot_rate = 0;
|
|
$tot_qty = 0;
|
|
$tot_value = 0;
|
|
$tot_tot = 0;
|
|
$ab = $this->input->post('financialyear');
|
|
$month = $this->input->post('month');
|
|
$frm = $this->input->post('from_date');
|
|
$t = $this->input->post('to_date');
|
|
foreach ($spurchse as $rel) {
|
|
?>
|
|
<tr>
|
|
<td><span>
|
|
<a href="<?= base_url() ?>report/ilink_purchasesummary?sid=<?php echo $rel->sid; ?>&ab=<?php echo $ab; ?>&month=<?php echo $month; ?>&frm=<?php echo $frm; ?>&t=<?php echo $t; ?>"><?php echo $rel->supplier_name; ?></a>
|
|
</span></td>
|
|
|
|
<td style="text-align:right"><span><?php
|
|
$tot_qty = $tot_qty + round($rel->quantity);
|
|
echo round($rel->quantity); ?></span></td>
|
|
<td style="text-align:right"><span><?php
|
|
$tot_value = $tot_value + $rel->value;
|
|
echo number_format($rel->value, 2, '.', ''); ?></span></td>
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
<?php
|
|
}
|
|
|
|
?>
|
|
</tbody>
|
|
<tfoot width="100%">
|
|
<tr>
|
|
<td style="text-align:center;"><strong>Total</strong></td>
|
|
|
|
|
|
|
|
<td class="amount" style="text-align:right">
|
|
<strong>
|
|
<?php {
|
|
echo $tot_qty;
|
|
}
|
|
?>
|
|
</strong>
|
|
</td>
|
|
<td class="amount" style="text-align:right">
|
|
<strong>
|
|
<?php {
|
|
echo number_format($tot_value, 2, '.', '');
|
|
}
|
|
?>
|
|
</strong>
|
|
</td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
</tfoot>
|
|
<?php
|
|
}
|
|
|
|
?>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</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
|
|
var table = $('#cc').DataTable({
|
|
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
|
|
buttons: [
|
|
'excel' // Export buttons
|
|
],
|
|
pageLength: 10, // Default rows per page
|
|
lengthMenu: [
|
|
[10, 20, 30, 50, -1],
|
|
[10, 20, 30, 50, "All"]
|
|
], // Rows per page options
|
|
responsive: true, // Responsive table
|
|
ordering: false,
|
|
language: {
|
|
paginate: {
|
|
next: '<i class="fas fa-angle-right"></i>', // Next button icon
|
|
previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
|
|
},
|
|
emptyTable: '<div style="text-align:center;">Data Not Found!</div>'
|
|
}
|
|
});
|
|
});
|
|
</script>
|