<?php $__env->startSection('content'); ?>
<div class="row">
    <div class="col-lg-12 col-md-12">
        <div class="card">
            <div class="card-body">

<div class="row page-titles">
    <div class="col-md-5 col-8 align-self-center">
        <h3 class="text-themecolor">Business Dashboard</h3>
        <ol class="breadcrumb">
            <li class="breadcrumb-item"><a href="javascript:void(0)">Home</a></li>
            <li class="breadcrumb-item active">Business Dashboard</li>
        </ol>
    </div>
    <div class="col-md-7 col-4 align-self-center">
        <div class="d-flex m-t-10 justify-content-end">
            <div class="d-flex m-r-20 m-l-10 hidden-md-down">
                <div class="chart-text m-r-10">
                    <h6 class="m-b-0"><small>CURRENT MONTH INCOME</small></h6>
                    <h4 class="m-t-0 text-info"><?php echo e(IND_money_format($currentMonthIncomes)); ?></h4>
                </div>
            </div>
            
            <div class="">
                <button class="right-side-toggle waves-effect waves-light btn-success btn btn-circle btn-sm pull-right m-l-10"><i class="ti-settings text-white"></i></button>
            </div>
        </div>
    </div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
    <div class="col-lg-3 col-md-6">
        <div class="card">
            <div class="card-body">
                <div class="d-flex flex-row">
                    <div class="round round-lg align-self-center round-info"><i class="fa fa-clipboard"></i></div>
                    <div class="m-l-10 align-self-center">
                        <h3 class="m-b-0 font-light"><?php echo e(IND_money_format($upg_recieved)); ?> / <?php echo e($upg_recieved_cnt); ?></h3>
                        <h5 class="font-lgiht m-b-0">Approved Bill</h5></div>
                </div>
            </div>
        </div>
    </div>
    <div class="col-lg-3 col-md-6">
        <div class="card">
            <div class="card-body">
                <div class="d-flex flex-row">
                    <div class="round round-lg align-self-center round-info"><i class="fa fa-clipboard"></i></div>
                    <div class="m-l-10 align-self-center">
                        <h3 class="m-b-0 font-lgiht"><?php echo e(IND_money_format($pending_activation)); ?> / <?php echo e($pending_activation_cnt); ?></h3>
                        <h5 class="font-lgiht m-b-0">Pending Bill</h5></div>
                </div>
            </div>
        </div>
    </div>
    <div class="col-lg-3 col-md-6">
        <div class="card">
            <div class="card-body">
                <div class="d-flex flex-row">
                    <div class="round round-lg align-self-center round-info"><i class="fa fa-database"></i></div>
                    <div class="m-l-10 align-self-center">
                        <h3 class="m-b-0 font-lgiht"><?php echo e($direct_incomes->count()); ?></h3>
                        <h5 class="font-lgiht m-b-0">Total Direct Point</h5></div>
                </div>
            </div>
        </div>
    </div>
    <div class="col-lg-3 col-md-6">
        <div class="card">
            <div class="card-body">
                <div class="d-flex flex-row">
                    <div class="round round-lg align-self-center round-info"><i class="fa fa-inr"></i></div>
                    <div class="m-l-10 align-self-center">
                        <h3 class="m-b-0 font-lgiht"><?php echo e(IND_money_format($direct_incomes->sum('income_amount'))); ?></h3>
                        <h5 class="font-lgiht m-b-0">Total Direct Income</h5></div>
                </div>
            </div>
        </div>
    </div>
    <div class="col-lg-3 col-md-6">
        <div class="card">
            <div class="card-body">
                <div class="d-flex flex-row">
                    <div class="round round-lg align-self-center round-info"><i class="fa fa-database"></i></div>
                    <div class="m-l-10 align-self-center">
                        <h3 class="m-b-0 font-lgiht"><?php echo e($binary_incomes->count()); ?></h3>
                        <h5 class="font-lgiht m-b-0">Total Matching Point</h5></div>
                </div>
            </div>
        </div>
    </div>
    <div class="col-lg-3 col-md-6">
        <div class="card">
            <div class="card-body">
                <div class="d-flex flex-row">
                    <div class="round round-lg align-self-center round-info"><i class="fa fa-inr"></i></div>
                    <div class="m-l-10 align-self-center">
                        <h3 class="m-b-0 font-lgiht"><?php echo e(IND_money_format($binary_incomes->sum('income_amount'))); ?></h3>
                        <h5 class="font-lgiht m-b-0">Total Matching Income</h5></div>
                </div>
            </div>
        </div>
    </div>
    <div class="col-lg-3 col-md-6">
        <div class="card">
            <div class="card-body">
                <div class="d-flex flex-row">
                    <div class="round round-lg align-self-center round-info"><i class="fa fa-database"></i></div>
                    <div class="m-l-10 align-self-center">
                        <h3 class="m-b-0 font-lgiht"><?php echo e($shopping_incomes->count()); ?></h3>
                        <h5 class="font-lgiht m-b-0">Total Bonus Point</h5></div>
                </div>
            </div>
        </div>
    </div>
    <div class="col-lg-3 col-md-6">
        <div class="card">
            <div class="card-body">
                <div class="d-flex flex-row">
                    <div class="round round-lg align-self-center round-info"><i class="fa fa-inr"></i></div>
                    <div class="m-l-10 align-self-center">
                        <h3 class="m-b-0 font-lgiht"><?php echo e(IND_money_format($shopping_incomes->sum('income_amount'))); ?></h3>
                        <h5 class="font-lgiht m-b-0">Total Bonus Income</h5></div>
                </div>
            </div>
        </div>
    </div>
    <div class="col-lg-3 col-md-6">
        <div class="card">
            <div class="card-body">
                <div class="d-flex flex-row">
                    <div class="round round-lg align-self-center round-info"><i class="fa fa-database"></i></div>
                    <div class="m-l-10 align-self-center">
                        <h3 class="m-b-0 font-lgiht"><?php echo e($rewards_incomes->count()); ?></h3>
                        <h5 class="font-lgiht m-b-0">Total Rewards Point</h5></div>
                </div>
            </div>
        </div>
    </div>
    <div class="col-lg-3 col-md-6">
        <div class="card">
            <div class="card-body">
                <div class="d-flex flex-row">
                    <div class="round round-lg align-self-center round-info"><i class="fa fa-inr"></i></div>
                    <div class="m-l-10 align-self-center">
                        <h3 class="m-b-0 font-lgiht"><?php echo e(IND_money_format($rewards_incomes->sum('income_amount'))); ?></h3>
                        <h5 class="font-lgiht m-b-0">Total Rewards Income</h5></div>
                </div>
            </div>
        </div>
    </div>
    <div class="col-lg-3 col-md-6">
        <div class="card">
            <div class="card-body">
                <div class="d-flex flex-row">
                    <div class="round round-lg align-self-center round-info"><i class="ti-wallet"></i></div>
                    <div class="m-l-10 align-self-center">
                        <h3 class="m-b-0 font-lgiht"><?php echo e(IND_money_format($usersWallet->avbl_total_balance)); ?></h3>
                        <h5 class="font-lgiht m-b-0">Total Available Balance</h5></div>
                </div>
            </div>
        </div>
    </div>
    <div class="col-lg-3 col-md-6">
        <div class="card">
            <div class="card-body">
                <div class="d-flex flex-row">
                    <div class="round round-lg align-self-center round-info"><i class="fa fa-bolt"></i></div>
                    <div class="m-l-10 align-self-center">
                        <h3 class="m-b-0 font-lgiht"><?php echo e(IND_money_format($usersWallet->left_kw_co)); ?> KW</h3>
                        <h5 class="font-lgiht m-b-0">Total Left Carry Over</h5></div>
                </div>
            </div>
        </div>
    </div>
    <!-- Column -->
    <div class="col-lg-3 col-md-6">
        <div class="card">
            <div class="card-body">
                <div class="d-flex flex-row">
                    <div class="round round-lg align-self-center round-info"><i class="ti-bolt"></i></div>
                    <div class="m-l-10 align-self-center">
                        <h3 class="m-b-0 font-lgiht"><?php echo e(IND_money_format($usersWallet->right_kw_co)); ?> KW</h3>
                        <h5 class="font-lgiht m-b-0">Total Right Carry Over</h5></div>
                </div>
            </div>
        </div>
    </div>
    <!-- Column -->
    <?php if($user->active!=1): ?>
    <!-- Column -->
    <div class="col-lg-3 col-md-6">
        <div class="card">
            <div class="card-body">
                <div class="d-flex flex-row">
                    <div class="round round-lg align-self-center round-info"><i class="fa fa-inr"></i></div>
                    <div class="m-l-10 align-self-center">
                        <h3 class="m-b-0 font-lgiht"><?php echo e(IND_money_format($user_bin->ev_balance_pkg_amnt)); ?></h3>
                        <h5 class="font-lgiht m-b-0">Activation Due Amount</h5></div>
                </div>
            </div>
        </div>
    </div>
    <?php endif; ?>
    <?php if($user->ev_is_franchise!=NULL): ?>
    
    <div class="col-lg-3 col-md-6">
        <div class="card">
            <div class="card-body">
                <div class="d-flex flex-row">
                    <div class="round round-lg align-self-center round-info"><i class="ti-wallet"></i></div>
                    <div class="m-l-10 align-self-center">
                        <h3 class="m-b-0 font-lgiht"><?php echo e(IND_money_format($usersWallet->avbl_total_balance_frnchs)); ?></h3>
                        <h5 class="font-lgiht m-b-0">Available Franchise Income</h5></div>
                </div>
            </div>
        </div>
    </div>

    <div class="col-lg-3 col-md-6">
        <div class="card">
            <div class="card-body">
                <div class="d-flex flex-row">
                    <div class="round round-lg align-self-center round-info"><i class="ti-wallet"></i></div>
                    <div class="m-l-10 align-self-center">
                        <h3 class="m-b-0 font-lgiht"><?php echo e(IND_money_format($franchise_incomes)); ?></h3>
                        <h5 class="font-lgiht m-b-0">Total Franchise Income</h5></div>
                </div>
            </div>
        </div>
    </div>
    <?php endif; ?>
    <!-- Column -->
</div>
<?php /* ?>

<div class="row">
    <div class="col-lg-7 col-xlg-7 col-md-7">
        <div class="card">
            <!-- Nav tabs -->
            <ul class="nav nav-tabs profile-tab" role="tablist">
                <li class="nav-item active"> <a class="nav-link" data-toggle="tab" href="#businessOverview" role="tab">Business Overview</a> </li>
                <li class="nav-item"> <a class="nav-link" data-toggle="tab" href="#recentTransactions" role="tab">Recent Transactions</a> </li>
                <li class="nav-item"> <a class="nav-link" data-toggle="tab" href="#pendingTransactions" role="tab">Pending Transaction</a> </li>
                <li class="nav-item"> <a class="nav-link" data-toggle="tab" href="#selfIncome" role="tab">Self Incomes</a> </li>
                <li class="nav-item"> <a class="nav-link" data-toggle="tab" href="#teamIncome" role="tab">Team Incomes</a> </li>
            </ul>
            <!-- Tab panes -->
            <div class="tab-content">
                <div class="tab-pane active" id="businessOverview" role="tabpanel">
                    <div class="card-body">
                        <div class="row">
                            <div class="p-20 col-md-6">
                                <table class="table color-bordered-table danger-bordered-table">
                                    <thead>
                                        <tr>
                                            <th colspan="4">Payout Overview</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr>
                                            <td>Total Left Booking</td>
                                            <td><?php echo e($totalLeftBooking); ?></td>
                                        </tr>
                                        <tr>
                                            <td>Total Right Booking</td>
                                            <td><?php echo e($totalRightBooking); ?></td>
                                        </tr>
                                        <tr>
                                            <td>Total Direct Point</td>
                                            <td><?php echo e($direct_income/2200); ?></td>
                                        </tr>
                                        <tr>
                                            <td>Total Matching Point</td>
                                            <td><?php echo e($matching_income/1100); ?></td>
                                        </tr>
                                        <tr>
                                            <td>Total Travel Point</td>
                                            <td><?php echo e($travel_income/220); ?></td>
                                        </tr>
                                        <tr>
                                            <td>Total Shopping Point</td>
                                            <td><?php echo e($shopping_income/110); ?></td>
                                        </tr>
                                        
                                        <tr>
                                            <td>Gross Direct Income</td>
                                            <td><?php echo e($direct_income); ?></td>
                                        </tr>
                                        <tr>
                                            <td>TDS Deduction</td>
                                            <td><?php echo e($direct_income*0.05); ?></td>
                                        </tr>
                                        <tr>
                                            <td>Admin Charge</td>
                                            <td><?php echo e($direct_income*0.05); ?></td>
                                        </tr>

                                        <tr>
                                            <td>Net Payable Amount</td>
                                            <td><?php echo e($direct_income - $direct_income*$SITE_TDS/100); ?></td>
                                        </tr>



                                        <tr>
                                            <td>Gross Matching Income</td>
                                            <td><?php echo e($matching_income); ?></td>
                                        </tr>
                                        <tr>
                                            <td>TDS Deduction</td>
                                            <td><?php echo e($matching_income*0.05); ?></td>
                                        </tr>
                                        <tr>
                                            <td>Admin Charge</td>
                                            <td><?php echo e($matching_income*0.05); ?></td>
                                        </tr>

                                        <tr>
                                            <td>Net Payable Amount</td>
                                            <td><?php echo e($matching_income - $matching_income*$SITE_TDS/100); ?></td>
                                        </tr>



                                        <tr>
                                            <td>Gross Travel Income</td>
                                            <td><?php echo e($travel_income); ?></td>
                                        </tr>
                                        <tr>
                                            <td>TDS Deduction</td>
                                            <td><?php echo e($travel_income*0.05); ?></td>
                                        </tr>
                                        <tr>
                                            <td>Admin Charge</td>
                                            <td><?php echo e($travel_income*0.05); ?></td>
                                        </tr>

                                        <tr>
                                            <td>Net Payable Amount</td>
                                            <td><?php echo e($travel_income - $travel_income*$SITE_TDS/100); ?></td>
                                        </tr>
                                        <tr>
                                            <td>Gross Shopping Income</td>
                                            <td><?php echo e($shopping_income); ?></td>
                                        </tr>
                                        <tr>
                                            <td>TDS Deduction</td>
                                            <td><?php echo e($shopping_income*0.05); ?></td>
                                        </tr>
                                        <tr>
                                            <td>Admin Charge</td>
                                            <td><?php echo e($shopping_income*0.05); ?></td>
                                        </tr>

                                        <tr>
                                            <td>Net Payable Amount</td>
                                            <td><?php echo e($shopping_income - $shopping_income*$SITE_TDS/100); ?></td>
                                        </tr>
                                        
                                        
                                    </tbody>
                                </table>
                            </div>
                            <div class="p-20 col-md-6">
                                <table class="table color-bordered-table danger-bordered-table">
                                    <thead>
                                        <tr>
                                            <th colspan="2">Payout Overview</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr>
                                            <td>Gross Self Income</td>
                                            <td><?php echo e($usersWallet->self_income); ?></td>
                                        </tr>
                                        <tr>
                                            <td>TDS Deduction</td>
                                            <td><?php echo e($usersWallet->self_income*0.05); ?></td>
                                        </tr>
                                        <tr>
                                            <td>Admin Charge</td>
                                            <td><?php echo e($usersWallet->self_income*0.05); ?></td>
                                        </tr>

                                        <tr>
                                            <td>Net Payable Amount</td>
                                            <td><?php echo e($usersWallet->self_income - $usersWallet->self_income*$SITE_TDS/100); ?></td>
                                        </tr>
                                        <tr>
                                            <td>Gross Team Income</td>
                                            <td><?php echo e($usersWallet->team_income); ?></td>
                                        </tr>
                                        <tr>
                                            <td>TDS Deduction</td>
                                            <td><?php echo e($usersWallet->team_income*0.05); ?></td>
                                        </tr>
                                        <tr>
                                            <td>Admin Charge</td>
                                            <td><?php echo e($usersWallet->team_income*0.05); ?></td>
                                        </tr>

                                        <tr>
                                            <td>Net Payable Amount</td>
                                            <td><?php echo e($usersWallet->team_income - $usersWallet->team_income*$SITE_TDS/100); ?></td>
                                        </tr>
                                    </tbody>
                                </table>
                                <div class="col-md-12" style="padding:0px;">
                                    <table class="table color-bordered-table danger-bordered-table">
                                        <thead>
                                            <tr>
                                                <th colspan="2">Business Overview</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <tr>
                                                <td>Self Business</td>
                                                <td><?php echo e($usersWallet->self_business); ?></td>
                                            </tr>
                                            <tr>
                                                <td>Team Business</td>
                                                <td><?php echo e($usersWallet->team_business); ?></td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>

                            </div>
                        </div>
                    </div>
                </div>
                <div class="tab-pane" id="recentTransactions" role="tabpane2">
                    <div class="card-body">
                    <div class="table-responsive m-t-20">
                        <table class="table stylish-table">
                            <thead>
                                <tr>
                                    <th colspan="2">Business Partner</th>
                                    <th>Amount</th>
                                    <th>Business</th>
                                    <th>Business Type</th>
                                    <th>Type</th>
                                    <th>Date</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php $__currentLoopData = $totIncomes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $inc): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <tr>
                                    <td style="width:50px;"><span class="round"><?php echo e(substr($inc->full_name,0,2)); ?></span></td>
                                    <td>
                                        <h6><?php echo e($inc->username); ?></h6><small class="text-muted"><?php echo e($inc->full_name); ?></small>
                                    </td>
                                    <td><?php echo e($inc->income_amount); ?></td>
                                    <td><?php echo e($inc->orig_amount); ?></td>
                                    <td><?php echo e(ucfirst($inc->payment_type)); ?></td>
                                    <td><span class="label label-<?php echo e(($inc->credit_debit==1)?'danger':'success'); ?>"><?php echo e(($inc->credit_debit==1)?'Debit':'Credit'); ?></span></td>
                                    <td><?php echo e($inc->created_at); ?></td>
                                </tr>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </tbody>
                        </table>
                        <a href="<?php echo e(url('/').'/incomes/viewall'); ?>" class="btn waves-effect waves-light btn-rounded btn-success">View All</a>
                    </div>
                   </div>
                </div>
                <div class="tab-pane" id="pendingTransactions" role="tabpane3">
                    <div class="card-body">
                    <div class="table-responsive m-t-20">
                        <table class="table stylish-table">
                            <thead>
                                <tr>
                                    <th colspan="2">Business Partner</th>
                                    <th>Business</th>
                                    <th>Business Type</th>
                                    <th>Type</th>
                                    <th>Date</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php $__currentLoopData = $pendingTransctions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $inc): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <tr>
                                    <td style="width:50px;"><span class="round"><?php echo e(substr($inc->full_name,0,2)); ?></span></td>
                                    <td>
                                        <h6><?php echo e($inc->username); ?></h6><small class="text-muted"><?php echo e($inc->full_name); ?></small>
                                    </td>
                                    <td><?php echo e($inc->amount); ?></td>
                                    <td><?php echo e(ucfirst($inc->itype_name)); ?></td>
                                    <td><?php echo e(ucfirst($inc->icomment)); ?></td>
                                    <td><?php echo e($inc->created_at); ?></td>
                                </tr>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </tbody>
                        </table>
                        <a href="<?php echo e(url('/').'/incomes/pendingTransactions'); ?>" class="btn waves-effect waves-light btn-rounded btn-success">View All</a>
                    </div>
                   </div>
                </div>
                <div class="tab-pane" id="selfIncome" role="tabpane4">
                    <div class="card-body">
                    <div class="table-responsive m-t-20">
                        <table class="table stylish-table">
                            <thead>
                                <tr>
                                    <th colspan="2">Business Partner</th>
                                    <th>Business</th>
                                    <th>Business Type</th>
                                    <th>Type</th>
                                    <th>Date</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php $__currentLoopData = $selfIncomes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $inc): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <tr>
                                    <td style="width:50px;"><span class="round"><?php echo e(substr($inc->full_name,0,2)); ?></span></td>
                                    <td>
                                        <h6><?php echo e($inc->username); ?></h6><small class="text-muted"><?php echo e($inc->full_name); ?></small>
                                    </td>
                                    <td><?php echo e($inc->income_amount); ?></td>
                                    <td><?php echo e($inc->orig_amount); ?></td>
                                    <td><?php echo e(ucfirst($inc->payment_type)); ?></td>
                                    <td><span class="label label-<?php echo e(($inc->credit_debit)?'danger':'success'); ?>"><?php echo e(($inc->credit_debit)?'Debit':'Credit'); ?></span></td>
                                    <td><?php echo e($inc->created_at); ?></td>
                                </tr>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </tbody>
                        </table>
                        <a href="<?php echo e(url('/').'/incomes/selfIncomes'); ?>" class="btn waves-effect waves-light btn-rounded btn-success">View All</a>
                    </div>
                   </div>
                </div>
                <div class="tab-pane" id="teamIncome" role="tabpane5">
                    <div class="card-body">
                    <div class="table-responsive m-t-20">
                        <table class="table stylish-table">
                            <thead>
                                <tr>
                                    <th colspan="2">Business Partner</th>
                                    <th>Amount</th>
                                    <th>Business</th>
                                    <th>Business Type</th>
                                    <th>Type</th>
                                    <th>Date</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php $__currentLoopData = $teamIncomes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $inc): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <tr>
                                        <td style="width:50px;"><span class="round"><?php echo e(substr($inc->full_name,0,2)); ?></span></td>
                                        <td>
                                            <h6><?php echo e($inc->username); ?></h6><small class="text-muted"><?php echo e($inc->full_name); ?></small>
                                        </td>
                                        <td><?php echo e($inc->income_amount); ?></td>
                                        <td><?php echo e($inc->orig_amount); ?></td>
                                        <td><?php echo e(ucfirst($inc->payment_type)); ?></td>
                                        <td><span class="label label-<?php echo e(($inc->credit_debit)?'danger':'success'); ?>"><?php echo e(($inc->credit_debit)?'Debit':'Credit'); ?></span></td>
                                        <td><?php echo e($inc->created_at); ?></td>
                                    </tr>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </tbody>
                        </table>
                        <a href="<?php echo e(url('/').'/incomes/teamIncomes'); ?>" class="btn waves-effect waves-light btn-rounded btn-success">View All</a>
                    </div>
                   </div>
                </div>
            </div>
        </div>
    </div>

    <div class="col-lg-5">
        <!-- Column -->
        <div class="card">
            <div class="card-body">
                <div class="d-flex flex-wrap">
                    <div>
                        <h3 class="card-title">Business Overview</h3>
                        <!-- <h6 class="card-subtitle">Overview of Newsletter Campaign</h6>  -->
                    </div>
                    <div class="ml-auto align-self-center">
                        <ul class="list-inline m-b-0">
                            <li>
                                <h6 class="text-muted text-success"><i class="fa fa-circle font-10 m-r-10 "></i>Team Business</h6> </li>
                            <li>
                                <h6 class="text-muted text-info"><i class="fa fa-circle font-10 m-r-10"></i>Self Business</h6> </li>

                        </ul>
                    </div>
                    
                </div> 
                <div class="campaign ct-charts"></div>
                <div class="row text-center">
                    <div class="col-lg-4 col-md-4 m-t-20"><h1 class="m-b-0 font-light"><?php echo e(IND_money_format($teamIncomes_sum + $selfIncomes_sum)); ?></h1><small>Total Income</small></div>
                    <div class="col-lg-4 col-md-4 m-t-20"><h1 class="m-b-0 font-light"><?php echo e(IND_money_format($teamIncomes_sum)); ?></h1><small>Team Income</small></div>
                    <div class="col-lg-4 col-md-4 m-t-20"><h1 class="m-b-0 font-light"><?php echo e(IND_money_format($selfIncomes_sum)); ?></h1><small>Self Income</small></div>
                </div>
            </div>
        </div>    
        <!-- Column -->
    </div>
</div>
<!-- Row -->
<div class="row">
    <!-- Column -->
    <div class="col-lg-8 col-md-7">
        <div class="card">
            <div class="card-body">
                <div class="row">
                    <div class="col-12">
                        <div class="d-flex flex-wrap">
                            <div>
                                <h3 class="card-title">Income Overview</h3>
                                <h6 class="card-subtitle">Income Vs Business</h6> </div>
                            <div class="ml-auto">
                                <ul class="list-inline">
                                    <li>
                                        <h6 class="text-muted text-success"><i class="fa fa-circle font-10 m-r-10 "></i>Business</h6> </li>
                                    <li>
                                        <h6 class="text-muted  text-info"><i class="fa fa-circle font-10 m-r-10"></i>Income</h6> </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                    <div class="col-12">
                        <div class="amp-pxl" style="height: 360px;"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="col-lg-4 col-md-5">
        <div class="card">
            <div class="card-body">
                <h3 class="card-title">Income Analysis</h3>
                <h6 class="card-subtitle">Different source of income</h6>
                <div id="visitor" style="height:290px; width:100%;"></div>
            </div>
            <div>
                <hr class="m-t-0 m-b-0">
            </div>
            <div class="card-body text-center ">
                <ul class="list-inline m-b-0">
                    <li>
                        <h6 class="text-muted text-info"><i class="fa fa-circle font-10 m-r-10 "></i>Plot</h6> </li>
                    <li>
                        <h6 class="text-muted  text-warning"><i class="fa fa-circle font-10 m-r-10"></i>Flat</h6> </li>
                    <li>
                        <h6 class="text-danger"><i class="fa fa-circle font-10 m-r-10"></i>Insurance</h6> </li>
                </ul>
            </div>
        </div>
    </div>
</div>
<?php */ ?>
<!-- Row -->
<style type="text/css">
.profile-tab li a.nav-link,
.customtab li a.nav-link {
  border: 0px;
  padding: 15px 20px;
  color: #000; }
  .profile-tab li.active a.nav-link,
  .customtab li.active a.nav-link {
    border-bottom: 2px solid #e67f22 !important;
    color: #e67f22 !important; }
  .profile-tab li a.nav-link:hover,
  .customtab li a.nav-link:hover {
    color: #e67f22 !important; }
#pendingTransactions,
#selfIncome,
#teamIncome{  }
.customtab2 li.active a.nav-link {
    background: #009efb;
    color: #ffffff;
}  
</style>

<?php $__env->stopSection(); ?>
<?php $__env->startSection('javascript'); ?>
    <!-- chartist CSS -->
    <link href="<?php echo e(url('/')); ?>/assets/plugins/chartist-js/dist/chartist.min.css" rel="stylesheet">
    <link href="<?php echo e(url('/')); ?>/assets/plugins/chartist-js/dist/chartist-init.css" rel="stylesheet">
    <link href="<?php echo e(url('/')); ?>/assets/plugins/chartist-plugin-tooltip-master/dist/chartist-plugin-tooltip.css" rel="stylesheet">
    <link href="<?php echo e(url('/')); ?>/assets/plugins/css-chart/css-chart.css" rel="stylesheet">
    <link href="<?php echo e(url('/')); ?>/assets/plugins/c3-master/c3.min.css" rel="stylesheet">
    <!--This page css - Morris CSS -->
    <link href="<?php echo e(url('/')); ?>/assets/plugins/c3-master/c3.min.css" rel="stylesheet">
    <script src="<?php echo e(url('/')); ?>/assets/plugins/chartist-js/dist/chartist.min.js"></script>
    <script src="<?php echo e(url('/')); ?>/assets/plugins/chartist-plugin-tooltip-master/dist/chartist-plugin-tooltip.min.js"></script>
    <!--c3 JavaScript -->
    <script src="<?php echo e(url('/')); ?>/assets/plugins/d3/d3.min.js"></script>
    <script src="<?php echo e(url('/')); ?>/assets/plugins/c3-master/c3.min.js"></script>
    <style type="text/css">
    </style>
        <?php /* ?>

    <script type="text/javascript">
    $(function () {
    // ============================================================== 
    // Business Overview
    // ============================================================== 
    
    var chart = new Chartist.Line('.campaign', {
          labels: [<?php $count = (count($selfIncomes) > count($teamIncomes))?count($selfIncomes):count($teamIncomes); ?> <?php for($i = 0; $i <= $count; $i++): ?> '<?php echo e($i); ?>', <?php endfor; ?>],
          series: [
            [0 <?php $__currentLoopData = $selfIncomes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $inc): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> ,'<?php echo e($inc->orig_amount); ?>' <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>]
            , [0 <?php $__currentLoopData = $teamIncomes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $inc): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> ,'<?php echo e($inc->orig_amount); ?>' <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>]
          ]}, {
          showArea: true,
          fullWidth: true,
          plugins: [
            Chartist.plugins.tooltip()
          ],
            axisY: {
            onlyInteger: true
            , scaleMinSpace: 40    
            , offset: 20
            , labelInterpolationFnc: function (value) {
                return (value / 100000) + 'L';
            }
        },
        });

        // Offset x1 a tiny amount so that the straight stroke gets a bounding box
        // Straight lines don't get a bounding box 
        // Last remark on -> http://www.w3.org/TR/SVG11/coords.html#ObjectBoundingBox
        chart.on('draw', function(ctx) {  
          if(ctx.type === 'area') {    
            ctx.element.attr({
              x1: ctx.x1 + 0.001
            });
          }
        });

        // Create the gradient definition on created event (always after chart re-render)
        chart.on('created', function(ctx) {
          var defs = ctx.svg.elem('defs');
          defs.elem('linearGradient', {
            id: 'gradient',
            x1: 0,
            y1: 1,
            x2: 0,
            y2: 0
          }).elem('stop', {
            offset: 0,
            'stop-color': 'rgba(255, 255, 255, 1)'
          }).parent().elem('stop', {
            offset: 1,
            'stop-color': 'rgba(38, 198, 218, 1)'
          });
        });
    
            
     var chart = [chart];

    // ============================================================== 
    // This is for the animation
    // ==============================================================
    
    for (var i = 0; i < chart.length; i++) {
        chart[i].on('draw', function(data) {
            if (data.type === 'line' || data.type === 'area') {
                data.element.animate({
                    d: {
                        begin: 500 * data.index,
                        dur: 500,
                        from: data.path.clone().scale(1, 0).translate(0, data.chartRect.height()).stringify(),
                        to: data.path.clone().stringify(),
                        easing: Chartist.Svg.Easing.easeInOutElastic
                    }
                });
            }
            if (data.type === 'bar') {
                data.element.animate({
                    y2: {
                        dur: 500,
                        from: data.y1,
                        to: data.y2,
                        easing: Chartist.Svg.Easing.easeInOutElastic
                    },
                    opacity: {
                        dur: 500,
                        from: 0,
                        to: 1,
                        easing: Chartist.Svg.Easing.easeInOutElastic
                    }
                });
            }
        });
    }

    // // ============================================================== 
    // Income Vs Business
    // ============================================================== 
    var chart2 = new Chartist.Bar('.amp-pxl', {
          labels: [<?php $__currentLoopData = $totIncomes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $inc): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> '<?php echo e($inc->created_at); ?>', <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>],
          series: [
            [<?php $__currentLoopData = $totIncomes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $inc): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> '<?php echo e($inc->income_amount); ?>', <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>],
            [<?php $__currentLoopData = $totIncomes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $inc): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> '<?php echo e($inc->orig_amount); ?>', <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>]
          ]
        }, {
          axisX: {
            // On the x-axis start means top and end means bottom
            position: 'end',
            showGrid: false
          },
          axisY: {
            // On the y-axis start means left and end means right
            position: 'start'
          },
        high:'1500000',
        low: '0',
        plugins: [
            Chartist.plugins.tooltip()
        ]
    });

    // ============================================================== 
    // Our visitor
    // ============================================================== 
    
    var chart = c3.generate({
        bindto: '#visitor',
        data: {
            columns: [
                ['Plot', <?php echo e(($teamIncomes_sum + $selfIncomes_sum)); ?>],
                ['Flat', 0],
                ['Insurance', 0],
            ],
            
            type : 'donut',
            onclick: function (d, i) { console.log("onclick", d, i); },
            onmouseover: function (d, i) { console.log("onmouseover", d, i); },
            onmouseout: function (d, i) { console.log("onmouseout", d, i); }
        },
        donut: {
            label: {
                show: true
              },
            title: "Income Sources",
            width:20,
            
        },
        
        legend: {
          hide: true
          //or hide: 'data1'
          //or hide: ['data1', 'data2']
        },
        color: {
              pattern: ['#1e88e5', '#000', '#ffb22b', '#fc4b6c', '#26c6da']
        }
    });
});

</script>
    <?php */ ?>

<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH G:\xampp\htdocs\yeselectricv.loc\resources\views/businessDashboard.blade.php ENDPATH**/ ?>