<?php if (isset($component)) { $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54 = $attributes; } ?>
<?php $component = App\View\Components\AppLayout::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('app-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\App\View\Components\AppLayout::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
     <?php $__env->slot('header', null, []); ?> <?php echo e(__('New Bank Withdrawal')); ?> <?php $__env->endSlot(); ?>

    <div class="card shadow-sm" style="max-width: 640px;">
        <div class="card-body">
            <form action="<?php echo e(route('bank-withdrawals.store')); ?>" method="POST">
                <?php echo csrf_field(); ?>
                <?php
                    $selectedCurrencyId = old('currency_id', optional($currencies->first())->id);
                ?>

                <div class="row g-3">
                    <div class="col-md-6">
                        <label class="form-label" for="withdrawal_date"><?php echo e(__('Withdrawal Date')); ?> <span class="text-danger">*</span></label>
                        <input id="withdrawal_date" type="date" name="withdrawal_date" class="form-control <?php $__errorArgs = ['withdrawal_date'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                               value="<?php echo e(old('withdrawal_date', now()->format('Y-m-d'))); ?>" required>
                        <?php $__errorArgs = ['withdrawal_date'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?><div class="invalid-feedback"><?php echo e($message); ?></div><?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
                    <div class="col-md-6">
                        <label class="form-label" for="amount"><?php echo e(__('Amount')); ?> <span class="text-danger">*</span></label>
                        <input id="amount" type="number" step="0.01" name="amount" class="form-control <?php $__errorArgs = ['amount'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                               value="<?php echo e(old('amount')); ?>" placeholder="0.00" required>
                        <?php $__errorArgs = ['amount'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?><div class="invalid-feedback"><?php echo e($message); ?></div><?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
                </div>

                <div class="row g-3 mt-1">
                    <div class="col-md-6">
                        <label class="form-label" for="currency_id"><?php echo e(__('Currency')); ?></label>
                        <select id="currency_id" name="currency_id" class="form-select">
                            <?php $__currentLoopData = $currencies; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $currency): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <option value="<?php echo e($currency->id); ?>" <?php echo e((string) $selectedCurrencyId === (string) $currency->id ? 'selected' : ''); ?>>
                                    <?php echo e($currency->code); ?> - <?php echo e($currency->name); ?>

                                </option>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </select>
                    </div>
                    <div class="col-md-6">
                        <label class="form-label" for="bank_account"><?php echo e(__('Bank Account')); ?></label>
                        <input id="bank_account" type="text" name="bank_account" class="form-control"
                               value="<?php echo e(old('bank_account')); ?>" placeholder="<?php echo e(__('e.g. Card Sales Account')); ?>">
                    </div>
                </div>

                <div class="mt-3">
                    <label class="form-label" for="reference"><?php echo e(__('Reference')); ?></label>
                    <input id="reference" type="text" name="reference" class="form-control"
                           value="<?php echo e(old('reference')); ?>" placeholder="<?php echo e(__('Transaction / cheque no.')); ?>">
                </div>

                <div class="mt-3">
                    <label class="form-label" for="notes"><?php echo e(__('Notes')); ?></label>
                    <textarea id="notes" name="notes" class="form-control" rows="3"><?php echo e(old('notes')); ?></textarea>
                </div>

                <div class="mt-4">
                    <button type="submit" class="btn btn-primary">
                        <i class="bi bi-save me-1"></i><?php echo e(__('Save Withdrawal')); ?>

                    </button>
                    <a href="<?php echo e(route('bank-withdrawals.index')); ?>" class="btn btn-secondary ms-2"><?php echo e(__('Cancel')); ?></a>
                </div>
            </form>
        </div>
    </div>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $attributes = $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $component = $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?>
<?php /**PATH C:\Users\anwar\OneDrive\Desktop\Babu KSA\software\restaurant-management\resources\views/bank_withdrawals/create.blade.php ENDPATH**/ ?>