<?php $__env->startSection('page-title', 'Dashboard'); ?>
<?php $__env->startPush('css'); ?>
    <style>
        .order-card {
            color: #fff;
        }

        .bg-c-blue {
            background: linear-gradient(45deg, #4099ff, #73b4ff);
        }

        .bg-c-green {
            background: linear-gradient(45deg, #2ed8b6, #59e0c5);
        }

        .bg-c-yellow {
            background: linear-gradient(45deg, #FFB64D, #ffcb80);
        }

        .bg-c-pink {
            background: linear-gradient(45deg, #FF5370, #ff869a);
        }


        .card {
            border-radius: 25px;
            -webkit-box-shadow: 0 1px 2.94px 0.06px rgba(4, 26, 55, 0.16);
            box-shadow: 0 1px 2.94px 0.06px rgba(4, 26, 55, 0.16);
            border: none;
            margin-bottom: 30px;
            -webkit-transition: all 0.3s ease-in-out;
            transition: all 0.3s ease-in-out;
        }

        .card .card-block {
            padding: 25px;
        }

        .order-card i {
            font-size: 26px;
        }

        .f-left {
            float: left;
        }

        .f-right {
            float: right;
        }
    </style>
<?php $__env->stopPush(); ?> 

<?php $__env->startSection('content'); ?>
    <?php 

        $total_invoice = App\Models\Invoice::sum('total_amount');
        $total_return = App\Models\ReturnTbl::sum('total_return');
        $total_purchase = App\Models\Purchase::sum('total_amount');
        $return_purchase = App\Models\ReturnPurchase::sum('total_return'); 

    ?>
    <div class=" ms-3" style="margin-left:20px;margin-top:90px;margin-bottom: 50px;"> 
        <form action="<?php echo e(route('dashboard')); ?>" method="GET" id="filterForm">
            <div class="row">
                <div class="col-md-2"></div>
                <div class="col-md-10 filter_design">
                    <ul class="nav justify-content-end">
                        <li class="nav-item">
                            <a class="nav-link active" aria-current="page" href="#">Today</a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="#">Yesterday</a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="#">Last 7 Days</a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="#">This Month</a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="#">This Year</a>
                        </li>
                    </ul>
                </div>
                
            </div>
        </form>
        <div class="row mt-3">

            


            <?php if(!check_permission('dashboard.dashboard')): ?>
                <div class="col-md-4 col-3">
                    <div class="card order-card before_work_height" style="background: #fcfcfd">
                        <div class="card-block">
                            <h6 class="text-left" style="font-size: 18px"><?php echo e($filter); ?> Sale</h6>
                            
                            <h4 class="text-left" style="font-size: 23px"><span>৳
                                    <?php echo e(number_format($today_invoice, 0)); ?> </span>
                            </h4>
                        </div>
                    </div>
                </div>
                <div class="col-md-4 col-3">
                    <div class="card order-card" style="background: #fcfcfd">
                        <div class="card-block">
                            <h6 class="m-b-20"><?php echo e($filter); ?> Purchase</h6>
                            <h4 class="text-right"><span>৳
                                    <?php echo e(number_format($today_purchase, 2)); ?></span></h4>
                        </div>
                    </div>
                </div>
                <div class="col-md-4 col-3">
                    <div class="card order-card" style="background: #fcfcfd">
                        <div class="card-block">
                            <h6 class="m-b-20"><?php echo e($filter); ?> Expense</h6>
                            <h4 class="text-right"><i class="fa fa-refresh f-left"></i><span>৳
                                    <?php echo e(number_format($expence, 2)); ?></span></h4>
                        </div>
                    </div>
                </div>
            <?php else: ?>
                <div class="col-md-4 col-xl-3">
                    <div class="card order-card before_work_height" style="background: #fcfcfd">
                        <div class="card-block">
                            <h6 class="text-left" style="font-size: 18px"><?php echo e($filter); ?> Sale</h6>
                            <h4 class="text-left" style="font-size: 23px"><span>৳
                                    <?php echo e(number_format($today_invoice, 0)); ?> </span>
                            </h4>
                        </div>
                    </div>
                </div>
                <div class="col-md-4 col-xl-3">
                    <div class="card order-card before_work_height2" style="background: #fcfcfd">
                        <div class="card-block">
                            <h6 class="text-left" style="font-size: 18px"><?php echo e($filter); ?> Purchase</h6>
                            <h4 class="text-left" style="font-size: 23px"><span>৳
                                    <?php echo e(number_format($today_purchase, 0)); ?> </span>
                            </h4>
                        </div>
                    </div>
                </div>
                <div class="col-md-4 col-xl-3">
                    <div class="card order-card before_work_height3" style="background: #fcfcfd">
                        <div class="card-block">
                            <h6 class="text-left" style="font-size: 18px"><?php echo e($filter); ?> Expense</h6>
                            <h4 class="text-left" style="font-size: 23px"><span>৳
                                    <?php echo e(number_format($expence, 2)); ?> </span>
                            </h4>
                        </div>
                    </div>
                </div>
                <?php if(check_permission('dashboard.dashboard')): ?>
                    <div class="col-md-4 col-xl-3">
                        <div class="card order-card before_work_height4 " style="background: #fcfcfd">
                            <div class="card-block">
                                <h6 class="text-left" style="font-size: 18px"><?php echo e($filter); ?> Profit</h6>
                                <h4 class="text-left" style="font-size: 23px"><span>৳
                                        <?php echo e(number_format($profit, 2)); ?></span>
                                </h4>
                            </div>
                        </div>
                    </div>
                <?php endif; ?>
            <?php endif; ?>

        </div>

        <div class="row">
            <div class="col-md-4 col-xl-4">
                <div class="card order-card" style="background: #fcfcfd">
                    <div class="card-block">
                        <h6 class="text-left" style="font-size: 18px">Total Purchase Due</h6>
                        <h4 class="text-left" style="font-size: 23px"><span>৳
                                <?php echo e(number_format($today_invoice, 0)); ?> </span>
                        </h4>
                    </div>
                    <p class="before_work"></p>
                    <div class="card-block">
                        <h6 class="text-left" style="font-size: 18px">Total Purchase Amount</h6>
                        <h4 class="text-left" style="font-size: 23px"><span>৳
                                <?php echo e(number_format($today_invoice, 0)); ?> </span>
                        </h4>
                    </div>
                    <p class="before_work_orange"></p>
                    <div class="card-block">
                        <h6 class="text-left" style="font-size: 18px">Total Product</h6>
                        <h4 class="text-left" style="font-size: 23px"><span>
                                <?php echo e(number_format($today_invoice, 0)); ?> </span>
                        </h4>
                    </div>
                </div>
            </div>

            <div class="col-md-4 col-xl-4">
                <div class="card order-card" style="background: #fcfcfd">
                    <div class="card-block">
                        <h6 class="text-left" style="font-size: 18px">Total Sales Due</h6>
                        <h4 class="text-left" style="font-size: 23px"><span>৳
                                <?php echo e(number_format($today_invoice, 0)); ?> </span>
                        </h4>
                    </div>
                    <p class="before_work2"></p>
                    <div class="card-block">
                        <h6 class="text-left" style="font-size: 18px">Total Sales Amount</h6>
                        <h4 class="text-left" style="font-size: 23px"><span>৳
                                <?php echo e(number_format($today_invoice, 0)); ?> </span>
                        </h4>
                    </div>
                    <p class="before_work_green"></p>
                    <div class="card-block">
                        <h6 class="text-left" style="font-size: 18px">Total Customer </h6>
                        <h4 class="text-left" style="font-size: 23px"><span>
                                <?php echo e(number_format($today_invoice, 0)); ?> </span>
                        </h4>
                    </div>
                </div>
            </div>
            <div class="col-md-4 col-xl-4">
                <div class="card order-card" style="background: #fcfcfd;border-radius:20px">
                    <div class="card-block">
                        <h6 class="text-left" style="font-size: 18px">Total Return Amount</h6>
                        <h4 class="text-left" style="font-size: 23px"><span>৳
                                <?php echo e(number_format($today_invoice, 0)); ?> </span>
                        </h4>
                    </div>
                    <p class="before_work3"></p>
                    <div class="card-block">
                        <h6 class="text-left" style="font-size: 18px">Available Stock Amount</h6>
                        <h4 class="text-left" style="font-size: 23px"><span>৳
                                <?php echo e(number_format($today_invoice, 0)); ?> </span>
                        </h4>
                    </div>
                    <p class="before_work_last"></p>
                    <div class="card-block">
                        <h6 class="text-left" style="font-size: 18px">Total Invoice </h6>
                        <h4 class="text-left" style="font-size: 23px"><span>
                                <?php echo e(number_format($today_invoice, 0)); ?> </span>
                        </h4>
                    </div>
                </div>
            </div>

        </div>

        
    </div>
    <script>
        $(document).ready(function() {
            $('#filterSelect').change(function() {
                $('#filterForm').submit();
            });
        });
    </script>
<?php $__env->stopSection(); ?>

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