| Current Path : /home2/wtmwscom/public_html/admin/ |
| Current File : /home2/wtmwscom/public_html/admin/admin_sale_report.php |
<?php
$title = "admin sale report";
include 'header.php';
//$useridMAINN=$_SESSION['userid'];
?>
<script src="../js/jquery-ui.js" type="text/javascript"></script>
<link rel="stylesheet" href="../css/jquery-ui.css" />
<div class="container-fluid">
<div class="row">
<div class="col-sm-12">
<div class="page-title-box">
<h4 class="page-title">User Sale report</h4>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="index.php">Home</a></li>
<li class="breadcrumb-item"><a href="#">Inventory</a></li>
<li class="breadcrumb-item active">User Sale Report</li>
</ol>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-15">
<div class="card m-b-20">
<div class="card-body">
<form class="form-inline" id="search-form" action="">
<div class="form-group " >
<label class="form-control " > From Date: </label>
<input type="text" class="form-control datepicker" placeholder="From date" name="from_date" autocomplete="off">
</div>
<div class="form-group">
<label class="form-control "> To date: </label>
<input type="text" class="form-control datepicker" placeholder="To date" name="to_date" autocomplete="off" >
</div>
<button type="submit" class="btn btn-primary" id="submit">Search</button><br><br><br>
</form>
<table class="table mb-0 table-bordered table-striped" id="datatable-ajax-page">
<thead>
<tr>
<th>Sno.</th>
<th>
P. Code
</th>
<th>
P. Name
</th>
<th>
User ID
</th>
<th>
Franchise ID
</th>
<th>
Franchise Name
</th>
<th>
P. Cost
</th>
<th>B.V.</th>
<th>Amount</th>
<th>
Qty.
</th>
<th>Sale date</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<?php //echo $pager->renderFullNav(); ?>
</div>
</div>
</div> <!-- end col -->
</div>
<!--table content ends here-->
</div>
<script type="text/javascript">
var start;
$(document).ready(function () {
var table = $('#datatable-ajax-page').DataTable({
"ajax": {
"url": "./report/admin_sale_report_json.php",
"type": "POST",
dataType: 'json',
data: function (d) {
var formData = $("#search-form").serializeArray();
$.each(formData, function (i, field) {
d[field.name] = field.value;
});
},
},
"processing": true,
"serverSide": true,
"pageLength": 500,
//"lengthMenu": [[100, 500, 1000, 2000, -1], [100, 500, 1000, 2000, "All"]],
"lengthMenu": [[100, 500, 1000, 2000, 5000], [100, 500, 1000, 2000, 5000]],
"dom": 'B<"top">rt<"bottom"lp><"clear">',
buttons: [
'excel', 'csv', 'pdf', 'print'
],
"columns": [
{"data": "sno"},
// {"title": "User", "data": "name",
// "render": function (data, type, full, meta) {
// return '<a href="edit_profile.php?uid=' + full.uid + '">' + full.login_id + '</a>';
// }},
/* { "data": "parentRoleId" }, */
// {"title": "User", "data": "name",
// "render": function (data, type, full, meta) {
// return '<a href="user_login_process.php?uid=' + full.uid + '" title="Login this user" target="_blank">' + full.name + '</a>';
// }},
{"data": "pcode"},
{"data": "pname"},
{"data": "uid"},
{"data": "fid"},
{"data": "name"},
{"data": "pcost"},
{"data": "pv"},
{"data": "amount"},
{"data": "quantity"},
{"data": "date"},
// {"data": "pid",
// render": function (data, type, full, meta) {
// return '<a href="product_edit.php?pid='+full.pid+'">'+'</a>';
// }},
// {"data": "pid",
// "render": function (data, type, full, meta) {
// return '<a href="product_edit.php?pid=' + full.pid + '" class="btn btn-primary">' + "edit" + '</a>';
// }},
// {"data": "pid",
// "render": function (data, type, full, meta) {
// return '<a href="delete_product.php?pid=' + full.pid + '" class="btn btn-primary">' + "delete" + '</a>';
// }},
],
}
);
$("#search-form").submit(function (e) {
table.ajax.reload();
e.preventDefault(); // avoid to execute the actual submit of the form.
});
table.on('xhr', function () {
start = table.ajax.json().start;
});
});
function processBlock(uid, login_id, status) {
var r = confirm("Do you want Block user ID " + login_id);
var url = status == 0 ? "process_block.php" : "process_unblock.php";
if (r) {
$.get(url, {'uid': uid}, function (data) {
alert(data);
location.reload();
});
}
}
/*function processUnblock(uid, login_id) {
var r = confirm("Do you want Unblock user ID " + login_id);
if (r) {
$.get("process_unblock.php", {'uid': uid}, function (data) {
alert(data);
location.reload();
});
}
}*/
function processFieldUpdate(uid, login_id, field_name, field_value) {
var r = confirm("Do you want to update status of this id " + login_id);
if (r) {
$.get("process_field_update.php", {table_name: 'user', where_field_name: 'uid', id: uid, field_name: field_name, field_value: field_value}, function (data) {
alert(data);
location.reload();
});
}
}
// function searchform(){
// table.ajax.reload();
// }
</script>
<?php
include('footer.php');
?>