<?php
    use Carbon\Carbon;
?>


<?php $__env->startSection('title', 'Create - Expense'); ?>

<?php $__env->startPush('css'); ?>
   <!--select2-->
   <link href="<?php echo e(asset('admin/assets/plugins/select2/css/select2.css')); ?>" rel="stylesheet" type="text/css" />
   <link href="<?php echo e(asset('admin/assets/plugins/select2/css/select2-bootstrap.min.css')); ?>" rel="stylesheet" type="text/css" />
   <!-- date time -->
   <link href="<?php echo e(asset('admin/assets/plugins/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css')); ?> " rel="stylesheet" media="screen">
<?php $__env->stopPush(); ?>

<?php $__env->startSection('content'); ?>
    <div class="page-bar">
        <div class="page-title-breadcrumb">

        </div>
    </div>
    <div class="row justify-content-center">
        <div class="col-md-6 col-sm-6">
            <div class="card card-box">
                <div class="card-head text-white " style="background-color:#3FCC7E;">
                    <header>Create Expense</header>
                </div>
                <div class="card-body " id="bar-parent">
                    <form method="post" action="<?php echo e(route('admin.expense.store')); ?>">
                        <?php echo csrf_field(); ?>

                        
                        <div class="form-group">
                            <label>Select Expense Head</label>
                            <select name="expensehead_id" class="form-control select2 ">
                                <?php $__currentLoopData = $expenseheads; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $expensehead): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option value="<?php echo e($expensehead->id); ?>"><?php echo e($expensehead->name); ?></option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                        </div>

                        
                        <div class="form-group">
                            <label for="amount">Expense Amount</label>
                            <input type="number" name="amount" class="form-control" id="amount" placeholder="Enter expense amount">
                        </div>

                        
                        <div class="form-group">
                            <label for="description">Expense Description</label>
                            <input type="textarea" name="description" class="form-control" id="description" placeholder="Enter expense description">
                        </div>

                        
                        <div class="form-group">
                            <label for="recipient_name">Expense Recipent Nmae</label>
                            <input type="text" name="recipient_name" class="form-control" id="recipient_name" placeholder="Enter expense recipient name">
                        </div>
                        
                        <div class="form-group">
                            <label for="recipient_name">Select Payment Gateway</label>
                            <select name="payment_gateway" id="payment_gateway" class="form-control select2">
                                <?php $__currentLoopData = \App\Models\PaymentGateway::get(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $gateway): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> 
                                    <option value="<?php echo e($gateway->id); ?>"><?php echo e($gateway->gateway_name); ?>(<?php echo e($gateway->gateway_account_number); ?>)</option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                        </div>

                        <div class="row">
                            <div class="col-6">
                                
                                <div class="form-group">
                                    <label>Select Expense Given Name</label>
                                    <select name="user_id" class="form-control select2 ">
                                        <?php $__currentLoopData = $users; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $user): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <option value="<?php echo e($user->id); ?>"><?php echo e($user->name); ?></option>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </select>
                                </div>
                            </div>
                            <div class="col-6">
                                
                                <div class="form-group">
                                    <label class="">Expense Date</label>
                                    <div class="input-group date form_date" data-date="<?php echo e(Carbon::now()); ?>" data-date-format="dd MM yyyy" data-link-field="dtp_input1">
                                        <input class="form-control" size="16" type="text" name="expense_date" value="<?php echo e(\Carbon\Carbon::now()->format('d M Y')); ?>">
                                        <span class="input-group-addon ml-2">
                                            <span class="fa fa-calendar"></span>
                                        </span>
                                    </div>
                                    <input type="hidden" id="dtp_input1" value="" />
                                </div>
                            </div>
                        </div>



                        <a class="btn deepPink-bgcolor m-t-15 waves-effect" href="<?php echo e(route('admin.expense.index')); ?>">BACK</a>
                        <button type="submit" class="btn btn-success m-t-15 waves-effect">SUBMIT</button>
                    </form>
                </div>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>

<?php $__env->startPush('js'); ?>
    <!--select2-->
    <script src="<?php echo e(asset('admin/assets/plugins/select2/js/select2.js')); ?>" ></script>
    <script src="<?php echo e(asset('admin/assets/js/pages/select2/select2-init.js')); ?>" ></script>
    <!-- date time -->
    <script src="<?php echo e(asset('admin/assets/plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js')); ?>"  charset="UTF-8"></script>
    <script src="<?php echo e(asset('admin/assets/plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker-init.js')); ?>"  charset="UTF-8"></script>
<?php $__env->stopPush(); ?>

<?php echo $__env->make('template.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/forazitradersbd/public_html/resources/views/admin/expense/create.blade.php ENDPATH**/ ?>