<?php
    use Carbon\Carbon;
?>


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

<?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 ">
        <div class="col-md-12 col-sm-12">
            <div class="card card-box">
                <div class="card-head text-white " style="background-color:#3FCC7E;">
                    <header>Create Payment</header>
                </div>
                <div class="card-body" id="bar-parent">
                    <form method="post" action="<?php echo e(route('admin.payment.store')); ?>">
                        <?php echo csrf_field(); ?>
                        <div class="row">
                            <div class="col-md-6 col-sm-6">
                                
                                <div class="form-group">
                                    <label for="payment_type">Payment Gateway</label>
                                     <select name="payment_type" class="form-control  select2 " id="payment_type">
                                        <?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="form-group">
                                    <label for="payee_type">Payee Type</label>
                                    <select name="payee_type" class="form-control  select2 " id="payee_type">
                                        <option value="authority">Authority</option>
                                        <option value="farmer">Farmer</option>
                                        <option value="staff">Staff</option>
                                        <option value="company">Company</option>
                                        <option value="others">Others</option>
                                    </select>
                                </div>
                                <div class="form-group">
                                    <label for="expensehead_id ">Expense Head</label>
                                    <select name="expensehead_id" class="form-control  select2" id="expensehead_id">
                                        <?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 company">
                                    <label for="company">Select Company</label>
                                    <select name="company_id" id="company" class="form-control  select2 " >
                                        <?php $__currentLoopData = $companies; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $company): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <option></option>
                                            <option value="<?php echo e($company->id); ?>"><?php echo e($company->name); ?></option>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </select>
                                </div>
                                
                                <div class="form-group farmer">
                                    <label for="farmer">Select Farmer</label>
                                    <select name="farmer_id" id="farmer" class="form-control  select2 " >
                                        <?php $__currentLoopData = $farmers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $farmer): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <option></option>
                                            <option value="<?php echo e($farmer->id); ?>"><?php echo e($farmer->name); ?></option>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </select>
                                </div>

                                
                                <div class="form-group staff">
                                    <label for="staff">Select Staff</label>
                                    <select name="user_id" id="staff" class="form-control  select2 " >
                                        <?php $__currentLoopData = $users; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $user): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <option></option>
                                            <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-md-6 col-sm-6">

                                
                                <div class="form-group">
                                    <label for="payment_amount">Payment Amount</label>
                                    <input type="text" name="payment_amount" class="form-control" id="payment_amount" placeholder="Enter Payment Amount" value="<?php echo e(old('payment_amount')); ?>">
                                </div>
                                

                                <div class="form-group">
                                    <label for="reference">Reference / Bill / Receipt No</label>
                                    <input type="text" name="reference" class="form-control" id="reference" placeholder="Enter reference" value="<?php echo e(old('reference')); ?>">
                                </div>

                                <div class="form-group">
                                    <label for="simpleFormEmail">Receivd By</label>
                                    <input type="text" name="received_by" class="form-control" id="simpleFormEmail" placeholder="Enter Reciever name" value="<?php echo e(old('received_by')); ?>">
                                </div>
                                <div class="form-group">
                                    <label for="simpleFormEmail">Remarks</label>
                                    <textarea name="remarks" id="simpleFormEmail" class="form-control"><?php echo e(old('remarks')); ?></textarea>
                                </div>


                                <div class="form-group">
                                    <label class="">Payment 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="payment_date" value="<?php echo e(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.payment.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'); ?>
    
    <script src="<?php echo e(asset('js/payment-form.js')); ?>"></script>
    <!--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>

    <!-- data 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/payment/create.blade.php ENDPATH**/ ?>