<?php $__env->startSection('title'); ?>
    Dashboard Page - Admin Panel
<?php $__env->stopSection(); ?>
<style>
    .small-box>.small-box-footer {
        border: none;
        width: 100%;
    }

    .fixed-height-table {
        max-height: 300px;
        /* Set your desired height */
        overflow-y: auto;
    }

    .fixed-height-table thead th {
        position: sticky;
        top: 0;
        background: #343a40;
        color: #fff;
        z-index: 1;
    }

    .fixed-height-table tfoot th {
        position: sticky;
        bottom: 0;
        background: #f8f9fa;
        z-index: 1;
    }
</style>
<?php $__env->startSection('navbar-content'); ?>
    <div class="content-header">
        <div class="container-fluid">
            <div class="row mb-2">
                <div class="col-sm-6">
                    <h1 class="m-0">Dashboard</h1>
                </div><!-- /.col -->
                <div class="col-sm-6">
                    <ol class="breadcrumb float-sm-right">
                        <li class="breadcrumb-item active"><a href="#">Dashboard</a></li>
                    </ol>
                </div><!-- /.col -->
            </div><!-- /.row -->
        </div><!-- /.container-fluid -->
    </div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('admin-content'); ?>
    <div class="row">
        <?php if($user->branch_id !== null): ?>
            <div class="col-md-6 offset-md-3">
                <div class="card">
                    <div class="card-body">
                        <div class="col-md-12">
                            <div class="position-relative p-3 bg-green" style="height: 150px">
                                <div class="ribbon-wrapper ribbon-xl">
                                    <div class="ribbon bg-red">
                                        <?php echo e($user->branch->branchCode ?? ''); ?> <br>
                                        <?php echo e($user->branch->name ?? ''); ?>

                                    </div>
                                </div>
                                <h3> Today : <?php echo e(date('d-M-Y')); ?>

                                </h3>
                                <h2>Hello <br> <?php echo e($user->name); ?></h2>
                                <br>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        <?php endif; ?>
    </div>

    <div class="row">
        <?php if(in_array(18, $rollper)): ?>
            <div class="col-lg-3 col-6">
                <!-- small box -->
                <div class="small-box bg-default">
                    <div class="inner">
                        <h3><?php echo e($totalemployee); ?></h3>
                        <p>Total Employee</p>
                    </div>
                    <div class="icon">
                        <i class="ion ion-pie-graph"></i>
                    </div>
                    <a href="<?php echo e(route('hrm.employee.index')); ?>" class="small-box-footer bg-success">More info <i
                            class="fas fa-arrow-circle-right"></i></a>
                </div>
            </div>
        <?php endif; ?>

        <?php if(in_array(19, $rollper)): ?>
            <div class="col-lg-3 col-6">
                <!-- small box -->
                <div class="small-box bg-default">
                    <div class="inner">
                        <h3><?php echo e($todayattendance); ?></h3>
                        <p>Today Attendance</p>
                    </div>
                    <div class="icon">
                        <i class="ion ion-pie-graph"></i>
                    </div>
                    <a href="<?php echo e(route('hrm.attendancelog.index')); ?>" class="small-box-footer bg-success">More info <i
                            class="fas fa-arrow-circle-right"></i></a>
                </div>
            </div>
        <?php endif; ?>
        <?php if(in_array(1, $rollper)): ?>
            <div class="col-lg-3 col-6">
                <!-- small box -->
                <div class="small-box bg-default">
                    <div class="inner">
                        <h3><?php echo e(number_format($leave_aplication)); ?></h3>

                        <p>Today Leaves</p>
                    </div>
                    <div class="icon">
                        <i class="ion ion-pie-graph"></i>
                    </div>
                    <a href="<?php echo e(route('hrm.leaveapprove.index')); ?>" class="small-box-footer bg-success">More info <i
                            class="fas fa-arrow-circle-right"></i></a>
                </div>
            </div>
        <?php endif; ?>

        <?php if(in_array(2, $rollper)): ?>
            <div class="col-lg-3 col-6">
                <!-- small box -->
                <div class="small-box bg-default">
                    <div class="inner">
                        <h3><?php echo e(number_format($total_absent)); ?></h3>

                        <p>Today Absent</p>
                    </div>
                    <div class="icon">
                        <i class="ion ion-pie-graph"></i>
                    </div>
                    <a href="<?php echo e(route('hrm.attendancelog.absent')); ?>" class="small-box-footer bg-success">More info <i
                            class="fas fa-arrow-circle-right"></i></a>
                </div>
            </div>
        <?php endif; ?>

        <?php if(in_array(3, $rollper)): ?>
            <div class="col-lg-3 col-6">
                <!-- small box -->
                <div class="small-box bg-default">
                    <div class="inner">
                        <h3><?php echo e(number_format($approved_leave)); ?></h3>

                        <p>Approved Leave</p>
                    </div>
                    <div class="icon">
                        <i class="ion ion-pie-graph"></i>
                    </div>
                    <a href="<?php echo e(route('hrm.leave.index')); ?>" class="small-box-footer bg-success">More info <i
                            class="fas fa-arrow-circle-right"></i></a>
                </div>
            </div>
        <?php endif; ?>

        <?php if(in_array(4, $rollper)): ?>
            <div class="col-lg-3 col-6">
                <!-- small box -->
                <div class="small-box bg-default">
                    <div class="inner">
                        <h3><?php echo e(number_format($monthly_created_employee)); ?></h3>

                        <p>This Month New Employee</p>
                    </div>
                    <div class="icon">
                        <i class="ion ion-pie-graph"></i>
                    </div>
                    <a href="<?php echo e(route('hrm.employee.newemployee')); ?>" class="small-box-footer bg-success">More info <i
                            class="fas fa-arrow-circle-right"></i></a>
                </div>
            </div>
        <?php endif; ?>

        <?php if(in_array(5, $rollper)): ?>
            <div class="col-lg-3 col-6">
                <!-- small box -->
                <div class="small-box bg-default">
                    <div class="inner">
                        <h3><?php echo e(number_format($monthly_lone)); ?></h3>

                        <p>This Month Loan Application</p>
                    </div>
                    <div class="icon">
                        <i class="ion ion-pie-graph"></i>
                    </div>
                    <a href="<?php echo e(route('hrm.lone.index')); ?>" class="small-box-footer bg-success">More info <i
                            class="fas fa-arrow-circle-right"></i></a>
                </div>
            </div>
        <?php endif; ?>

        <?php if(in_array(5, $rollper)): ?>
            <div class="col-lg-3 col-6">
                <!-- small box -->
                <div class="small-box bg-default">
                    <div class="inner">
                        <h3><?php echo e(number_format($monthly_lone_approved)); ?></h3>

                        <p>This Month Loan Approved</p>
                    </div>
                    <div class="icon">
                        <i class="ion ion-pie-graph"></i>
                    </div>
                    <a href="<?php echo e(route('hrm.loneapprove.index')); ?>" class="small-box-footer bg-success">More info <i
                            class="fas fa-arrow-circle-right"></i></a>
                </div>
            </div>
        <?php endif; ?>

        <?php if(in_array(1, $rollper)): ?>
            <div class="col-lg-3 col-6">
                <!-- small box -->
                <form action="<?php echo e(route('report.cashbook.cashbook', ['to_date' => date('Y-m-d')])); ?>" method="post">
                    <?php echo csrf_field(); ?>
                    <div class="small-box bg-default">
                        <div class="inner">
                            <h3><?php echo e(number_format($totalcashbalance)); ?></h3>
                            <p>Cash Balance</p>
                        </div>
                        <div class="icon">
                            <i class="ion ion-pie-graph"></i>
                        </div>
                        <button href="" class="small-box-footer bg-success">More info <i class="fas fa-arrow-circle-right"></i></button>
                    </div>
                </form>
            </div>

            <div class="col-lg-3 col-6">
                <!-- small box -->
                <form action="<?php echo e(route('report.bank_book', ['bank_id' => 'All', 'to_date' => date('Y-m-d')])); ?>"
                    method="post">
                    <?php echo csrf_field(); ?>
                    <div class="small-box bg-default">
                        <div class="inner">
                            <h3><?php echo e(number_format($totalbankbalance)); ?></h3>
                            <p>Bank Balance</p>
                        </div>
                        <div class="icon">
                            <i class="ion ion-pie-graph"></i>
                        </div>
                        <button href="" class="small-box-footer bg-success">More info <i
                                class="fas fa-arrow-circle-right"></i></button>
                    </div>
                </form>

            </div>
        <?php endif; ?>



        <?php if(in_array(2, $rollper)): ?>
            <div class="col-lg-3 col-6">
                <!-- small box -->
                <div class="small-box bg-default">
                    <div class="inner">
                        <h3><?php echo e(number_format($purchase)); ?></h3>

                        <p>Total Purchases</p>
                    </div>
                    <div class="icon">
                        <i class="ion ion-pie-graph"></i>
                    </div>
                    <a href="<?php echo e(route('inventorySetup.purchase.index')); ?>" class="small-box-footer bg-success">More info
                        <i class="fas fa-arrow-circle-right"></i></a>
                </div>
            </div>
        <?php endif; ?>

        <?php if(in_array(3, $rollper)): ?>
            <div class="col-lg-3 col-6">
                <!-- small box -->
                <div class="small-box bg-default">
                    <div class="inner">
                        <h3><?php echo e(number_format($totdayPurchase)); ?></h3>
                        <p>Today Purchase</p>
                    </div>
                    <div class="icon">
                        <i class="ion ion-bag"></i>
                    </div>
                    <a href="<?php echo e(route('inventorySetup.purchase.index', ['date' => date('Y-m-d')])); ?>"
                        class="small-box-footer bg-success">More info <i class="fas fa-arrow-circle-right"></i></a>
                </div>
            </div>
        <?php endif; ?>

        <?php if(in_array(4, $rollper)): ?>
            <div class="col-lg-3 col-6">
                <!-- small box -->
                <div class="small-box bg-default">
                    <div class="inner">
                        <h3><?php echo e(number_format($sale)); ?></h3>
                        <p>Total Sales</p>
                    </div>
                    <div class="icon">
                        <i class="ion ion-pie-graph"></i>
                    </div>
                    <a href="<?php echo e(route('sale.sale.index')); ?>" class="small-box-footer bg-success">More info <i
                            class="fas fa-arrow-circle-right"></i></a>
                </div>
            </div>
        <?php endif; ?>

        <?php if(in_array(5, $rollper)): ?>
            <!-- ./col -->
            <div class="col-lg-3 col-6">
                <!-- small box -->
                <div class="small-box bg-default">
                    <div class="inner">
                        <h3><?php echo e(number_format($todaySale)); ?></h3>

                        <p>Today Sale</p>
                    </div>
                    <div class="icon">
                        <i class="ion ion-stats-bars"></i>
                    </div>
                    <a href="<?php echo e(route('sale.sale.index', ['date' => date('Y-m-d')])); ?>"
                        class="small-box-footer bg-success">More info <i class="fas fa-arrow-circle-right"></i></a>
                </div>
            </div>
        <?php endif; ?>

        <?php if(in_array(6, $rollper)): ?>
            <!-- ./col -->
            <div class="col-lg-3 col-6">
                <!-- small box -->
                <form action="<?php echo e(route('report.expense', ['to_date' => date('Y-m-d')])); ?>" method="post">
                    <?php echo csrf_field(); ?>
                    <div class="small-box bg-default">
                        <div class="inner">
                            <h3><?php echo e(number_format($expense)); ?></h3>

                            <p>Total Expense</p>
                        </div>
                        <div class="icon">
                            <i class="ion ion-pie-graph"></i>
                        </div>
                        <button class="small-box-footer bg-success">More info <i
                                class="fas fa-arrow-circle-right"></i></button>
                    </div>
                </form>
            </div>
        <?php endif; ?>


        <?php if(in_array(7, $rollper)): ?>
            <!-- ./col -->
            <div class="col-lg-3 col-6">
                <!-- small box -->
                <form action="<?php echo e(route('report.expense', ['from_date' => date('Y-m-d'), 'to_date' => date('Y-m-d')])); ?>"
                    method="post">
                    <?php echo csrf_field(); ?>
                    <div class="small-box bg-default">
                        <div class="inner">
                            <h3><?php echo e(number_format($todayExpense)); ?></h3>

                            <p>Today Expense</p>
                        </div>
                        <div class="icon">
                            <i class="ion ion-person-add"></i>
                        </div>

                        <button class="small-box-footer bg-success">More info <i
                                class="fas fa-arrow-circle-right"></i></button>
                    </div>
                </form>

            </div>
        <?php endif; ?>

        <?php if(in_array(8, $rollper)): ?>
            <div class="col-lg-3 col-6">
                <!-- small box -->
                <div class="small-box bg-default">
                    <div class="inner">
                        <h3><?php echo e(number_format($suppplierPayment)); ?></h3>
                        <p>Total Payment</p>
                    </div>
                    <div class="icon">
                        <i class="ion ion-pie-graph"></i>
                    </div>
                    <a href="<?php echo e(route('settings.dabit.voucher.index')); ?>" class="small-box-footer bg-success">More info
                        <i class="fas fa-arrow-circle-right"></i></a>
                </div>
            </div>
        <?php endif; ?>

        <?php if(in_array(9, $rollper)): ?>
            <div class="col-lg-3 col-6">
                <!-- small box -->
                <div class="small-box bg-default">
                    <div class="inner">
                        <h3><?php echo e($customerPayment); ?></h3>
                        <p>Total Received</p>
                    </div>
                    <div class="icon">
                        <i class="ion ion-pie-graph"></i>
                    </div>
                    <a href="<?php echo e(route('settings.credit.voucher.index')); ?>" class="small-box-footer bg-success">More info
                        <i class="fas fa-arrow-circle-right"></i></a>
                </div>
            </div>
        <?php endif; ?>

        <?php if(in_array(10, $rollper)): ?>
            <div class="col-lg-3 col-6">
                <!-- small box -->
                <form action="<?php echo e(route('report.supledger.supledger', ['supplier_id' => 'all'])); ?>" method="post">
                    <?php echo csrf_field(); ?>
                    <div class="small-box bg-default">
                        <div class="inner">
                            <h3><?php echo e($supplierDue); ?></h3>
                            <p>Supplier Due</p>
                        </div>
                        <div class="icon">
                            <i class="ion ion-pie-graph"></i>
                        </div>
                        <button class="small-box-footer bg-success">More info <i
                                class="fas fa-arrow-circle-right"></i></button>
                    </div>
                </form>

            </div>
        <?php endif; ?>

        <?php if(in_array(11, $rollper)): ?>
            <div class="col-lg-3 col-6">
                <!-- small box -->
                <form action="<?php echo e(route('report.custledger.custledger', ['customer_id' => 'all'])); ?>" method="post">
                    <?php echo csrf_field(); ?>
                    <div class="small-box bg-default">
                        <div class="inner">
                            <h3><?php echo e($customerDue); ?></h3>

                            <p>Customer Due</p>
                        </div>
                        <div class="icon">
                            <i class="ion ion-pie-graph"></i>
                        </div>
                        <button class="small-box-footer bg-success">More info <i
                                class="fas fa-arrow-circle-right"></i></button>
                    </div>
                </form>

            </div>
        <?php endif; ?>



        <?php if(in_array(12, $rollper)): ?>
            
        <?php endif; ?>



        <?php
            $totalQty = 0;
            $i = 1;
        ?>

      <?php $__currentLoopData = $currentStock; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $unit => $items): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
    <div class="col-md-6 mb-4">
        <h5 class="mb-2"><?php echo e(strtoupper($unit)); ?> Items</h5>
        <div class="table-responsive fixed-height-table">
            <table class="table table-bordered table-striped mb-0">
                <thead class="table-dark">
                    <tr>
                        <th>SL</th>
                        <th>Product</th>
                        <th>Unit</th>
                        <th>Quantity</th>
                        <th>Available (KG)</th>
                    </tr>
                </thead>
                <tbody>
                    <?php
                        $totalQty = 0;
                        $i = 1;
                    ?>
                    <?php $__currentLoopData = $items; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <?php
                            $stockindetails = App\Models\Stockindetails::where('aceesories_id', $item->product_id);
                            $total_in_kg = $stockindetails->sum('kg');
                            $total_in_qty = $stockindetails->sum('in_quantity');
                            $rate_per_kg = $total_in_qty > 0 ? $total_in_kg / $total_in_qty : 0;

                            $stockoutdetails = App\Models\Stockoutdetails::where('aceesories_id', $item->product_id);
                            $total_out_qty = $stockoutdetails->sum('in_quantity');
                            $total_out_kg = $total_out_qty * $rate_per_kg;

                            $available_kg = $total_in_kg - $total_out_kg;
                            $accessory = $item->accessories;
                            $totalQty += $item->quantity;
                        ?>
                        <tr>
                            <td><?php echo e($i++); ?></td>
                            <td><?php echo e($accessory->name ?? 'N/A'); ?></td>
                            <td><?php echo e($accessory->unit ?? 'N/A'); ?></td>
                            <td><?php echo e($item->quantity); ?></td>
                            <td><strong><?php echo e(number_format($available_kg, 2)); ?></strong></td>
                        </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </tbody>
                <tfoot>
                    <tr>
                        <th colspan="3" class="text-end">Total</th>
                        <th><?php echo e($totalQty); ?></th>
                        <th></th>
                    </tr>
                </tfoot>
            </table>
        </div>
    </div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>


        <div class="col-lg-6 col-sm-12">
            <div class="card">
                <div class="card-header border-0">
                    <div class="d-flex justify-content-between">
                        <h3 class="card-title" style="color:green; font-weight: bold"> Account Details </h3>
                    </div>
                </div>
                <div class="panel panel-default">
                    <div class="row">
                        <?php if (isset($component)) { $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4 = $component; } ?>
<?php $component = $__env->getContainer()->make(Illuminate\View\AnonymousComponent::class, ['view' => 'components.card-account','data' => ['setAccounts' => $account_Details]]); ?>
<?php $component->withName('card-account'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes(['setAccounts' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($account_Details)]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4)): ?>
<?php $component = $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4; ?>
<?php unset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4); ?>
<?php endif; ?>
                    </div>
                </div>
            </div>
        </div>

        <?php if($user->branch_id == null): ?>
            <?php if(in_array(13, $rollper)): ?>
                <div class="col-lg-6 col-sm-12">
                    <div class="card">
                        <div class="card-header border-0">
                            <div class="d-flex justify-content-between">
                                <h3 class="card-title" style="color:green; font-weight: bold">Branch Stock</h3>
                                <a class="btn btn-xs btn-info"
                                    href="<?php echo e(route('inventorySetup.currentStock.index')); ?>">View
                                    Report</a>
                            </div>
                        </div>
                        <div class="panel panel-default">

                            <div class="panel-body">
                                <canvas id="canvas" height="148"></canvas>
                            </div>
                        </div>
                    </div>
                </div>
            <?php endif; ?>

            <?php if(in_array(14, $rollper)): ?>
                <div class="col-lg-6 col-sm-12">
                    <div class="card">
                        <div class="card-header border-0">
                            <div class="d-flex justify-content-between">
                                <h3 class="card-title" style="color:green; font-weight: bold">Full Summary</h3>
                            </div>
                        </div>
                        <div class="card-body">
                            <div class="chart-responsive">
                                <div id="piechart" style="width: 600px; height: 309px;"></div>
                            </div>
                        </div>
                    </div>
                </div>
            <?php endif; ?>

            <?php if(in_array(15, $rollper)): ?>
                <div class="col-lg-6 col-sm-12">
                    <div class="card">
                        <div class="card-header border-0">
                            <div class="d-flex justify-content-between">
                                <h3 class="card-title" style="color:green; font-weight: bold">Pending Requisitions :
                                    Branch</h3>
                            </div>
                        </div>
                        <div class="card-body">
                            <div class="chart-responsive">
                                <div class="row">

                                    <div class="col-lg-4 text-center">
                                        <a href="<?php echo e(route('inventorySetup.purchaserequisition.index')); ?>">

                                            <input type="text" class="knob" value="<?php echo e($prPending); ?>"
                                                data-skin="tron" data-thickness="0.2" data-width="90" data-height="90"
                                                data-fgColor="green" data-readonly="true">
                                            <div class="knob-label">
                                                PR
                                            </div>
                                        </a>
                                    </div>
                                    <div class="col-lg-4 text-center">
                                        <a href="<?php echo e(route('inventorySetup.purchaseorder.index')); ?>">
                                            <input type="text" class="knob" value="<?php echo e($poPending); ?>"
                                                data-skin="tron" data-thickness="0.2" data-width="90" data-height="90"
                                                data-fgColor="orange" data-readonly="true">
                                            <div class="knob-label">
                                                PO
                                            </div>
                                        </a>
                                    </div>
                                    <div class="col-lg-4 text-center">
                                        <a href="<?php echo e(route('inventorySetup.purchase.pvindex')); ?>">
                                            <input type="text" class="knob" value="<?php echo e($pvPending); ?>"
                                                data-skin="tron" data-thickness="0.2" data-width="90" data-height="90"
                                                data-fgColor="red" data-readonly="true">
                                            <div class="knob-label">
                                                PV
                                            </div>
                                        </a>
                                    </div>
                                </div>

                            </div>
                        </div>
                    </div>
                    <div class="card" style="height: 269px">
                        <div class="card-header border-0">
                            <div class="d-flex justify-content-between">
                                <h3 class="card-title" style="color: blue; font-weight: bold"> Pending Requisitions :
                                    Project</h3>
                            </div>
                        </div>
                        <div class="card-body">
                            <div class="chart-responsive">
                                <div class="row">
                                    <div class="col-lg-6 text-center">
                                        <a href="<?php echo e(route('project.RequisitionAction.index')); ?>">
                                            <input type="text" class="knob" value="<?php echo e($PendingReq); ?>"
                                                data-skin="tron" data-thickness="0.2" data-width="120" data-height="120"
                                                data-fgColor="green" data-readonly="true">
                                            <div class="knob-label">
                                                Requisitions
                                            </div>
                                        </a>
                                    </div>
                                    <div class="col-lg-6 text-center">
                                        <a href="<?php echo e(route('project.projectreturn.index')); ?>">
                                            <input type="text" class="knob" value="<?php echo e($PendingReturn); ?>"
                                                data-skin="tron" data-thickness="0.2" data-width="120" data-height="120"
                                                data-fgColor="orange" data-readonly="true">
                                            <div class="knob-label">
                                                Return
                                            </div>
                                        </a>
                                    </div>

                                </div>

                            </div>
                        </div>
                    </div>
                </div>
            <?php endif; ?>




            <!-- ## Rabbi Work -->
            <?php if(in_array(16, $rollper)): ?>
                <div class="col-lg-6 col-sm-12">
                    <div class="card">
                        <div class="card-header border-0">
                            <div class="d-flex justify-content-between">
                                <h3 class="card-title" style="color:green; font-weight: bold">Pending Stock Manage :
                                    Branch</h3>
                            </div>
                        </div>
                        <div class="card-body">
                            <div class="chart-responsive">
                                <div class="row">

                                    <div class="col-lg-6 text-center">
                                        <a href="<?php echo e(route('inventorySetup.transfer.index')); ?>">
                                            <input type="text" class="knob" value="<?php echo e($trPending); ?>"
                                                data-skin="tron" data-thickness="0.2" data-width="90" data-height="90"
                                                data-fgColor="green" data-readonly="true">
                                            <div class="knob-label">
                                                Transfer
                                            </div>
                                        </a>
                                    </div>

                                    <div class="col-lg-6 text-center">
                                        <a href="<?php echo e(route('inventorySetup.stockAdjustment.index')); ?>">
                                            <input type="text" class="knob" value="<?php echo e($adjPending); ?>"
                                                data-skin="tron" data-thickness="0.2" data-width="90" data-height="90"
                                                data-fgColor="orange" data-readonly="true">
                                            <div class="knob-label">
                                                Adjustment
                                            </div>
                                        </a>
                                    </div>
                                </div>

                            </div>
                        </div>
                    </div>
                </div>
            <?php endif; ?>
        <?php endif; ?>
    </div>
    

    


    <script>
        var url = "<?php echo e(url('admin/chart/chart')); ?>";
        var branchCode = new Array();
        var Labels = new Array();
        var quantity = new Array();
        $(document).ready(function() {
            $.get(url, function(response) {

                console.log(response);
                response.forEach(function(data) {
                    branchCode.push(data.branchCode);
                    Labels.push(data.stockName);
                    quantity.push(data.quantity);
                });
                var ctx = document.getElementById("canvas").getContext('2d');
                var myChart = new Chart(ctx, {
                    type: 'bar',
                    data: {
                        labels: branchCode,
                        datasets: [{
                            label: 'Quantity',
                            data: quantity,
                            borderWidth: 1
                        }]
                    },
                    options: {
                        scales: {
                            yAxes: [{
                                ticks: {
                                    beginAtZero: true
                                }
                            }]
                        }
                    }
                });
            });
        });
    </script>


    <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
    <script type="text/javascript">
        google.charts.load('current', {
            'packages': ['corechart']
        });
        google.charts.setOnLoadCallback(drawChart);

        function drawChart() {

            var data = google.visualization.arrayToDataTable([
                ['Task', 'Hours per Day'],
                ['Purchase', {
                    {
                        $purchase
                    }
                }],
                ['Sale', {
                    {
                        $sale
                    }
                }],
                ['Expense', {
                    {
                        $expense
                    }
                }],

            ]);

            var options = {
                title: 'Summary'
            };

            var chart = new google.visualization.PieChart(document.getElementById('piechart'));

            chart.draw(data, options);
        }
    </script>

    <script>
        $(function() {
            /* jQueryKnob */

            $('.knob').knob({

                draw: function() {

                    // "tron" case
                    if (this.$.data('skin') == 'tron') {

                        var a = this.angle(this.cv) // Angle
                            ,
                            sa = this.startAngle // Previous start angle
                            ,
                            sat = this.startAngle // Start angle
                            ,
                            ea // Previous end angle
                            ,
                            eat = sat + a // End angle
                            ,
                            r = true

                        this.g.lineWidth = this.lineWidth

                        this.o.cursor &&
                            (sat = eat - 0.3) &&
                            (eat = eat + 0.3)

                        if (this.o.displayPrevious) {
                            ea = this.startAngle + this.angle(this.value)
                            this.o.cursor &&
                                (sa = ea - 0.3) &&
                                (ea = ea + 0.3)
                            this.g.beginPath()
                            this.g.strokeStyle = this.previousColor
                            this.g.arc(this.xy, this.xy, this.radius - this.lineWidth, sa, ea, false)
                            this.g.stroke()
                        }

                        this.g.beginPath()
                        this.g.strokeStyle = r ? this.o.fgColor : this.fgColor
                        this.g.arc(this.xy, this.xy, this.radius - this.lineWidth, sat, eat, false)
                        this.g.stroke()

                        this.g.lineWidth = 2
                        this.g.beginPath()
                        this.g.strokeStyle = this.o.fgColor
                        this.g.arc(this.xy, this.xy, this.radius - this.lineWidth + 1 + this.lineWidth *
                            2 / 3, 0, 2 * Math.PI, false)
                        this.g.stroke()

                        return false
                    }
                }
            })
            /* END JQUERY KNOB */

            //INITIALIZE SPARKLINE CHARTS
            var sparkline1 = new Sparkline($('#sparkline-1')[0], {
                width: 240,
                height: 70,
                lineColor: '#92c1dc',
                endColor: '#92c1dc'
            })
            var sparkline2 = new Sparkline($('#sparkline-2')[0], {
                width: 240,
                height: 70,
                lineColor: '#f56954',
                endColor: '#f56954'
            })
            var sparkline3 = new Sparkline($('#sparkline-3')[0], {
                width: 240,
                height: 70,
                lineColor: '#3af221',
                endColor: '#3af221'
            })

            sparkline1.draw([1000, 1200, 920, 927, 931, 1027, 819, 930, 1021])
            sparkline2.draw([515, 519, 520, 522, 652, 810, 370, 627, 319, 630, 921])
            sparkline3.draw([15, 19, 20, 22, 33, 27, 31, 27, 19, 30, 21])

        })
    </script>


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

<?php echo $__env->make('backend.layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH F:\XAMPP\htdocs\jubayer\resources\views/backend/pages/dashboard/index.blade.php ENDPATH**/ ?>