<?php $__env->startSection('title', 'Concessions'); ?>
<?php $__env->startSection('page_title', 'Concessions & Scholarships'); ?>
<?php $__env->startSection('breadcrumbs'); ?>
    <li class="breadcrumb-item"><a href="<?php echo e(route('dashboard')); ?>">Home</a></li><li class="breadcrumb-item active">Concessions</li>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('page_actions'); ?>
    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('fees.update')): ?><a href="<?php echo e(route('concessions.create')); ?>" class="btn btn-primary"><i class="bi bi-plus-lg me-1"></i>Add Concession</a><?php endif; ?>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
    <div class="card"><div class="card-body">
        <table class="table table-hover align-middle js-datatable">
            <thead><tr><th>Student</th><th>Scholarship</th><th>Applies To</th><th>Discount</th><th>Reason</th><th class="text-end">Actions</th></tr></thead>
            <tbody>
                <?php $__currentLoopData = $concessions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $c): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <tr>
                        <td><a href="<?php echo e(route('students.show', $c->student_id)); ?>" class="fw-semibold text-decoration-none"><?php echo e($c->student?->name); ?></a></td>
                        <td><span class="badge bg-soft-warning text-capitalize"><?php echo e(str_replace('_',' ',$c->scholarship_type)); ?></span></td>
                        <td class="small"><?php echo e($c->feeType?->name ?? 'All heads'); ?></td>
                        <td><span class="badge bg-soft-primary"><?php echo e($c->type === 'percentage' ? rtrim(rtrim($c->value,'0'),'.').'%' : 'Rs '.number_format($c->value)); ?></span></td>
                        <td class="small text-muted"><?php echo e($c->reason ?: '—'); ?></td>
                        <td class="text-end">
                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('fees.update')): ?><form method="POST" action="<?php echo e(route('concessions.destroy', $c)); ?>" class="d-inline" data-confirm="Remove concession?"><?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?><button class="btn btn-sm btn-light border text-danger"><i class="bi bi-trash"></i></button></form><?php endif; ?>
                        </td>
                    </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </tbody>
        </table>
    </div></div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home/u385418287/domains/itartificer.com/public_html/sms-erp/resources/views/fees/concessions/index.blade.php ENDPATH**/ ?>