<?php if (isset($component)) { $__componentOriginalfcbcb094a4e25784fc05a845b0fe2686439b0eb5 = $component; } ?>
<?php $component = $__env->getContainer()->make(App\View\Components\AdminPanelLayout::class, []); ?>
<?php $component->withName('admin-panel-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes([]); ?>
     <?php $__env->slot('title'); ?>
        بررسی درخواست تسویه
     <?php $__env->endSlot(); ?>
     <?php $__env->slot('main'); ?>
        <!-- Checked checkbox -->
        <div class="content-header">
            <div class="container-fluid">
                <div class="row mb-2">
                    <div class="col-sm-6">
                        <h1 class="m-0 text-dark">بررسی درخواست تسویه</h1>
                    </div><!-- /.col -->
                    <div class="col-sm-6">
                        <ol class="breadcrumb float-sm-left">

                            <li class="breadcrumb-item">مدیریت پرداخت ها</li>
                            <li class="breadcrumb-item active">بررسی درخواست تسویه </li>
                        </ol>
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.container-fluid -->
        </div>
        <section class="content mt-sm-3">
            <div class="card p-0 card-primary col-md-8 mx-auto">
                <div class="card-header">
                    <h3 class="card-title"> بررسی درخواست تسویه</h3>
                </div>
                <?php if(session()->exists('status')): ?>
                    <div class="alert alert-danger col-md-11 mx-auto mt-2 mb-0" role="alert" id="alertAddCategory">
                        موجودی کاربر برای تسویه کافی نیست و به سقف عدم موجودی میرسد
                    </div>
                <?php endif; ?>

            <!-- /.card-header -->
                <!-- form start -->
                <form class="mt-3 p-2" action="<?php echo e(route('settlement.update',$settlement->id)); ?>" method="post">
                    <?php echo csrf_field(); ?>
                    <div class="form-group">
                        <label for="from_name">پرداخت از طرف</label>
                        <input type="text" name='from_name' class="form-control" id="from_name"
                               placeholder="تاسیسات اول" value="<?php if(is_array($settlement->from_name) && array_key_exists('name',$settlement->from_name)): ?> <?php echo e($settlement->to['name']); ?> <?php else: ?> <?php echo e(old('from_name','تاسیسات اول')); ?> <?php endif; ?>" >
                        <?php $__errorArgs = ['from_name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <div class="invalid">
                            <p class="text-danger" style="font-size: 0.8rem;padding-right: 0.2rem"><?php echo e($message); ?></p>
                        </div>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
                    <div class="form-group">
                        <label for="transaction_id">کد پیگیری پرداخت</label>
                        <input type="text" name='transaction_id' class="form-control" id="transaction_id"
                               placeholder="" value="<?php echo e(old('transaction_id',$settlement->transaction_id)); ?> " >
                        <?php $__errorArgs = ['transaction_id'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <div class="invalid">
                            <p class="text-danger" style="font-size: 0.8rem;padding-right: 0.2rem"><?php echo e($message); ?></p>
                        </div>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
                    <div class="form-group">
                        <label for="name">نام کامل صاحب حساب</label>
                        <input type="text" name='name' class="form-control" id="name"
                               placeholder="" value="<?php if(is_array($settlement->to) && array_key_exists('name',$settlement->to)): ?> <?php echo e($settlement->to['name']); ?> <?php else: ?> <?php echo e(old('name')); ?> <?php endif; ?>" required>
                        <?php $__errorArgs = ['name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <div class="invalid">
                            <p class="text-danger" style="font-size: 0.8rem;padding-right: 0.2rem"><?php echo e($message); ?></p>
                        </div>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
                    <div class="form-group">
                        <label for="cart">شماره کارت</label>
                        <input type="text" name='cart' class="form-control" id="cart"
                               placeholder="مانند : 6037989823234545" value="<?php if(is_array($settlement->to) && array_key_exists('cart',$settlement->to)): ?> <?php echo e($settlement->to['cart']); ?> <?php else: ?> <?php echo e(old('cart')); ?> <?php endif; ?>" required>
                        <?php $__errorArgs = ['cart'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <div class="invalid">
                            <p class="text-danger" style="font-size: 0.8rem;padding-right: 0.2rem"><?php echo e($message); ?></p>
                        </div>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
                    <div class="form-group">
                        <label for="shaba">شماره شبا</label>
                        <input type="text" name='shaba' class="form-control" id="shaba"
                               placeholder="مانند : IR0696000000010324200001" value="<?php if(is_array($settlement->to) && array_key_exists('shaba',$settlement->to)): ?> <?php echo e($settlement->to['shaba']); ?> <?php else: ?> <?php echo e(old('shaba')); ?> <?php endif; ?>" required>
                        <?php $__errorArgs = ['shaba'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <div class="invalid">
                            <p class="text-danger" style="font-size: 0.8rem;padding-right: 0.2rem"><?php echo e($message); ?></p>
                        </div>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
                    <div class="form-group">
                        <label for="">مبلغ درخواستی</label>
                        <input type="text" name='' class="form-control" id=""
                               placeholder="" value="<?php echo e(old('amount',$settlement->amount)); ?>" readonly>
                        <?php $__errorArgs = ['amount'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <div class="invalid">
                            <p class="text-danger" style="font-size: 0.8rem;padding-right: 0.2rem"><?php echo e($message); ?></p>
                        </div>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
                    <div class="form-group">
                        <label for="status">وضعیت تسویه</label>
                        <select class="form-control" name="status" id="status">
                            <option value="<?php echo e(\Mehrab\Payment\Models\Settlement::STATUS_PENDING); ?>" <?php if($settlement->status == \Mehrab\Payment\Models\Settlement::STATUS_PENDING): ?> selected <?php endif; ?>><?php echo app('translator')->get(\Mehrab\Payment\Models\Settlement::STATUS_PENDING); ?></option>
                            <option value="<?php echo e(\Mehrab\Payment\Models\Settlement::STATUS_SETTLED); ?>" <?php if($settlement->status == \Mehrab\Payment\Models\Settlement::STATUS_SETTLED): ?> selected <?php endif; ?>><?php echo app('translator')->get(\Mehrab\Payment\Models\Settlement::STATUS_SETTLED); ?></option>
                            <option value="<?php echo e(\Mehrab\Payment\Models\Settlement::STATUS_REJECTED); ?>" <?php if($settlement->status == \Mehrab\Payment\Models\Settlement::STATUS_REJECTED): ?> selected <?php endif; ?>><?php echo app('translator')->get(\Mehrab\Payment\Models\Settlement::STATUS_REJECTED); ?></option>
                            <option value="<?php echo e(\Mehrab\Payment\Models\Settlement::STATUS_CANCELED); ?>" <?php if($settlement->status == \Mehrab\Payment\Models\Settlement::STATUS_CANCELED): ?> selected <?php endif; ?>><?php echo app('translator')->get(\Mehrab\Payment\Models\Settlement::STATUS_CANCELED); ?></option>
                        </select>
                        <?php $__errorArgs = ['status'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <div class="invalid">
                            <p class="text-danger" style="font-size: 0.8rem;padding-right: 0.2rem"><?php echo e($message); ?></p>
                        </div>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
                    <div class="form-group">
                        <label for="report">یادداشت برای کاربر</label>
                        <textarea class="form-control" name="report" id="report"
                        ><?php if(is_array($settlement->reports)): ?> <?php $__currentLoopData = $settlement->reports; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $report): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php echo e($report); ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php endif; ?></textarea>
                        <?php $__errorArgs = ['report'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <div class="invalid">
                            <p class="text-danger" style="font-size: 0.8rem;padding-right: 0.2rem"><?php echo e($message); ?></p>
                        </div>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>

                    <div class="row mt-4 ">
                        <div class="col-sm-6 col-12">
                            <input type="text" class="form-control" disabled value="موجودی باقیمانده شخص : (<?php echo e($settlement->user->amount); ?>) تومان">
                        </div>
                    </div>

                    <button type="submit" class="btn btn-primary btn-block mt-3">ویرایش و ثبت</button>
            </form>
            </div>
        </section>
     <?php $__env->endSlot(); ?>
    <?php if(session()->get('status') == 'NotAllowedToSettlementRequest'): ?>
         <?php $__env->slot('linkScript'); ?>
            <script>
                Swal.fire({
                    icon: 'error',
                    text: 'موجودی کاربر برای تسویه کافی نیست و به سقف عدم موجودی میرسد',
                })
            </script>
         <?php $__env->endSlot(); ?>
    <?php endif; ?>

 <?php if (isset($__componentOriginalfcbcb094a4e25784fc05a845b0fe2686439b0eb5)): ?>
<?php $component = $__componentOriginalfcbcb094a4e25784fc05a845b0fe2686439b0eb5; ?>
<?php unset($__componentOriginalfcbcb094a4e25784fc05a845b0fe2686439b0eb5); ?>
<?php endif; ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php /**PATH C:\xampp\htdocs\newer\Modules\Mehrab\Payment\Providers/../Resources/Views//Admin/Settlement/edit_settlement.blade.php ENDPATH**/ ?>
