<?php $__env->startSection('content'); ?>

    <div class="dashboard_main">
        <div class="factor_sec mx-auto">
            <div class="dashboard_main_container_style  mx-auto">
                <h5 class="dashboard_main_container_style_header">پرداخت‌های شما</h5>
                <div class="alert alert-secondary  m-1 mb-2 <?php if( $errors->any() || session()->has('status')): ?> <?php else: ?> d-none <?php endif; ?> " role="alert">
                    <?php if($errors->any()): ?>
                        <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <?php echo e($error); ?><br>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    <?php endif; ?>
                    <?php if(session()->has('status')): ?>
                        <?php echo e(session()->get('status')); ?>

                    <?php endif; ?>
                </div>
                <div class="table_custom mx-auto">
                    <?php if($payments->count() > 0): ?>
                        <table>
                            <caption class="d-none">پرداخت‌های مربوطه</caption>
                            <thead>
                            <tr>
                                <th scope="col">کد سفارش</th>
                                <th scope="col">مبلغ(تومان)</th>
                                <th scope="col">روش پرداخت</th>
                                <th scope="col">کد رهگیری</th>
                                <th scope="col">تاریخ ثبت</th>
                                <th scope="col">وضعیت</th>
                            </tr>
                            </thead>
                            <tbody>
                            <?php $__currentLoopData = $payments; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $payment): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <tr>
                                    <td data-label="کد سفارش" class="persianumber">
                                        <?php echo e($payment->paymentable->code); ?>

                                    </td>
                                    <td data-label="مبلغ(تومان)" class="persianumber">
                                        <?php echo e($payment->amount); ?>

                                    </td>
                                    <td data-label="روش پرداخت" class="persianumber">
                                        <?php echo app('translator')->get($payment->gateway); ?>
                                    </td>
                                    <td data-label="کد رهگیری" class="persianumber">
                                        <?php echo e($payment->ref_id ?? '-'); ?>

                                    </td>
                                    <td data-label="تاریخ ثبت" class="persianumber">
                                        <?php echo e(IR_TimestampToDate($payment->created_at)); ?>

                                    </td>
                                    <td data-label="وضعیت">
                                      <?php echo app('translator')->get($payment->status); ?>
                                    </td>
                                </tr>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            <?php else: ?>
                                <div class="alert alert-primary" role="alert">
                                    پرداختی ثبت نشده است !
                                </div>
                            <?php endif; ?>
                            </tbody>
                        </table>
                </div>

                <?php echo e($payments->appends(request()->query())->links()); ?>


            </div>

        </div>


    </div>

<?php $__env->stopSection(); ?>

<?php echo $__env->make("Front::Layout.Panel.master", \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\newer\Modules\Mehrab\Front\Providers/../Resources/Views//Panel/payments.blade.php ENDPATH**/ ?>