<?php $__env->startSection('content'); ?>
<div class="card">
    <div class="card-body">
        <h1 class="h4 mb-3">Opening Balance Setup</h1>
        <form method="POST" action="<?php echo e(route('setup.opening-balances.update')); ?>">
            <?php echo csrf_field(); ?>
            <div class="table-responsive">
                <table class="table table-striped align-middle">
                    <thead>
                        <tr>
                            <th>Account</th>
                            <th>Currency</th>
                            <th>Type</th>
                            <th class="text-end">Opening Balance</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $__empty_1 = true; $__currentLoopData = $accounts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $account): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                            <tr>
                                <td class="fw-semibold"><?php echo e($account->name); ?></td>
                                <td><?php echo e($account->currency->code); ?></td>
                                <td class="text-capitalize"><?php echo e($account->type); ?></td>
                                <td>
                                    <input class="form-control text-end atm-decimal" name="balances[<?php echo e($account->id); ?>]" inputmode="numeric" placeholder="0.00" value="<?php echo e(old('balances.' . $account->id, $account->balance)); ?>" required>
                                </td>

                            </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                            <tr>
                                <td class="text-muted text-center" colspan="4">Add accounts before setting opening balances.</td>
                            </tr>
                        <?php endif; ?>
                    </tbody>
                </table>
            </div>
            <?php if($accounts->isNotEmpty()): ?>
                <button class="btn btn-primary" type="submit">Update Balances</button>
            <?php endif; ?>
        </form>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH F:\christopher\currencychangerui\resources\views/setup/opening-balances.blade.php ENDPATH**/ ?>