<?php
    use Carbon\Carbon;
?>


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

<?php $__env->startPush('css'); ?>
   <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" />
   <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="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 Collection</header>
                </div>
                <div class="card-body" id="bar-parent">
                    <form method="post" action="<?php echo e(route('admin.collection.store')); ?>">
                        <?php echo csrf_field(); ?>
                        <div class="row">
                            <div class="col-md-6 col-sm-6">
                                <div class="form-group">
                                    <label for="collection_type">Collect In</label>
                                    <select name="collection_type" class="form-control  select2 " id="collection_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="collect_type">Purpose Head</label>
                                    <select name="collect_type" class="form-control  select2 " id="collect_type">
                                        <?php $__currentLoopData = $purposeheads; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $purposehead): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <option value="<?php echo e($purposehead->id); ?>"><?php echo e($purposehead->name); ?></option>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </select>
                                </div>
                                <div class="form-group farmer">
                                    <label>Select Farmer</label>
                                    <select name="farmer_id" 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">
                                    <label for="collection_amount">Collection Amount</label>
                                    <input type="text" name="collection_amount" class="form-control" id="collection_amount" placeholder="Enter collection Amount" value="<?php echo e(old('collection_amount')); ?>">
                                </div>
                            </div>

                            <div class="col-md-6 col-sm-6">
                                <div class="form-group">
                                    <label for="given_by">Given By</label>
                                    <input type="text" name="given_by" class="form-control" id="given_by" placeholder="Enter giver name" value="<?php echo e(old('given_by')); ?>">
                                </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="remarks">Remarks</label>
                                    <textarea name="remarks" id="remarks" class="form-control"><?php echo e(old('remarks')); ?></textarea>
                                </div>
                                <div class="form-group">
                                    <label class="">Collection 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="collection_date" value="<?php echo e(old('collection_date')); ?>">
                                        <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.collection.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/collection-form.js')); ?>"></script>
    <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>
    <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/collection/create.blade.php ENDPATH**/ ?>