<? global $vis_language; ?>
 <script>
     <? if($quick_view['new'] > 0):?>
    $("#new_cnt").html("<a onclick=\"$('#vis_workpanel_div').visExecution('load_module','New tickets',{'vis_module':'ticket','vis_operation':'filter_ticket', 'vis_filter_id':2,'vis_client_id':'<? echo $client_details['client_id']; ?>'});\"><h4><?= $quick_view['new'];?></h4></a><p> <? echo $vis_language['TXTNEW']; ?></p>"); $("#new_cnt").addClass('vis-pointer');
    <? else:?>
        $("#new_cnt").html("<a><h4><?= $quick_view['new'];?></h4></a><p> <? echo $vis_language['TXTNEW']; ?></p>");
    <? endif; ?>
        
    <? if($quick_view['overdue'] > 0):?> 
        $("#overdue_cnt").html("<a onclick=\"$('#vis_workpanel_div').visExecution('load_module','Overdue tickets',{'vis_module':'ticket','vis_operation':'filter_ticket', 'vis_filter_id':3,'vis_client_id':'<? echo $client_details['client_id']; ?>'});\"><h4><?= $quick_view['overdue'];?></h4></a><p><? echo $vis_language['TXTOVERDUE']; ?></p>"); $("#overdue_cnt").addClass('vis-pointer');
    <? else:?>
        $("#overdue_cnt").html("<a><h4><?= $quick_view['overdue'];?></h4></a><p> <? echo $vis_language['TXTOVERDUE']; ?></p>");
    <? endif; ?>
        
    <? if($quick_view['assigned'] > 0):?> 
        $("#assigned_cnt").html("<a onclick=\"$('#vis_workpanel_div').visExecution('load_module','Assigned tickets',{'vis_module':'ticket','vis_operation':'filter_ticket', 'vis_filter_id':4 ,'vis_client_id':'<? echo $client_details['client_id']; ?>'});\"><h4><?= $quick_view['assigned'];?></h4></a><p> <? echo $vis_language['TXTSELFASSIGNED']; ?></p>"); $("#assigned_cnt").addClass('vis-pointer');
    <? else:?>
         $("#assigned_cnt").html("<a><h4><?= $quick_view['assigned'];?></h4></a><p> <? echo $vis_language['TXTSELFASSIGNED']; ?></p>");
    <? endif; ?>
    <? if($invoice['total_unpaid'] > 0):?> 
        $("#total_unpaid_cnt").html("<a onclick=\"$('#vis_workpanel_div').visExecution('load_module','<? echo $vis_language['TXTUNPAID']; ?>',{'vis_module':'billing','vis_operation':'get_invoices', 'vis_headerd':true, 'vis_filter':'<? echo VIS_TABLE_PREFIX; ?>client.client_id=<? echo $client_details['client_id']; ?> and invoice_status=0', 'vis_summary':1,'vis_client_id':<? echo $client_details['client_id']; ?>,'vis_title':'<?echo $vis_language['TXTUNPAID']; ?>'})\"><h4><? echo $invoice['total_unpaid']; ?></h4><p><? echo $vis_language['TXTUNPAID']; ?></p>"); $("#total_unpaid_cnt").addClass('vis-pointer');
    <? else:?>
        $("#total_unpaid_cnt").html("<a><h4><?= $invoice['total_unpaid'];?></h4></a><p> <? echo $vis_language['TXTUNPAID']; ?></p>");
    <? endif; ?>
        
    <? if($invoice['total_overdue'] > 0):?> 
        $("#total_overdue_cnt").html("<a onclick=\"$('#vis_workpanel_div').visExecution('load_module','<? echo $vis_language['TXTOVERDUE']; ?>',{'vis_module':'billing','vis_operation':'get_invoices', 'vis_headerd':true, 'vis_filter':'<? echo VIS_TABLE_PREFIX; ?>client.client_id=<? echo $client_details['client_id']; ?> and invoice_status=0 and due_date<unix_timestamp()', 'vis_summary':1,'vis_client_id':<? echo $client_details['client_id']; ?>,'vis_title':'<?echo $vis_language['TXTOVERDUE']; ?>'})\"><h4><? echo $invoice['total_overdue']; ?></h4></a><p> <? echo $vis_language['TXTOVERDUE']; ?></p>"); $("#total_overdue_cnt").addClass('vis-pointer');
    <? else:?>
        $("#total_overdue_cnt").html("<a><h4><?= $invoice['total_overdue'];?></h4></a><p> <? echo $vis_language['TXTOVERDUE']; ?></p>");
    <? endif; ?>
        
    <? if($invoice['total_new'] > 0):?>
        $("#total_new_cnt").html("<a onclick=\"$('#vis_workpanel_div').visExecution('load_module','<? echo $vis_language['TXTNEW']; ?>',{'vis_module':'billing','vis_operation':'get_invoices', 'vis_headerd':true, 'vis_filter':'<? echo VIS_TABLE_PREFIX; ?>client.client_id=<? echo $client_details['client_id']; ?> and invoice_status=0 and due_date>unix_timestamp()', 'vis_summary':1,'vis_client_id':<? echo $client_details['client_id']; ?>,'vis_title':'<?echo $vis_language['TXTNEW']; ?>'})\"><h4><? echo $invoice['total_new']; ?></h4></a><p><? echo $vis_language['TXTNEW']; ?></p>"); $("#total_new_cnt").addClass('vis-pointer');
    <? else:?>
        $("#total_new_cnt").html("<a><h4><?= $invoice['total_new'];?></h4></a><p> <? echo $vis_language['TXTNEW']; ?></p>");
    <? endif; ?>
        
    <? if($invoice['today_due'] > 0):?> 
        $("#today_due_cnt").html("<a onclick=\"$('#vis_workpanel_div').visExecution('load_module','<? echo $vis_language['TXTTODAYSDUE']; ?>',{'vis_module':'billing','vis_operation':'get_invoices', 'vis_headerd':true, 'vis_filter':'<? echo VIS_TABLE_PREFIX; ?>client.client_id=<? echo $client_details['client_id']; ?> and invoice_status=0 and due_date>=<? echo mktime(0, 0, 0, date('n'), date('j'), date('Y')); ?> and due_date<=unix_timestamp()+86400', 'vis_summary':1,'vis_client_id':<? echo $client_details['client_id']; ?>,'vis_title':'<?echo $vis_language['TXTTODAYSDUE']; ?>'})\"><h4><? echo $invoice['today_due']; ?></h4></a><p> <? echo stripslashes($vis_language['TXTTODAYSDUE']); ?></p>"); $("#today_due_cnt").addClass('vis-pointer');
    <? else:?>
        $("#today_due_cnt").html("<a><h4><?= $invoice['today_due'];?></h4></a><p> <? echo stripslashes($vis_language['TXTTODAYSDUE']); ?></p>");
    <? endif; ?>
        
    <? if($invoice['today_paid'] > 0):?>
        $("#today_paid_cnt").html("<a onclick=\"$('#vis_workpanel_div').visExecution('load_module','<? echo $vis_language['TXTTODAYSPAID']; ?>',{'vis_module':'billing','vis_operation':'get_invoices', 'vis_headerd':true, 'vis_filter':'<? echo VIS_TABLE_PREFIX; ?>client.client_id=<? echo $client_details['client_id']; ?> and invoice_status=1 and paid_date>=<? echo mktime(0, 0, 0, date('n'), date('j'), date('Y')); ?> and paid_date<=(<? echo mktime(0, 0, 0, date('n'), date('j'), date('Y')); ?>+86400)', 'vis_summary':1,'vis_client_id':<? echo $client_details['client_id']; ?>,'vis_title':'<?echo $vis_language['TXTTODAYSPAID']; ?>'})\"><h4><? echo $invoice['today_paid']; ?></h4></a><p> <? echo stripslashes($vis_language['TXTTODAYSPAID']); ?></p>"); $("#today_paid_cnt").addClass('vis-pointer');
        <? else:?>
        $("#today_paid_cnt").html("<a><h4><?= $invoice['today_paid'];?></h4></a><p> <? echo stripslashes($vis_language['TXTTODAYSPAID']); ?></p>");
    <? endif; ?>
</script>
<? if($note_details != -1)	{?>
    <div class="wrapper">
        <div class="bg-light b-a">
            <h4 class="b-b b-2x m-t-n-xxs padder padder-v m-b-none"><? echo $vis_language['TXTNOTES']; ?></h4>
            <div class="padder padder-v">
                <? include(VIS_PATH_TEMPLATE."ticket_note_details.php"); ?>
            </div>
        </div>
    </div>
<? } ?>
<script>
 <?if(empty($note_details)){?>
	 $("#note").css('display','none');	
<? } else {?>
	 $("#note").css('display','block');	
	 <? } ?>
</script>
