<?php if (isset($component)) { $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4 = $component; } ?>
<?php $component = $__env->getContainer()->make(Illuminate\View\AnonymousComponent::class, ['view' => 'components.admin.layout','data' => ['hasExtraSettings' => false]] + (isset($attributes) ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('admin.layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['hasExtraSettings' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(false)]); ?>

    <div class="nk-block-head nk-block-head-sm">
        <div class="nk-block-between gy-2 gx-3">
            <div class="nk-block-head-content">
                <h3 class="nk-block-title page-title">Credit Or Debit Account</h3>
            </div>
        </div>
    </div>

    <?php if (isset($component)) { $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4 = $component; } ?>
<?php $component = $__env->getContainer()->make(Illuminate\View\AnonymousComponent::class, ['view' => 'components.admin.inpage-navigation','data' => []] + (isset($attributes) ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('admin.inpage-navigation'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4)): ?>
<?php $component = $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4; ?>
<?php unset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4); ?>
<?php endif; ?>

    <div class="nk-block">
        <div class="row g-gs">
            <div class="col-xxl-8 col-md-8">

                <h6 class="mb-3">Select User Account and Credit or Debit</h6>
                <div class="card">
                    <div class="card-inner">

                        <?php if($errors->any()): ?>
                            <div class="alert alert-danger alert-icon alert-dismissible">
                                <em class="icon ni ni-cross-circle"></em> <strong>Failed</strong>! <?php echo e($errors->first()); ?> <button class="close" data-dismiss="alert"></button>
                            </div>
                        <?php elseif(session('success')): ?>
                            <div class="alert alert-success alert-icon alert-dismissible">
                                <em class="icon ni ni-check-circle-cut"></em> <strong>Done</strong>! <?php echo e(session('success')); ?>. <button class="close" data-dismiss="alert"></button>
                            </div>
                        <?php endif; ?>

                        <form class="form-validate is-alter" action="<?php echo e(route('admin.add.debit-credit')); ?>" method="POST">
                            <?php echo csrf_field(); ?>
                            <div class="row g-gs">
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label class="form-label">Customer Name</label>
                                        <div class="form-control-wrap">
                                            <select name="user_id" class="form-select form-control form-control-lg" data-search="on" data-placeholder="Select User" required>
                                                <option value="" label="Select User"  selected disabled></option>
                                                <?php $__empty_1 = true; $__currentLoopData = usersList(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $user): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                                                    <option value="<?php echo e($user->id); ?>"><?php echo e($user->lastname.' '.$user->firstname); ?></option>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                                                    <option value="">No User Found</option>
                                                <?php endif; ?>
                                            </select>
                                        </div>
                                    </div> 

                                </div>
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label class="form-label">Transaction Type</label>
                                        <div class="form-control-wrap">
                                            <select name="action" id="action" class="form-select form-control form-control-lg" data-placeholder="Please select" required>
                                                <option value="" label="Please select" selected disabled></option>
                                                <option value="credit" <?php if(old('action')=='credit'): ?> selected <?php endif; ?>>Credit</option>
                                                <option value="debit" <?php if(old('action')=='debit'): ?> selected <?php endif; ?>>Debit</option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-6 debit-type" style="display: none">
                                    <div class="form-group">
                                        <label class="form-label">Debit Type</label>
                                        <div class="form-control-wrap">
                                            <select name="debit_type" id="debit-type" class="form-select form-control form-control-lg" data-placeholder="Please select">
                                                <option value="" label="Please select" selected disabled></option>
                                                <option value="card-withdrawal" <?php if(old('debit-type')=='card-withdrawal'): ?> selected <?php endif; ?>>Card Withdrawal</option>
                                                <option value="normal-withdrawal" <?php if(old('debit-type')=='debit'): ?> selected <?php endif; ?>>Normal Withdrawal</option>
                                                <option value="charges" <?php if(old('debit-type')=='charges'): ?> selected <?php endif; ?>>Charges</option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label class="form-label">Amount</label>
                                        <div class="form-control-wrap">
                                            <div class="form-text-hint">
                                                <span class="overline-title">USD</span>
                                            </div>
                                            <input type="number" name="amount" step="0.01" class="form-control" value="<?php echo e(old('amount')); ?>"  placeholder="Enter amount" required>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-6 account" style="display: none">
                                    <div class="form-group">
                                        <label class="form-label">Name</label>
                                        <div class="form-control-wrap">
                                            <input type="text" name="name" id="name" class="form-control" value="<?php echo e(old('name')); ?>"  placeholder="Sender/Receiver name" required>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-6 account" style="display: none">
                                    <div class="form-group">
                                        <label class="form-label">Bank Name</label>
                                        <div class="form-control-wrap">
                                            <input type="text" name="bank" id="bank" class="form-control" value="<?php echo e(old('bank')); ?>"  placeholder="Sender/Receiver bank name" required>
                                        </div>
                                    </div>
                                </div>

                                <div class="col-md-6 account" style="display: none">
                                    <div class="form-group">
                                        <label class="form-label">Account Number</label>
                                        <div class="form-control-wrap">
                                            <input type="text" name="account" id="account" class="form-control" value="<?php echo e(old('account')); ?>"  placeholder="Sender/Receiver account number" required>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label class="form-label">Transaction Date</label>
                                        <div class="form-control-wrap">
                                            <input type="text" class="form-control date-picker-alt"name="date" value="<?php echo e(old('date')); ?>"   placeholder="Eg. <?php echo e(date('Y-m-d')); ?>" data-date-format="yyyy-mm-dd">
                                        </div>
                                        <div class="form-note">Date format <code>yyyy-mm-dd</code></div>
                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label class="form-label">Transaction Time</label>
                                        <div class="form-control-wrap">
                                            <input type="text" class="form-control time-picker" name="time" value="<?php echo e(old('time')); ?>"  placeholder="Select time of transaction">
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label class="form-label">Reason</label>
                                        <div class="form-control-wrap">
                                            <input type="text" name="reason" class="form-control" value="<?php echo e(old('reason')); ?>" placeholder="Remark" required>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-12">
                                    <div class="form-group">
                                        <button type="submit" class="btn btn-sm btn-primary">Process</button>
                                    </div>
                                </div>
                            </div>
                        </form>

                    </div><!-- .card-inner -->
                </div><!-- .card -->
            </div>
        </div>
    </div>

    <?php $__env->startSection('page-level-scripts'); ?>
        <script src="/js/admin/credit-debit.js?ver=<?php echo e(rand(1,99999)); ?>"></script>
    <?php $__env->stopSection(); ?>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4)): ?>
<?php $component = $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4; ?>
<?php unset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4); ?>
<?php endif; ?>
<?php /**PATH /home/fivemill/secure.fivemillionmiles.net/resources/views/admin/credit-debit.blade.php ENDPATH**/ ?>