<?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(__('Add Expense')); ?> <?php $__env->endSlot(); ?>

    <div class="card shadow-sm">
        <div class="card-body">
            <form action="<?php echo e(route('expenses.store')); ?>" method="POST">
                <?php echo csrf_field(); ?>
                <div class="row g-3 mb-3">
                    <div class="col-md-4">
                        <label class="form-label fw-semibold"><?php echo e(__('Expense No')); ?></label>
                        <input type="text" name="expense_no" class="form-control" value="<?php echo e(old('expense_no', $nextExpenseNo)); ?>">
                    </div>
                </div>
                <div class="row g-3">
                    <div class="col-md-4">
                        <label class="form-label" for="expense_date"><?php echo e(__('Date')); ?></label>
                        <input id="expense_date" type="date" name="expense_date" class="form-control" value="<?php echo e(old('expense_date', now()->format('Y-m-d'))); ?>" required>
                    </div>
                    <div class="col-md-4">
                        <label class="form-label" for="expense_category_id"><?php echo e(__('Category')); ?></label>
                        <select id="expense_category_id" name="expense_category_id" class="form-select">
                            <option value=""><?php echo e(__('-- Select Category --')); ?></option>
                            <?php $__currentLoopData = $expenseCategories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $cat): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <option value="<?php echo e($cat->id); ?>" <?php echo e(old('expense_category_id') == $cat->id ? 'selected' : ''); ?>><?php echo e($cat->name); ?></option>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </select>
                    </div>
                    <div class="col-md-4">
                        <label class="form-label" for="frequency"><?php echo e(__('Frequency')); ?></label>
                        <select id="frequency" name="frequency" class="form-select" required>
                            <option value="one_time"><?php echo e(__('One Time')); ?></option>
                            <option value="monthly"><?php echo e(__('Monthly')); ?></option>
                            <option value="weekly"><?php echo e(__('Weekly')); ?></option>
                            <option value="yearly"><?php echo e(__('Yearly')); ?></option>
                        </select>
                    </div>
                </div>

                <div class="row g-3 mt-3">
                    <div class="col-md-4">
                        <label class="form-label" for="amount"><?php echo e(__('Amount')); ?></label>
                        <input id="amount" type="number" step="0.01" name="amount" class="form-control" value="<?php echo e(old('amount')); ?>" required>
                    </div>
                </div>

                <div class="mb-3 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>

                <button type="submit" class="btn btn-primary"><?php echo e(__('Save Expense')); ?></button>
                <a href="<?php echo e(route('expenses.index')); ?>" class="btn btn-secondary"><?php echo e(__('Cancel')); ?></a>
            </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/expenses/create.blade.php ENDPATH**/ ?>