HOME


Mini Shell 1.0
La Pieza.DO | Todo lo que buscas!

Bienvenido de nuevo!

Acceso Cuenta Delivery
DIR: /var/www/devs.lapieza.net/storage/framework/views/
Upload File :
Current File : /var/www/devs.lapieza.net/storage/framework/views/8e4a105aa9c2128e7116ba08b45d206976ca9158.php
<?php $__env->startSection('panel_content'); ?>
    <div class="card">
        <form class="" action="" id="sort_commission_history" method="GET">
            <div class="card-header row gutters-5">
                <div class="col">
                    <h5 class="mb-md-0 h6"><?php echo e(translate('Commission History')); ?></h5>
                </div>
                <div class="col-lg-2">
                    <div class="form-group mb-0">
                        <input type="text" class="form-control form-control-sm aiz-date-range" id="search"
                               name="date_range" <?php if(isset($date_range)): ?> value="<?php echo e($date_range); ?>"
                               <?php endif; ?> placeholder="<?php echo e(translate('Daterange')); ?>" autocomplete="off">
                    </div>
                </div>
                <div class="col-auto">
                    <div class="form-group mb-0">
                        <button type="submit" class="btn btn-primary"><?php echo e(translate('Filter')); ?></button>
                    </div>
                </div>
            </div>
        </form>
        <div class="card-body">
            <table class="table aiz-table mb-0">
                <thead>
                    <tr>
                        <th>ID</th> <!-- Nueva columna -->
                        <th>#</th>
                        <th data-breakpoints="lg"><?php echo e(translate('Order Code')); ?></th>
                        <th><?php echo e(__('Plataforma')); ?></th>
                        <th><?php echo e(__('Revendedor')); ?></th>
                        <th><?php echo e(__('ITBIS')); ?></th>
                        <th><?php echo e(translate('Earning')); ?></th>
                        <th data-breakpoints="lg"><?php echo e(translate('Created At')); ?></th>
                    </tr>
                </thead>
                <tbody>
                    <?php if($commission_history->isEmpty()): ?>
                        <tr>
                            <td colspan="8" class="text-center">No se encontraron datos</td>
                        </tr>
                    <?php else: ?>
                        <?php $__currentLoopData = $commission_history; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $history): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <tr>
                                <td><?php echo e($history->id); ?></td> <!-- Mostrando el id -->
                                <td><?php echo e(($key+1)); ?></td>
                                <td>
                                    <?php if(isset($history->order)): ?>
                                        <a href="<?php echo e(route('seller.orders.show', encrypt($history->order_id))); ?>"
                                           title="<?php echo e(translate('Order Details')); ?>"><?php echo e($history->order->code); ?></a>
                                    <?php else: ?>
                                        <span class="badge badge-inline badge-danger">
                                            <?php echo e(translate('Order Deleted')); ?>

                                        </span>
                                    <?php endif; ?>
                                </td>
                                <td><b>RD $<?php echo e(number_format($history->admin_commission ?? 0, 2)); ?></b></td>
                                <td><b>RD $<?php echo e(number_format($history->re_seller_earning ?? 0, 2)); ?></b></td>
                                <td><b>RD $<?php echo e(number_format($history->itbis ?? 0, 2)); ?></b></td>
                                <td><b>RD $<?php echo e(number_format($history->seller_earning ?? 0, 2)); ?></b></td>
                                <td><?php echo e($history->created_at); ?></td>
                            </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    <?php endif; ?>
                </tbody>
                <tfoot style="background-color: #2e294e; color: white;">
                    <?php if(!$commission_history->isEmpty()): ?>
                        <tr>
                            <td colspan="2">&nbsp;</td>
                            <td class="font-weight-bold fs-14">Totales:</td>
                            <td class="font-weight-bold fs-14">RD
                                $<?php echo e(number_format($commission_history->sum('admin_commission'), 2)); ?></td>
                            <td class="font-weight-bold fs-14">RD
                                $<?php echo e(number_format($commission_history->sum('re_seller_earning'), 2)); ?></td>
                            <td class="font-weight-bold fs-14">RD
                                $<?php echo e(number_format($commission_history->sum('itbis'), 2)); ?></td>
                            <td class="font-weight-bold fs-14">RD
                                $<?php echo e(number_format($commission_history->sum('seller_earning'), 2)); ?></td>
                            <td>&nbsp;</td>
                        </tr>
                    <?php endif; ?>
                </tfoot>
            </table>
            <div class="aiz-pagination mt-4">
                <?php if(!$commission_history->isEmpty()): ?>
                    <?php echo e($commission_history->links()); ?>

                <?php endif; ?>
            </div>
        </div>
    </div>
    <div class="modal fade" id="order_details" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
         aria-hidden="true">
        <div class="modal-dialog modal-dialog-centered modal-xl" role="document">
            <div class="modal-content">
                <div id="order-details-modal-body">
                </div>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>
    <script type="text/javascript">
        function sort_commission_history(el) {
            $('#sort_commission_history').submit();
        }

        function showModalData(value) {
            if (value) { // Valida que el valor no sea nulo o vacío
                $.post('<?php echo e(route('seller.orders.show', '')); ?>' + '/' + value, { // Agregar un valor dinámico
                    _token: AIZ.data.csrf,
                    order_id: value
                }, function (data) {
                    $('#order-details-modal-body').html(data);
                    $('#order_details').modal();
                    $('.c-preloader').hide();
                    AIZ.plugins.bootstrapSelect('refresh');
                });
            }
        }
    </script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('seller.layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/devs.lapieza.net/resources/views/seller/commission_history/index.blade.php ENDPATH**/ ?>