<?php include "top.php"; ?>
<!DOCTYPE html>
<html>
<head>
	<?php include('include/head.php'); ?>
	<title><?php echo SITE_NAME?> | Cable Billing</title>
</head>
<body>
	<?php include('include/header.php'); ?>
	<?php include('include/sidebar.php'); ?>
	<?php $csadded=$_SESSION['murgibhai'];
				$getlog=f(q("SELECT * FROM tbl_login WHERE l_uid='$csadded'"));
				$ltype=$getlog['l_type'];

		?>
	<div class="main-container">
		<div class="pd-ltr-20 customscroll customscroll-10-p height-100-p xs-pd-20-10" >
			<?php if($ltype=='1' OR $ltype==2){ ?>
			<div class="row clearfix progress-box" style="margin-bottom: 0px;">
				<div class="col-lg-3 col-md-6 col-sm-12 mb-30">
					<div class="bg-white pd-20 box-shadow border-radius-5 height-100-p">
						<div class="project-info clearfix">
							<div class="project-info-left">
								<div class="icon box-shadow bg-blue text-white">
									<i class="fa fa-briefcase"></i>
								</div>
							</div>
							<?php if($ltype==1){
								$sqli=f(q("SELECT SUM(`bl_payamt`) as totalpayment FROM `cbill` WHERE bl_paydt=CURDATE()"));

							}else{

								$sqli=f(q("SELECT SUM(`bl_payamt`) as totalpayment FROM `cbill` WHERE bl_user='$csadded' AND bl_paydt=CURDATE()"));
							}
				            
				            ?>
							<div class="project-info-right">
								<span class="no text-blue weight-500 font-24">&#8377;<?=round($sqli['totalpayment'],2)?></span>
								<p class="weight-400 font-18">Today Payment</p>
							</div>
						</div>
						<div class="project-info-progress">
							<div class="row clearfix">
								<!-- <div class="col-sm-6 text-muted weight-500">Target</div>
								<div class="col-sm-6 text-right weight-500 font-14 text-muted">40</div> -->
							</div>
							<!-- <div class="progress" style="height: 10px;">
								<div class="progress-bar bg-blue progress-bar-striped progress-bar-animated" role="progressbar" style="width: 40%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
							</div> -->
						</div>
					</div>
				</div>
				<?php if($ltype==1){
	$sqli=f(q("SELECT SUM(`bl_payamt`) as totaldue FROM `cbill` WHERE bl_paydt=CURDATE() AND bl_paymd='ONLINE'"));

}else{
	$sqli=f(q("SELECT SUM(`bl_payamt`) as totaldue FROM `cbill` WHERE bl_user='$csadded' AND bl_paydt=CURDATE() AND bl_paymd='ONLINE'"));
	//$sqli=f(q("SELECT SUM(`bl_payamt`) as totalpayment FROM `cbill` WHERE bl_user='$csadded' AND bl_paydt=CURDATE()"));
}
				
				?>
				<div class="col-lg-3 col-md-6 col-sm-12 mb-30">
					<div class="bg-white pd-20 box-shadow border-radius-5 height-100-p">
						<div class="project-info clearfix">
							<div class="project-info-left">
								<div class="icon box-shadow bg-light-green text-white">
									<i class="fa fa-handshake-o"></i>
								</div>
							</div>
							<div class="project-info-right">
								<span class="no text-light-green weight-500 font-24">&#8377;<?=round($sqli['totaldue'],2)?></span>
								<p class="weight-400 font-18">Online Payment</p>
							</div>
						</div>
						<div class="project-info-progress">
							<!-- <div class="row clearfix">
								<div class="col-sm-6 text-muted weight-500">Target</div>
								<div class="col-sm-6 text-right weight-500 font-14 text-muted">50</div>
							</div>
							<div class="progress" style="height: 10px;">
								<div class="progress-bar bg-light-green progress-bar-striped progress-bar-animated" role="progressbar" style="width: 50%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
							</div> -->
						</div>
					</div>
				</div>
				<?php $sqli=f(q("SELECT COUNT(*) AS Cable FROM adduser WHERE is_cable='1'"));
				$actvc=f(q("SELECT COUNT(*) AS Cable FROM adduser WHERE is_cable='1' AND actv=1"));
				$dactvc=f(q("SELECT COUNT(*) AS Cable FROM adduser WHERE is_cable='1' AND actv=0"));
                ?>
				<div class="col-lg-3 col-md-6 col-sm-12 mb-30">
					<div class="bg-white pd-20 box-shadow border-radius-5 height-100-p">
						<div class="project-info clearfix">
							<div class="project-info-left">
								<div class="icon box-shadow bg-light-orange text-white">
									<i class="fa fa-list-alt"></i>
								</div>
							</div>
							<div class="project-info-right">
								<span class="no text-light-orange weight-500 font-24"><?=$sqli['Cable']?> (<small style="font-size:12px;">ACTV:<?php echo $actvc['Cable']?> | DEACTV:<?php echo $dactvc['Cable']?> </small>)</span>
								<a href="cablecust.php"><p class="weight-400 font-18">Total Cable Customer</p></a>
							</div>
						</div>
						<div class="project-info-progress">
							<!-- <div class="row clearfix">
								<div class="col-sm-6 text-muted weight-500">Review</div>
								<div class="col-sm-6 text-right weight-500 font-14 text-muted">Good</div>
							</div>
							<div class="progress" style="height: 10px;">
								<div class="progress-bar bg-light-orange progress-bar-striped progress-bar-animated" role="progressbar" style="width: 80%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
							</div> -->
						</div>
					</div>
				</div>
				<?php $sqli=f(q("SELECT COUNT(1) AS Internet FROM adduser WHERE is_cable='0'"));
                ?>
				<!-- <div class="col-lg-3 col-md-6 col-sm-12 mb-30">
					<div class="bg-white pd-20 box-shadow border-radius-5 margin-5 height-100-p">
						<div class="project-info clearfix">
							<div class="project-info-left">
								<div class="icon box-shadow bg-light-purple text-white">
									<i class="fa fa-podcast"></i>
								</div>
							</div>
							<div class="project-info-right">
								<span class="no text-light-purple weight-500 font-24"><?=$sqli['Internet']?></span>
								<a href="internetcust.php"><p class="weight-400 font-18">Total Internet Customer</p></a>
							</div>
						</div>
						<div class="project-info-progress">
							
						</div>
					</div>
				</div> -->
				<?php $sqlrc=f(q("SELECT COUNT(*) as cnts FROM adduser WHERE pexpiry=CURDATE() AND is_cable=1"));
                ?>
				<div class="col-lg-3 col-md-6 col-sm-12 mb-30">
					<div class="bg-white pd-20 box-shadow border-radius-5 margin-5 height-100-p">
						<div class="project-info clearfix">
							<div class="project-info-left">
								<div class="icon box-shadow bg-light-orange text-white">
									<i class="fa fa-podcast"></i>
								</div>
							</div>
							<div class="project-info-right">
								<span class="no text-light-orange weight-500 font-24"><?=$sqlrc['cnts']?></span>
								<a href="ctodayrenew.php"><p class="weight-400 font-18">Today Cable Renew</p></a>
							</div>
						</div>
						<div class="project-info-progress">
							<!-- <div class="row clearfix">
								<div class="col-sm-6 text-muted weight-500">Review</div>
								<div class="col-sm-6 text-right weight-500 font-14 text-muted">Average</div>
							</div>
							<div class="progress" style="height: 10px;">
								<div class="progress-bar bg-light-purple progress-bar-striped progress-bar-animated" role="progressbar" style="width: 75%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
							</div> -->
						</div>
					</div>
				</div>
				<?php $sqlri=f(q("SELECT COUNT(*) as cnts FROM tbl_ticket WHERE strtdt=CURDATE() AND stat='PENDING'"));
                ?>
				<div class="col-lg-3 col-md-6 col-sm-12 mb-30">
					<div class="bg-white pd-20 box-shadow border-radius-5 margin-5 height-100-p">
						<div class="project-info clearfix">
							<div class="project-info-left">
								<div class="icon box-shadow bg-light-orange text-white">
									<i class="fa fa-bullhorn"></i>
								</div>
							</div>
							<div class="project-info-right">
								<span class="no text-light-orange weight-500 font-24"><?=$sqlri['cnts']?></span>
								<a href="ctodayrenew.php"><p class="weight-400 font-18">Today Complaints</p></a>
							</div>
						</div>
						<div class="project-info-progress">
							<!-- <div class="row clearfix">
								<div class="col-sm-6 text-muted weight-500">Review</div>
								<div class="col-sm-6 text-right weight-500 font-14 text-muted">Average</div>
							</div>
							<div class="progress" style="height: 10px;">
								<div class="progress-bar bg-light-purple progress-bar-striped progress-bar-animated" role="progressbar" style="width: 75%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
							</div> -->
						</div>
					</div>
				</div>
				<?php
                $sqlrb=f(q("SELECT COUNT(*) as cnts FROM tbl_ticket WHERE strtdt=CURDATE() AND stat='SOLVED'"));
                ?>
				<div class="col-lg-3 col-md-6 col-sm-12 mb-30">
					<div class="bg-white pd-20 box-shadow border-radius-5 margin-5 height-100-p">
						<div class="project-info clearfix">
							<div class="project-info-left">
								<div class="icon box-shadow bg-light-purple text-white">
									<i class="fa fa-bell"></i>
								</div>
							</div>
							<div class="project-info-right">
								<span class="no text-light-orange weight-500 font-24"><?=$sqlrb['cnts']?></span>
								<a href="ctodayrenew.php"><p class="weight-400 font-18">Today Solved Complaints</p></a>
							</div>
						</div>
						<div class="project-info-progress">
							<!-- <div class="row clearfix">
								<div class="col-sm-6 text-muted weight-500">Review</div>
								<div class="col-sm-6 text-right weight-500 font-14 text-muted">Average</div>
							</div>
							<div class="progress" style="height: 10px;">
								<div class="progress-bar bg-light-purple progress-bar-striped progress-bar-animated" role="progressbar" style="width: 75%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
							</div> -->
						</div>
					</div>
				</div>
				<?php
                $sqlrpe=f(q("SELECT COUNT(*) as cnts FROM tbl_ticket WHERE stat='PENDING'"));
                ?>
				<div class="col-lg-3 col-md-6 col-sm-12 mb-30">
					<div class="bg-white pd-20 box-shadow border-radius-5 margin-5 height-100-p">
						<div class="project-info clearfix">
							<div class="project-info-left">
								<div class="icon box-shadow bg-light-purple text-white">
									<i class="fa fa-bell"></i>
								</div>
							</div>
							<div class="project-info-right">
								<span class="no text-light-orange weight-500 font-24"><?=$sqlrpe['cnts']?></span>
								<a href="#"><p class="weight-400 font-18">Pending Complaints</p></a>
							</div>
						</div>
						<div class="project-info-progress">
							
						</div>
					</div>
				</div>

				<div class="col-lg-3 col-md-6 col-sm-12 mb-30">
					<div class="bg-white pd-20 box-shadow border-radius-5 margin-5 height-100-p">
						<div class="project-info clearfix">
							<div class="project-info-left">
								<div class="icon box-shadow bg-light-green text-white">
									<i class="ti ti-money"></i>
								</div>
							</div>
							<div class="project-info-right">
								<span class="no text-light-orange weight-500 font-24"></span>
								<a href="lineman_payment.php"><p class="weight-400 font-18">Lineman Wise Payments</p></a>
							</div>
						</div>
						<div class="project-info-progress">
							
						</div>
					</div>
				</div>
				<?php $date7 = (date("Y-m-d", strtotime("-7 day")));
            $date6 = (date("Y-m-d", strtotime("-6 day")));
            $date5 = (date("Y-m-d", strtotime("-5 day")));
            $date4 = (date("Y-m-d", strtotime("-4 day")));
            $date3 = (date("Y-m-d", strtotime("-3 day")));
            $date2 = (date("Y-m-d", strtotime("-2 day")));
            $date1 = (date("Y-m-d", strtotime("-1 day")));
            $date =  date("Y-m-d");





			$fdate7 = (date("Y-m-d", strtotime("+7 day")));
            $fdate6 = (date("Y-m-d", strtotime("+6 day")));
            $fdate5 = (date("Y-m-d", strtotime("+5 day")));
            $fdate4 = (date("Y-m-d", strtotime("+4 day")));
            $fdate3 = (date("Y-m-d", strtotime("+3 day")));
            $fdate2 = (date("Y-m-d", strtotime("+2 day")));
            $fdate1 = (date("Y-m-d", strtotime("+1 day")));
            $fdate =  date("Y-m-d");
            
            	//echo "SELECT SUM(cstotal) AS tots FROM tbl_cash_sales WHERE csdate='$date30' AND csac='SALES AC'";
            
            
            $totq7=f(q("SELECT SUM(bl_payamt) AS tots FROM cbill WHERE bl_paydt='$date7' AND bl_stat='1' AND bl_tp='1'"));
            $totq6=f(q("SELECT SUM(bl_payamt) AS tots FROM cbill WHERE bl_paydt='$date6' AND bl_stat='1' AND bl_tp='1'"));
            $totq5=f(q("SELECT SUM(bl_payamt) AS tots FROM cbill WHERE bl_paydt='$date5' AND bl_stat='1' AND bl_tp='1'"));
            $totq4=f(q("SELECT SUM(bl_payamt) AS tots FROM cbill WHERE bl_paydt='$date4' AND bl_stat='1' AND bl_tp='1'"));
            $totq3=f(q("SELECT SUM(bl_payamt) AS tots FROM cbill WHERE bl_paydt='$date3' AND bl_stat='1' AND bl_tp='1'"));
            $totq2=f(q("SELECT SUM(bl_payamt) AS tots FROM cbill WHERE bl_paydt='$date2' AND bl_stat='1' AND bl_tp='1'"));
            $totq1=f(q("SELECT SUM(bl_payamt) AS tots FROM cbill WHERE bl_paydt='$date1' AND bl_stat='1' AND bl_tp='1'"));
            $totq=f(q("SELECT SUM(bl_payamt) AS tots FROM cbill WHERE bl_paydt='$date' AND bl_stat='1' AND bl_tp='1'"));
            
           
            $tot7=$totq7['tots'];
            $tot6=$totq6['tots'];
            $tot5=$totq5['tots'];
            $tot4=$totq4['tots'];
            $tot3=$totq3['tots'];
            $tot2=$totq2['tots'];
            $tot1=$totq1['tots'];
            $tot=$totq['tots'];



            $ttotq7=f(q("SELECT COUNT(*) AS tots FROM adduser WHERE  pexpiry='$fdate7' AND is_cable=1"));
            $ttotq6=f(q("SELECT COUNT(*) AS tots FROM adduser WHERE pexpiry='$fdate6' AND is_cable='1'"));
            $ttotq5=f(q("SELECT COUNT(*) AS tots FROM adduser WHERE pexpiry='$fdate5' AND is_cable='1'"));
            $ttotq4=f(q("SELECT COUNT(*) AS tots FROM adduser WHERE pexpiry='$fdate4' AND is_cable='1'"));
            $ttotq3=f(q("SELECT COUNT(*) AS tots FROM adduser WHERE pexpiry='$fdate3' AND is_cable='1'"));
            $ttotq2=f(q("SELECT COUNT(*) AS tots FROM adduser WHERE pexpiry='$fdate2' AND is_cable='1'"));
            $ttotq1=f(q("SELECT COUNT(*) AS tots FROM adduser WHERE pexpiry='$fdate1' AND is_cable='1'"));
            $ttotq=f(q("SELECT COUNT(*) AS tots FROM adduser WHERE pexpiry='$fdate' AND is_cable='1'"));
            
            
          
            $ttot7=$ttotq7['tots'];
            $ttot6=$ttotq6['tots'];
            $ttot5=$ttotq5['tots'];
            $ttot4=$ttotq4['tots'];
            $ttot3=$ttotq3['tots'];
            $ttot2=$ttotq2['tots'];
            $ttot1=$ttotq1['tots'];
            $ttot=$ttotq['tots'];





             if($tot==''){

            	$tot=0;
            }if($tot1==''){

            	$tot1=0;
            }if($tot2==''){

            	$tot2=0;
            }if($tot3==''){

            	$tot3=0;
            }if($tot4==''){

            	$tot4=0;
            }if($tot5==''){

            	$tot5=0;
            }if($tot6==''){

            	$tot6=0;
            }if($tot7==''){

            	$tot7=0;
            }





            if($ttot==''){

            	$ttot=0;
            }
            if($ttot1==''){

            	$ttot1=0;

            }	
            if($ttot2==''){

            	$ttot2=0;
            }if($ttot3==''){

            	$ttot3=0;
            }if($ttot4==''){

            	$ttot4=0;
            }if($ttot5==''){

            	$ttot5=0;
            }if($ttot6==''){

            	$ttot6=0;
            }if($ttot7==''){

            	$ttot7=0;
            }


				?>


			</div>
			<?php if($ltype=='1'){ ?>
			<div class="row clearfix">
				<div class="col-xl-6 col-lg-6 col-md-12 col-sm-12 mb-30">
					<div class="bg-white pd-20 box-shadow border-radius-5 height-100-p">
						<h5 class="weight-600 mb-20 text-blue" style="font-size: 15px; border-bottom: 1px solid #f1f5f9; padding-bottom: 10px; text-transform: uppercase;">
							<i class="fa fa-file-text-o mr-2"></i> Reports & Auditing
						</h5>
						<div class="quick-action-grid">
							<a href="datetodatedue.php" class="action-tile">
								<div class="action-icon bg-soft-danger"><i class="fa fa-file-text-o"></i></div>
								<div class="action-label">Due Report</div>
							</a>
							<a href="total_payment.php" class="action-tile">
								<div class="action-icon bg-soft-danger"><i class="fa fa-map-marker"></i></div>
								<div class="action-label">Area Wise Due</div>
							</a>
							<a href="dtbilllist.php" class="action-tile">
								<div class="action-icon bg-soft-warning"><i class="fa fa-trash"></i></div>
								<div class="action-label">Bill Delete</div>
							</a>
							<a href="customer_wise.php" class="action-tile">
								<div class="action-icon bg-soft-primary"><i class="fa fa-user"></i></div>
								<div class="action-label">User Wise Payment</div>
							</a>
							<a href="cablecust.php" class="action-tile">
								<div class="action-icon bg-soft-secondary"><i class="fa fa-exchange"></i></div>
								<div class="action-label">Change Package</div>
							</a>
							<a href="cablecust.php" class="action-tile">
								<div class="action-icon bg-soft-success"><i class="fa fa-users"></i></div>
								<div class="action-label">Customer List</div>
							</a>
							<a href="new-ticket.php" class="action-tile">
								<div class="action-icon bg-soft-indigo"><i class="fa fa-commenting-o"></i></div>
								<div class="action-label">Add Feedback</div>
							</a>
							<a href="deletebill_area_wise.php" class="action-tile">
								<div class="action-icon bg-soft-warning"><i class="fa fa-calendar-times-o"></i></div>
								<div class="action-label">Delete Bill Monthwise</div>
							</a>
							<a href="areawise-customer.php" class="action-tile">
								<div class="action-icon bg-soft-purple"><i class="fa fa-list-alt"></i></div>
								<div class="action-label">Blank Cust Areawise</div>
							</a>
						</div>
					</div>
				</div>
				<div class="col-xl-6 col-lg-6 col-md-12 col-sm-12 mb-30">
					<div class="bg-white pd-20 box-shadow border-radius-5 height-100-p">
						<h5 class="weight-600 mb-20 text-blue" style="font-size: 15px; border-bottom: 1px solid #f1f5f9; padding-bottom: 10px; text-transform: uppercase;">
							<i class="fa fa-cogs mr-2"></i> Billing & Data Management
						</h5>
						<div class="quick-action-grid">
							<a href="addcuser.php" class="action-tile">
								<div class="action-icon bg-soft-success"><i class="fa fa-user-plus"></i></div>
								<div class="action-label">Customer Entry</div>
							</a>
							<a href="generatebill.php" class="action-tile">
								<div class="action-icon bg-soft-danger"><i class="fa fa-cogs"></i></div>
								<div class="action-label">Bill Generate</div>
							</a>
							<a href="areawise-print.php" class="action-tile">
								<div class="action-icon bg-soft-indigo"><i class="fa fa-print"></i></div>
								<div class="action-label">Area Bill Print</div>
							</a>
							<a href="customer-payments.php" class="action-tile">
								<div class="action-icon bg-soft-primary"><i class="fa fa-money"></i></div>
								<div class="action-label">Payment Collection</div>
							</a>
							<a href="datewisepayment.php" class="action-tile">
								<div class="action-icon bg-soft-secondary"><i class="fa fa-calendar"></i></div>
								<div class="action-label">D2D Collection</div>
							</a>
							<a href="bill_generate.php" class="action-tile">
								<div class="action-icon bg-soft-purple"><i class="fa fa-building-o"></i></div>
								<div class="action-label">Company Bill Report</div>
							</a>
							<a href="bill_generate.php" class="action-tile">
								<div class="action-icon bg-soft-warning"><i class="fa fa-truck"></i></div>
								<div class="action-label">Collector Bill Report</div>
							</a>
							<a href="total-gst.php" class="action-tile">
								<div class="action-icon bg-soft-success"><i class="fa fa-calculator"></i></div>
								<div class="action-label">GST Statement</div>
							</a>
							<a href="add-expense.php" class="action-tile">
								<div class="action-icon bg-soft-danger"><i class="fa fa-credit-card"></i></div>
								<div class="action-label">Expense Entry</div>
							</a>
							<a href="profitloss.php" class="action-tile">
								<div class="action-icon bg-soft-secondary"><i class="fa fa-line-chart"></i></div>
								<div class="action-label">Income & Expense</div>
							</a>
							<a href="" class="action-tile">
								<div class="action-icon bg-soft-purple"><i class="fa fa-address-book-o"></i></div>
								<div class="action-label">MSO Customer List</div>
							</a>
							<a href="company-master.php" class="action-tile">
								<div class="action-icon bg-soft-primary"><i class="fa fa-info-circle"></i></div>
								<div class="action-label">Company Details</div>
							</a>
						</div>
					</div>
				</div>
			</div>
			<div class="row clearfix">
				<div class="col-xl-6 col-lg-6 col-md-12 col-sm-12 mb-30">
						<div class="bg-white pd-20 box-shadow border-radius-5 height-100-p">
							<div id="chart4"></div>
						</div>
				</div>
				<div class="col-xl-6 col-lg-6 col-md-12 col-sm-12 mb-30">
						<div class="bg-white pd-20 box-shadow border-radius-5 height-100-p">
							<div id="chart5"></div>
						</div>
				</div>

			</div>
			<?php } ?>
		<?php } ?>

		<?php if($ltype=='3'){ ?>
			<div class="row clearfix progress-box" style="margin-bottom: 0px;">
				<div class="col-lg-3 col-md-6 col-sm-12 mb-30">
					<div class="bg-white pd-20 box-shadow border-radius-5 height-100-p">
						<div class="project-info clearfix">
							<div class="project-info-left">
								<div class="icon box-shadow bg-blue text-white">
									<i class="fa fa-briefcase"></i>
								</div>
							</div>
							<?php $getcust=f(q("SELECT * FROM adduser WHERE id='$getlog[user_id]'"));


				            $sqli=f(q("SELECT SUM(bl_payamt) as totalpayment FROM `cbill` WHERE bl_cid='$getcust[id]'"));
				            ?>
							<div class="project-info-right">
								<span class="no text-blue weight-500 font-24">&#8377;<?=round($sqli['totalpayment'],2)?></span>
								<p class="weight-400 font-18">Total Payment</p>
							</div>
						</div>
						<div class="project-info-progress">
							<div class="row clearfix">
								<!-- <div class="col-sm-6 text-muted weight-500">Target</div>
								<div class="col-sm-6 text-right weight-500 font-14 text-muted">40</div> -->
							</div>
							<!-- <div class="progress" style="height: 10px;">
								<div class="progress-bar bg-blue progress-bar-striped progress-bar-animated" role="progressbar" style="width: 40%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
							</div> -->
						</div>
					</div>
				</div>
				<?php $sqli=f(q("SELECT SUM(`bl_due`) as totaldue FROM `cbill` WHERE bl_cid='$getcust[id]'"));
				?>
				<div class="col-lg-3 col-md-6 col-sm-12 mb-30">
					<div class="bg-white pd-20 box-shadow border-radius-5 height-100-p">
						<div class="project-info clearfix">
							<div class="project-info-left">
								<div class="icon box-shadow bg-light-green text-white">
									<i class="fa fa-handshake-o"></i>
								</div>
							</div>
							<div class="project-info-right">
								<span class="no text-light-green weight-500 font-24">&#8377;<?=round($sqli['totaldue'],2)?></span>
								<p class="weight-400 font-18">Total Due</p>
							</div>
						</div>
						<div class="project-info-progress">
							<!-- <div class="row clearfix">
								<div class="col-sm-6 text-muted weight-500">Target</div>
								<div class="col-sm-6 text-right weight-500 font-14 text-muted">50</div>
							</div>
							<div class="progress" style="height: 10px;">
								<div class="progress-bar bg-light-green progress-bar-striped progress-bar-animated" role="progressbar" style="width: 50%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
							</div> -->
						</div>
					</div>
				</div>
				
				
				

			</div>




		<?php } ?>
			
			<?php include('include/footer.php'); ?>
		</div>
	</div>
	<?php include('include/script.php'); ?>
	<script src="src/plugins/highcharts-6.0.7/code/highcharts.js"></script>
	<script src="https://code.highcharts.com/highcharts-3d.js"></script>
	<script src="src/plugins/highcharts-6.0.7/code/highcharts-more.js"></script>

	<script type="text/javascript">
		
		Highcharts.chart('chart4', {
			chart: {
				type: 'column'
			},
			title: {
				text: 'Payments Chart (7 days)'
			},
			subtitle: {
				text: 'Source: Cableapp CRM'
			},
			xAxis: {
				categories: [
				'<?=$date?>',
				'<?=$date1?>',
				'<?=$date2?>',
				'<?=$date3?>',
				'<?=$date4?>',
				'<?=$date5?>',
				'<?=$date6?>',
				'<?=$date7?>'
				],
				crosshair: true
			},
			yAxis: {
				min: 0,
				title: {
					text: 'Price (Rs)'
				}
			},
			tooltip: {
				headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
				pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
				'<td style="padding:0"><b>{point.y:.1f} Rs</b></td></tr>',
				footerFormat: '</table>',
				shared: true,
				useHTML: true
			},
			plotOptions: {
				column: {
					pointPadding: 0.2,
					borderWidth: 0
				}
			},
			series: [{
				name: 'Cable Payment',
				data: [<?=$tot?>, <?=$tot1?>, <?=$tot2?>, <?=$tot3?>, <?=$tot4?>, <?=$tot5?>, <?=$tot6?>, <?=$tot7?>]

			}]
		});




		Highcharts.chart('chart5', {
			chart: {
				type: 'column'
			},
			title: {
				text: 'Renewal Chart (7 days)'
			},
			subtitle: {
				text: 'Source: Cableapp CRM'
			},
			xAxis: {
				categories: [
				'<?=$fdate?>',
				'<?=$fdate1?>',
				'<?=$fdate2?>',
				'<?=$fdate3?>',
				'<?=$fdate4?>',
				'<?=$fdate5?>',
				'<?=$fdate6?>',
				'<?=$fdate7?>'
				],
				crosshair: true
			},
			yAxis: {
				min: 0,
				title: {
					text: 'Numbers'
				}
			},
			tooltip: {
				headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
				pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
				'<td style="padding:0"><b>{point.y:.1f} </b></td></tr>',
				footerFormat: '</table>',
				shared: true,
				useHTML: true
			},
			plotOptions: {
				column: {
					pointPadding: 0.2,
					borderWidth: 0
				}
			},
			series: [{
				name: 'Coming 7 Days Renewal Chart',
				data: [<?=$ttot?>, <?=$ttot1?>, <?=$ttot2?>, <?=$ttot3?>, <?=$ttot4?>, <?=$ttot5?>, <?=$ttot6?>, <?=$ttot7?>]

			}]
		});


		
	</script>
</body>
</html>