<?php $__env->startSection('title', 'Dashboard'); ?>
<?php $__env->startSection('page_title', 'Dashboard'); ?>

<?php $__env->startSection('content'); ?>
<div class="page-shell">
    <div class="filter-card">
        <form method="GET" action="<?php echo e(route('admin.dashboard')); ?>">
            <label for="d">Filter by date</label>
            <div class="row">
                <div class="col">
                    <select name="d" id="d">
                        <option value="7" <?php echo e($days === '7' ? 'selected' : ''); ?>>Last 7 days</option>
                        <option value="30" <?php echo e($days === '30' ? 'selected' : ''); ?>>Last 30 days</option>
                        <option value="90" <?php echo e($days === '90' ? 'selected' : ''); ?>>Last 90 days</option>
                        <option value="all" <?php echo e($days === 'all' ? 'selected' : ''); ?>>All time</option>
                    </select>
                </div>
                <div class="col actions">
                    <button class="btn primary" type="submit">Apply</button>
                </div>
            </div>
        </form>
    </div>

    <div class="cards">
        <div class="card kpi"><div class="icon">🖨️</div><div class="meta"><div class="label">Total Sales</div><div class="value">৳ <?php echo e(number_format($totalSales, 2)); ?></div></div></div>
        <div class="card kpi"><div class="icon">📈</div><div class="meta"><div class="label">Net</div><div class="value">৳ <?php echo e(number_format($net, 2)); ?></div></div></div>
        <div class="card kpi"><div class="icon">🧾</div><div class="meta"><div class="label">Invoice Due</div><div class="value">৳ <?php echo e(number_format($invoiceDue, 2)); ?></div></div></div>
        <div class="card kpi"><div class="icon">↩️</div><div class="meta"><div class="label">Total Sell Return</div><div class="value">৳ <?php echo e(number_format($totalSaleReturn, 2)); ?></div></div></div>
        <div class="card kpi"><div class="icon">🛍️</div><div class="meta"><div class="label">Total Purchase</div><div class="value">৳ <?php echo e(number_format($totalPurchase, 2)); ?></div></div></div>
        <div class="card kpi"><div class="icon">💸</div><div class="meta"><div class="label">Purchase Due</div><div class="value">৳ 0.00</div></div></div>
        <div class="card kpi"><div class="icon">↪️</div><div class="meta"><div class="label">Total Purchase Return</div><div class="value">৳ <?php echo e(number_format($totalSupplierReturn, 2)); ?></div></div></div>
        <div class="card kpi"><div class="icon">💵</div><div class="meta"><div class="label">Expense (<?php echo e($days === 'all' ? 'All Time' : 'Last '.$days.' Days'); ?>)</div><div class="value">৳ <?php echo e(number_format($totalExpense, 2)); ?></div></div></div>
    </div>

    <div class="card" style="min-height:420px;"></div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home/emdadtwa/erp.sef.it.com/resources/views/admin/dashboard.blade.php ENDPATH**/ ?>