<?php require('includes/master/finance_functions.php');?>
<div class="btn-toolbar btn-group-lg" role="group" role="toolbar">
<button onClick="showBlock('searchBox')" type="button" class="btn btn-secondary">Search Client</button>
<button onClick="showBlock('dateBox')" type="button" class="btn btn-secondary">All Due</button>
<button onClick="showBlock('allBox')" type="button" class="btn btn-secondary">All Sent</button>
</div>
<div class="clearfix spacer"></div> 

<div id="searchBox" class="col-md-12 block" style="display: none">
<div class="col-md-3">

<?php echo listClient("","client","select")?>
</div>
<div class="clearfix spacer"></div>
<div id="client_single"></div>
</div>

<div id="dateBox" class="block" style="display: none">
<div class="col-md-6">
<span class="badge badge-pill badge-default">2</span> SELECT DATE RANGE
<hr>
<div class="col-xs-12 col-md-6 input-group"><input class="form-control form-control-sm datepicker" type="text" name="date_start" id="date_start" placeholder="START DATE" /></div>
<div class="col-xs-12 col-md-6 input-group"><input class="form-control form-control-sm datepicker" type="text" name="date_end" id="date_end" placeholder="END DATE" value="<?php echo date('d-m-Y')?>" /></div>
</div>

<div class="col-md-12 text-center"><a class="btn btn-info" href="javascript:void(0)" onClick="loadReports()">calculate</a></div>
<div class="clearfix"></div>
</div>

<div id="allBox" class="block" style="display: none">


</div>





<script>
$('#navBox').html('<a href="javascript:void(0)" class="sa1">Finance - Renewals / Billing</a>');
$('#client').change(function(){
$('#client_single').load('includes/finance/finance_client.php?clientnumber='+$(this).val())
$('#dateBox').toggle()
})

function showBlock(i){
$( ".block:visible" ).toggle()
$('#'+i).toggle()
}
</script>