Preview: report-list.php
Size: 9.98 KB
/home/urbanman/roadkaraja.in/manager/report-list.php
<?php
error_reporting(0);
include("common.php");
include("config.php");
$tdte = date("Y/m/d");
$branch = $_SESSION[branch];
$result = mysql_query("SELECT sum(price) FROM record where purchased='$tdte' and branch='$branch'") or die(mysql_error());
$rows = mysql_fetch_array($result);
?>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<!-- START: Main Content-->
<main>
<div class="container-fluid">
<!-- START: Breadcrumbs-->
<div class="row ">
<div class="col-12 align-self-center">
<div class="sub-header mt-3 py-3 px-3 align-self-center d-sm-flex w-100 rounded">
<div class="w-sm-100 mr-auto"><h4 class="mb-0">Report Management</h4></div>
</div>
</div>
</div>
<div class="row ">
<div class="col-12 align-self-center">
<div class="sub-header mt-3 py-3 px-3 align-self-center d-sm-flex w-100 rounded">
<div class="w-sm-100 mr-auto">
<h6 class="mb-0">Search Report date wise:
<form action="reporting.php" method="GET">
<input type="date" name="sdate" style="border:1px solid #ddd;" required> to <input type="date" style="border:1px solid #ddd;" name="edate">
<button type="submit" class="btn7"> Search </button>
</form>
</h6></div>
</div>
</div>
</div>
<!-- <div class="row ">
<div class="col-12 align-self-center">
<div class="sub-header mt-3 py-3 px-3 align-self-center d-sm-flex w-100 rounded">
<div class="w-sm-100 mr-auto">
<h6 class="mb-0">Search Report Customer:
<form action="cusreporting.php" method="GET">
<input type="text" name="mobile" placeholder="Enter Mobile Number " style="border:1px solid #ddd;" required>
<button type="submit" class="btn7"> Search </button>
</form>
</h6></div>
</div>
</div>
</div>-->
<!-- END: Breadcrumbs-->
<div class="row ">
<div class="col-12 align-self-center">
<div class="sub-header mt-3 py-3 px-3 align-self-center d-sm-flex w-100 rounded">
<div class="w-sm-100 mr-auto">
<h6 class="mb-0">Today Sell LTR :
<b><?php if($rows['sum(price)']==''){?> 0 LTR <?php } else {?>
<?php echo $rows['sum(price)']; ?> LTR</font>
<?php } ?></b>
</h6></div>
</div>
</div>
</div>
<div class="row">
<div class="col-12 mt-3">
<div class="card">
<div class="card-header justify-content-between align-items-center">
<h6 class="mb-0"><font color="blue">Today Sell Report List: </font></h6>
</div>
<div class="card-body">
<div class="table-responsive">
<table id="example" class="display table dataTable table-striped table-bordered" >
<thead>
<tr>
<th> </th>
<th>Date </th>
<th> Name</th>
<th>Vehicle Number</th>
<th>Vehicle Type</th>
<th>Driver Phone </th>
<th>Phone </th>
<th>Route from</th>
<th>Route to</th>
<th>Urea Required</th>
<th>Company Name</th>
<th>Owner Name</th>
<th>Owner Phone</th>
<th>Sell LTR</th>
<th> Pay Type</th>
<th> </th>
</tr>
</thead>
<tbody>
<?php
error_reporting(0);
include("config.php");
$dte = date("Y/m/d");
$b = $_SESSION['branch'];
$query="select * from record where purchased='$dte' and branch='$b' order by id desc";
if(!($result=mysql_query($query))){echo mysql_error($query); exit;}
while($eprorecord=mysql_fetch_assoc($result)){
$count ++;
$que = sprintf("SELECT * from customer WHERE id = '%s' ",$eprorecord['cid']);
if(!($res=mysql_query($que))){echo mysql_error($que); exit;}
$customer_data=mysql_fetch_assoc($res);
$que4 = sprintf("SELECT * from customer_product_point WHERE cid = '%s' ",$eprorecord['cid']);
if(!($res4=mysql_query($que4))){echo mysql_error($que4); exit;}
$customer_pointdata=mysql_fetch_assoc($res4);
?>
<tr>
<td><?php echo $count;?></td>
<td><?php echo date('d-m-Y',strtotime($eprorecord['purchased'])); ?> <?php echo strtoupper($eprorecord[ptime]);?> </td>
<td><?php echo strtoupper($customer_data[customer_name]);?></td>
<td><?php echo strtoupper($customer_data[vehicle_number]);?></td>
<td><?php echo strtoupper($customer_data[vehicletyp]);?></td>
<td><?php echo strtoupper($customer_data[customer_mobile]);?></td>
<td> <?php echo strtoupper($customer_data[mobile2]);?></td>
<td><?php echo strtoupper($customer_data[routefrom]);?></td>
<td><?php echo strtoupper($customer_data[routeto]);?></td>
<td><?php echo strtoupper($customer_data[urea]);?></td>
<td><?php echo strtoupper($customer_data[companyname]);?></td>
<td><?php echo strtoupper($customer_data[owner]);?></td>
<td><?php echo strtoupper($customer_data[ownermobile]);?></td>
<td><b><font color="blue"><?php echo $eprorecord[price];?> LTR</font></b></td>
<td><a class="btn2" title="edit" href="edit-report.php?flag=edit&id=<?php echo $eprorecord[id];?>&point=<?php echo $customer_pointdata[point];?>">
<i class="fa fa-edit icon-white"></i> Update</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- END: Card DATA-->
</div>
</main>
<!-- END: Content-->
<!-- START: Back to top-->
<a href="#" class="scrollup text-center">
<i class="icon-arrow-up"></i>
</a>
<!-- END: Back to top-->
<!-- START: Template JS-->
<script src="dist/vendors/jquery/jquery-3.3.1.min.js"></script>
<script src="dist/vendors/jquery-ui/jquery-ui.min.js"></script>
<script src="dist/vendors/moment/moment.js"></script>
<!-- <script src="dist/vendors/bootstrap/js/bootstrap.bundle.min.js"></script> -->
<script src="dist/vendors/slimscroll/jquery.slimscroll.min.js"></script>
<script src="dist/vendors/flag-select/js/jquery.flagstrap.min.js"></script>
<!-- END: Template JS-->
<!-- START: APP JS-->
<script src="dist/js/app.js"></script>
<!-- END: APP JS-->
<!-- START: Page Vendor JS-->
<script src="dist/vendors/datatable/js/jquery.dataTables.min.js"></script>
<script src="dist/vendors/datatable/js/dataTables.bootstrap4.min.js"></script>
<script src="dist/vendors/datatable/jszip/jszip.min.js"></script>
<script src="dist/vendors/datatable/pdfmake/pdfmake.min.js"></script>
<script src="dist/vendors/datatable/pdfmake/vfs_fonts.js"></script>
<script src="dist/vendors/datatable/buttons/js/dataTables.buttons.min.js"></script>
<script src="dist/vendors/datatable/buttons/js/buttons.bootstrap4.min.js"></script>
<script src="dist/vendors/datatable/buttons/js/buttons.colVis.min.js"></script>
<script src="dist/vendors/datatable/buttons/js/buttons.flash.min.js"></script>
<script src="dist/vendors/datatable/buttons/js/buttons.html5.min.js"></script>
<script src="dist/vendors/datatable/buttons/js/buttons.print.min.js"></script>
<!-- END: Page Vendor JS-->
<!-- START: Page Script JS-->
<script src="dist/js/datatable.script.js"></script>
<style>
.btn7{
padding:4px;
background-color:#669b29;
color:#fff;
border-radius:20px;
padding-left:10px;padding-right:10px;
border:2px solid #669b29;
box-shadow:0 4px 10px 0 rgba(0,0,0,0.3);
width:140px;
}
</style>
</body>
</html>
Directory Contents
Dirs: 5 × Files: 59