<?php require_once('includes/master/report_functions.php'); switch($_REQUEST['view']){
default:
?>
<div class="row">
<div class="list-group">
<a href="index.php?t=includes/master&p=reporting.php&view=dueDate" class="list-group-item list-group-item-action">Schedule By Due Date</a>
<a href="" class="list-group-item list-group-item-action">Schedule By Client</a>
<a href="" class="list-group-item list-group-item-action">Schedule By Agent</a>
<a href="" class="list-group-item list-group-item-action">Schedule By Supplier</a>
</div>
</div>
<?php
break;

case "dueDate":?>
<div class="com-md-12"><p class="lead">Schedule by Due Date</p></div>
<div class="col-md-6">
<span class="badge badge-pill badge-default">1</span> SELECT CLIENT
<hr>
<div class="col-12 col-md-6 input-group"><?= listClient("", "clientName", 'select')?></div>
</div>

<div class="clearfix"></div>

<div id="schedule" class="col-md-12">

</div>
<div class="clearfix"></div>
<script>
$('#navBox').html('<a href="index.php?t=includes/master&p=reporting.php" class="s1">Schedule Reporting</a><a href="javascript:void(0)" class="sa">Schedule by Due Date</a>');


$('#clientName').change(function(){
var client=$(this).val()
$.post('includes/master/report_functions.php',{FUNCTION:'getAsssets',clientnumber:client},function(data){
$('#schedule').html(data)
genReport(client,data)
})
})

function genReport(c,d){
$.post('includes/engines/report.php',{clientnumber:c,type:'scheduleByDueDate',content:d, format:'A4-L'},function(ret){debug(ret)})
}


</script>
<?php break;
}
?>