
<?php $__env->startSection('content'); ?>
    <div class="row">
        <div class="col-md-3">
            <div class="card mini-stats-wid box-border">
                <div class="card-body">
                    <div class="media">
                        <div class="media-body">
                            <p class="text-muted font-weight-medium"><?php echo e(__('messages.ts')); ?></p>
                            <h4 class="mb-0"><?php echo e(formatAmount($sales['total'])); ?></h4>
                        </div>

                        <div class="mini-stat-icon avatar-sm rounded-circle bg-primary align-self-center">
                            <span class="avatar-title">
                                <i class="fas fa-money-bill-alt font-size-24"></i>
                            </span>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="col-md-3">
            <div class="card mini-stats-wid box-border">
                <div class="card-body">
                    <div class="media">
                        <div class="media-body">
                            <p class="text-muted font-weight-medium"><?php echo e(__('messages.tp')); ?></p>
                            <h4 class="mb-0"><?php echo e(formatAmount($purchases['total'])); ?></h4>
                        </div>

                        <div class="mini-stat-icon avatar-sm rounded-circle bg-primary align-self-center">
                            <span class="avatar-title">
                                <i class="bx bx-copy-alt font-size-24"></i>
                            </span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <div class="col-md-3">
            <div class="card mini-stats-wid box-border">
                <div class="card-body">
                    <div class="media">
                        <div class="media-body">
                            <p class="text-muted font-weight-medium"><?php echo e(__('messages.te')); ?></p>
                            <h4 class="mb-0"><?php echo e(formatAmount($expenses['total'])); ?></h4>
                        </div>

                        <div class="mini-stat-icon avatar-sm rounded-circle bg-primary align-self-center">
                            <span class="avatar-title">
                                <i class="mdi mdi-wallet-outline font-size-24"></i>
                            </span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <div class="col-md-3">
            <div class="card mini-stats-wid box-border">
                <div class="card-body">
                    <div class="media">
                        <div class="media-body">
                            <p class="text-muted font-weight-medium"><?php echo e(__('messages.tpl')); ?></p>
                            <h4 class="mb-0"><?php echo e(formatAmount($sales['total']-($purchases['total']+$expenses['total']))); ?></h4>
                        </div>

                        <div class="mini-stat-icon avatar-sm rounded-circle bg-primary align-self-center">
                            <span class="avatar-title">
                                <i class="bx bxs-pie-chart-alt font-size-24"></i>
                            </span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-md-3">
            <div class="card mini-stats-wid box-border">
                <div class="card-body">
                    <div class="media">
                        <div class="media-body">
                            <p class="text-muted font-weight-medium"><?php echo e(__('messages.ms')); ?></p>
                            <h4 class="mb-0"><?php echo e(formatAmount($sales['monthly'])); ?></h4>
                        </div>

                        <div class="mini-stat-icon avatar-sm rounded-circle bg-primary align-self-center">
                            <span class="avatar-title">
                                <i class="fas fa-money-bill-alt font-size-24"></i>
                            </span>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="col-md-3">
            <div class="card mini-stats-wid box-border">
                <div class="card-body">
                    <div class="media">
                        <div class="media-body">
                            <p class="text-muted font-weight-medium"><?php echo e(__('messages.mp')); ?></p>
                            <h4 class="mb-0"><?php echo e(formatAmount($purchases['monthly'])); ?></h4>
                        </div>

                        <div class="mini-stat-icon avatar-sm rounded-circle bg-primary align-self-center">
                            <span class="avatar-title">
                                <i class="bx bx-copy-alt font-size-24"></i>
                            </span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <div class="col-md-3">
            <div class="card mini-stats-wid box-border">
                <div class="card-body">
                    <div class="media">
                        <div class="media-body">
                            <p class="text-muted font-weight-medium"><?php echo e(__('messages.me')); ?></p>
                            <h4 class="mb-0"><?php echo e(formatAmount($expenses['monthly'])); ?></h4>
                        </div>

                        <div class="mini-stat-icon avatar-sm rounded-circle bg-primary align-self-center">
                            <span class="avatar-title">
                                <i class="mdi mdi-wallet-outline font-size-24"></i>
                            </span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <div class="col-md-3">
            <div class="card mini-stats-wid box-border">
                <div class="card-body">
                    <div class="media">
                        <div class="media-body">
                            <p class="text-muted font-weight-medium"><?php echo e(__('messages.mpl')); ?></p>
                            <h4 class="mb-0"><?php echo e(formatAmount($sales['monthly']-($purchases['monthly']+$expenses['monthly']))); ?></h4>
                        </div>

                        <div class="mini-stat-icon avatar-sm rounded-circle bg-primary align-self-center">
                            <span class="avatar-title">
                                <i class="bx bxs-pie-chart-alt font-size-24"></i>
                            </span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
   
    <div class="row">
        <div class="col-md-3">
            <div class="card mini-stats-wid box-border">
                <div class="card-body">
                    <div class="media">
                        <div class="media-body">
                            <p class="text-muted font-weight-medium"><?php echo e(__('messages.ds')); ?></p>
                            <h4 class="mb-0"><?php echo e(formatAmount($sales['daily'])); ?></h4>
                        </div>

                        <div class="mini-stat-icon avatar-sm rounded-circle bg-primary align-self-center">
                            <span class="avatar-title">
                                <i class="fas fa-money-bill-alt font-size-24"></i>
                            </span>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="col-md-3">
            <div class="card mini-stats-wid box-border">
                <div class="card-body">
                    <div class="media">
                        <div class="media-body">
                            <p class="text-muted font-weight-medium"><?php echo e(__('messages.dp')); ?></p>
                            <h4 class="mb-0"><?php echo e(formatAmount($purchases['daily'])); ?></h4>
                        </div>

                        <div class="mini-stat-icon avatar-sm rounded-circle bg-primary align-self-center">
                            <span class="avatar-title">
                                <i class="bx bx-copy-alt font-size-24"></i>
                            </span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <div class="col-md-3">
            <div class="card mini-stats-wid box-border">
                <div class="card-body">
                    <div class="media">
                        <div class="media-body">
                            <p class="text-muted font-weight-medium"><?php echo e(__('messages.de')); ?></p>
                            <h4 class="mb-0"><?php echo e(formatAmount($expenses['daily'])); ?></h4>
                        </div>

                        <div class="mini-stat-icon avatar-sm rounded-circle bg-primary align-self-center">
                            <span class="avatar-title">
                                <i class="mdi mdi-wallet-outline font-size-24"></i>
                            </span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <div class="col-md-3">
            <div class="card mini-stats-wid box-border">
                <div class="card-body">
                    <div class="media">
                        <div class="media-body">
                            <p class="text-muted font-weight-medium"><?php echo e(__('messages.dpl')); ?></p>
                            <h4 class="mb-0"><?php echo e(formatAmount($sales['daily']-($purchases['daily']+$expenses['daily']))); ?></h4>
                        </div>

                        <div class="mini-stat-icon avatar-sm rounded-circle bg-primary align-self-center">
                            <span class="avatar-title">
                                <i class="bx bxs-pie-chart-alt font-size-24"></i>
                            </span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
   
    
   
    
    <div class="row">
        <div class="col-md-12">
            <table class="table table-bordered table-striped">
                <thead>
                    <tr>
                        <th>#</th>
                        <th><?php echo e(__('messages.date/time')); ?></th>
                        <th><?php echo e(__('messages.branch')); ?></th>
                        <th><?php echo e(__('messages.invoice')); ?></th>
                        <th><?php echo e(__('messages.payment_type')); ?></th>
                        <th><?php echo e(__('messages.sub_total')); ?></th>
                        <th><?php echo e(__('messages.discount')); ?></th>
                        <th><?php echo e(__('messages.grand_total')); ?></th>
                        <th><?php echo e(__('messages.print')); ?></th>
                    </tr>
                </thead>
                <tbody>
                    <?php $__currentLoopData = $lastTenSales; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $sale): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <tr>
                            <td><?php echo e($loop->iteration); ?></td>
                            <td><?php echo e($sale->dated); ?></td>
                            <td><?php echo e($sale->branch->branch_name); ?></td>
                            <td><?php echo e($sale->invoice); ?></td>
                            <td><?php echo e($sale->payment_type); ?></td>
                            <td><?php echo e(formatAmount($sale->sub_total)); ?></td>
                            <td><?php echo e(formatAmount($sale->discount)); ?></td>
                            <td><?php echo e(formatAmount($sale->grand_total)); ?></td>
                            <td><a href="<?php echo e(route('sales.invoice',['id'=>$sale->invoice])); ?>" target="_blank" class="text-primary"><i class="fa fa-print"></i></a></td>
                        </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </tbody>

            </table>
        </div>
    </div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('customjs'); ?>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.template.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/craftada/iftikhar.appssoul.com/resources/views/admin/dashboard.blade.php ENDPATH**/ ?>