Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/demo.cartinsight.co/storage/framework/views/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/demo.cartinsight.co/storage/framework/views/f5d7644d3f6804d2bd71f21b9110438c.php
<?php $__env->startSection('title', $title); ?>
<?php $__env->startSection('css'); ?>
    <style>
        .table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
            padding: 4px 2px;
        }

        .has-warning {
            background-color: #fcf8e3 !important;
        }

        .has-danger {
            background-color: #f2dede !important;
        }

        .title-td {
            text-align: left !important;
        }

        .checkbox-filters .form-group {
            padding-top: 10px;
            margin-bottom: 0;
        }

        .period {
            display: block;
            font-size: 20px;
            font-weight: 600;
        }
    </style>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content_header'); ?>
    <?php $__env->startComponent('components.content_header'); ?>
        <?php $__env->slot('page_title'); ?>
            <?php echo e($title); ?>

        <?php $__env->endSlot(); ?>
        <?php $__env->slot('breadcrumb'); ?>
            <?php echo e(Breadcrumbs::render('wooCommerce_forecasting_low_stock')); ?>

        <?php $__env->endSlot(); ?>
    <?php echo $__env->renderComponent(); ?>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
    <?php $__env->startComponent('components.box', ['box_class'=>'box-primary']); ?>
        <div class="">
            <form id="filters-form">
                <div class="row">
                    <div class="col-md-2">
                        <?php echo CoralsForm::date('from','Order Date From',false, request()->get('from', now()->subMonths(3)->toDateString())); ?>

                    </div>
                    <div class="col-md-2">
                        <?php echo CoralsForm::date('to','Order Date To', false,request()->get('to', now()->toDateString())); ?>

                    </div>
                    <div class="col-md-2">
                        <div class="form-group">
                            <label>Period</label>
                            <strong class="period"><?php echo e($period); ?> Days</strong>
                        </div>
                    </div>
                    <div class="col-md-2">
                        <?php echo CoralsForm::date('product_from','Product Created From',false, request()->get('product_from')); ?>

                    </div>
                    <div class="col-md-2">
                        <?php echo CoralsForm::date('product_to','Product Created To', false,request()->get('product_to')); ?>

                    </div>
                </div>
                <div class="row">
                    <div class="col-md-2">
                        <?php echo CoralsForm::select('stock','Stock Level',
                        ['sku'=> 'SKU', 'brand'=>'Brand', 'product' => 'Product'],
                        false, $stockLevel); ?>

                    </div>
                    <?php if(in_array($stockLevel, ['product','sku'])): ?>
                        <div class="col-md-2">
                            <?php echo CoralsForm::text('sku', 'WooCommerce::attributes.variation.sku',false,request()->get('sku')); ?>

                        </div>
                    <?php endif; ?>
                    <div class="col-md-2">
                        <?php echo CoralsForm::select('brand_id','WooCommerce::attributes.product.brand',
                            WooCommerceManager::getBrandsList(), false, request()->get('brand_id'), [], 'select2'); ?>

                    </div>
                    <?php if(in_array($stockLevel, ['product','sku'])): ?>
                        <div class="col-md-2">
                            <?php echo CoralsForm::select("product_id",  'WooCommerce::attributes.variation.product', [], false, [],
                            ['class'=>'select2-ajax',
                             'data'=>[
                                   'model'=>\Corals\Modules\WooCommerce\Models\Product::class,
                                   'columns'=> json_encode(['name', 'sku']),
                                   'selected'=>json_encode([request()->get('product_id')]),
                                   'key_column' => 'integration_id',
                                   'where'=>json_encode([
                                       ['field'=>'wc_products.status','operation'=>'=','value'=>'publish'],
                                   ]),
                             ]
                             ], 'select2'); ?>

                        </div>
                    <?php endif; ?>
                    <div class="col-md-2 checkbox-filters">
                        <input type='hidden' value='0' name='show_low_stock_only'>
                        <?php echo CoralsForm::checkbox('show_low_stock_only', 'Show Low Stock Only', request()->get('show_low_stock_only', 0)); ?>

                        <?php echo CoralsForm::checkbox('with_discontinued', 'Include Discontinued', request()->get('with_discontinued', 0)); ?>

                    </div>
                    <div class="col-md-2">
                        <div class="form-group">
                            <label style="display: block;">&nbsp;</label>
                            <?php echo e(\CoralsForm::button('<i class="fa fa-search"></i>', ['class' => 'btn btn-primary'],'submit')); ?>

                            <?php echo e(\CoralsForm::button('<i class="fa fa-eraser"></i>', ['class' => 'btn btn-default clear-filter'])); ?>

                            <?php echo e(\CoralsForm::button('<i class="fa fa-file-excel-o"></i>', ['class' => 'btn btn-success','name'=>'export','value'=>1], 'submit')); ?>

                        </div>
                    </div>
                </div>
            </form>
            <div class="table-responsive">
                <table class="table table-striped text-center result-table">
                    <thead>
                    <tr>
                        <?php if(in_array($stockLevel, ['product','sku'])): ?>
                            <th></th>
                        <?php endif; ?>
                        <?php if($stockLevel === 'sku'): ?>
                            <th><?php echo e(trans('WooCommerce::attributes.variation.sku')); ?></th>
                        <?php endif; ?>
                        <?php if(in_array($stockLevel, ['product','sku'])): ?>
                            <th><?php echo e(trans('WooCommerce::attributes.variation.product')); ?></th>
                        <?php endif; ?>
                        <th><?php echo e(trans('WooCommerce::attributes.variation.brand')); ?></th>
                        <?php if($stockLevel === 'sku'): ?>
                            <th><?php echo e(trans('WooCommerce::attributes.variation.wholesale_price'). '('.\Settings::get('wc_second_currency')['code'].')'); ?></th>
                            <th><?php echo e(trans('WooCommerce::attributes.variation.color')); ?></th>
                            <th><?php echo e(trans('WooCommerce::attributes.variation.size')); ?></th>
                            <th><?php echo e(trans('WooCommerce::attributes.variation.stock_status')); ?></th>
                            <th><?php echo e(trans('Corals::attributes.created_at')); ?></th>
                        <?php endif; ?>
                        <th><?php echo e(trans('WooCommerce::attributes.variation.buffer_quantity')); ?></th>
                        <th><?php echo e(trans('WooCommerce::attributes.variation.waiting_list_count')); ?></th>
                        <th><?php echo e(trans('WooCommerce::attributes.variation.stock_quantity')); ?></th>
                        <th><?php echo e(trans('WooCommerce::attributes.variation.replenishment_expected_qty')); ?></th>
                        <th>Reorder</th>
                        <th>Reorder(%)</th>
                        <th>Sales</th>
                        <th>Avg. SQ/M</th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php
                        $filtersQuery = http_build_query(request()->only(['show_low_stock_only','with_discontinued','from','to','product_from','product_to']));
                    ?>
                    <?php $__empty_1 = true; $__currentLoopData = $stockItems; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                        <?php if($item->product): ?>
                            <tr class="<?php echo e($item->product->discontinued?'has-danger':($item->qty_diff<0?'has-warning':'')); ?>">
                                <?php if(in_array($stockLevel, ['product','sku'])): ?>
                                    <td>
                                        <?php echo $item->present('image'); ?>

                                    </td>
                                <?php endif; ?>
                                <?php if($stockLevel === 'sku'): ?>
                                    <td class="title-td">
                                        <?php echo $item->present('sku'); ?>

                                    </td>
                                <?php endif; ?>
                                <?php if($stockLevel === 'product'): ?>
                                    <td class="title-td">
                                        <a href="<?php echo e($item->product->getShowURL()); ?>" target="_blank" class="m-r-5">
                                            <i class="fa fa-eye fa-fw"></i>
                                        </a>
                                        <a href="<?php echo e(url(sprintf('woocommerce/forecasting/stock-forecasting?stock=sku&product_id=%s&brand_id=%s&'.$filtersQuery,
                                                $item->product_id,$item->brand->id))); ?>">
                                            <?php echo $item->product->name; ?>

                                        </a>
                                    </td>
                                <?php elseif($stockLevel === 'sku'): ?>
                                    <td class="title-td">
                                        <?php echo $item->present('product'); ?>

                                    </td>
                                <?php endif; ?>
                                <td class="title-td">
                                    <a href="<?php echo e($item->brand->getShowURL()); ?>" target="_blank" class="m-r-5">
                                        <i class="fa fa-eye fa-fw"></i>
                                    </a>

                                    <a href="<?php echo e(url(sprintf('woocommerce/forecasting/stock-forecasting?stock=product&brand_id=%s&'.$filtersQuery,$item->brand->id))); ?>">
                                        <?php echo optional($item->brand)->name; ?>

                                    </a>
                                </td>
                                <?php if($stockLevel === 'sku'): ?>
                                    <td><?php echo $item->wholesale_price>0?\WooCommerceManager::convertAmountToSecondCurrency($item->wholesale_price):'-'; ?></td>

                                    <td><?php echo $item->present('color'); ?></td>
                                    <td><?php echo $item->present('size'); ?></td>
                                    <td><?php echo $item->present('stock_status'); ?></td>
                                    <td><?php echo $item->present('date_created'); ?></td>
                                <?php endif; ?>
                                <?php
                                    $item->bq_total = $item->product->discontinued?0:$item->bq_total;
                                ?>
                                <td><?php echo intval($item->bq_total); ?></td>
                                <td><?php echo intval($item->on_waiting_list); ?></td>
                                <td><?php echo intval($item->sq_total); ?></td>
                                <td><?php echo intval($item->replenishment_expected_qty); ?></td>
                                <td><?php echo e(intval($item->qty_diff)); ?></td>
                                <td><?php echo e($item->bq_total?round(($item->qty_diff/$item->bq_total)*100, 1):$item->bq_total); ?>

                                    %
                                </td>
                                <td><?php echo e(intval($item->sales)); ?></td>
                                <td><?php echo e(intval($item->monthly_requests_count)); ?></td>
                            </tr>
                        <?php endif; ?>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                        <tr>
                            <td class="empty-result-td text-center">
                                No Results found
                            </td>
                        </tr>
                    <?php endif; ?>
                    <tr>
                        <td colspan="<?php echo e($stockLevel === 'sku'?15:($stockLevel === 'brand'?7:9)); ?>"></td>
                        
                        
                        
                        
                        <td class="bg-info"><?php echo e($stockItems->sum('sales')); ?></td>
                        <td class="bg-info"><?php echo e($stockItems->sum('monthly_requests_count')); ?></td>
                    </tr>
                    </tbody>
                </table>
            </div>
            <?php if(request()->has('stock') && request('stock') !== 'brand'): ?>
                <div class="row">
                    <div class="col-md-12 text-center">
                        <div class="dataTables_paginate paging_simple_numbers" id="OrdersDataTable_paginate">
                            <ul class="pagination">
                                <li class="paginate_button page-item previous <?php echo e(request('page',1) == 1 ?'disabled':''); ?>"
                                    id="OrdersDataTable_previous">
                                    <a href="<?php echo e(route('stock-forecasting',
                                    array_merge(request()->except('page'),
                                    ['page'=> request('page',1)-1 ])
                                    )); ?>"
                                       aria-controls="OrdersDataTable" data-dt-idx="0" tabindex="0"
                                       class="page-link">Previous</a>
                                </li>
                                <li class="paginate_button page-item next <?php echo e($stockItems->count() < 50 ?"disabled":""); ?>"
                                    id="OrdersDataTable_next">
                                    <a href="<?php echo e(route('stock-forecasting',
                                    array_merge(request()->except('page'),
                                    ['page'=> request('page',1)+1 ])
                                    )); ?>"
                                       aria-controls="OrdersDataTable"
                                       data-dt-idx="8"
                                       tabindex="0"
                                       class="page-link">Next</a>
                                </li>
                            </ul>
                        </div>

                    </div>
                </div>
            <?php endif; ?>
        </div>
    <?php echo $__env->renderComponent(); ?>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('js'); ?>
    <script>
        $('.clear-filter').click(function (event) {
            event.preventDefault();

            $('#filters-form input, #filters-form select').val('').trigger('change');
            $('#filters-form').submit();
        });

        $('.empty-result-td').prop('colspan', $('.result-table thead th').length);

        let productsWhere = [
            {field: "wc_products.status", operation: "=", value: "publish"}
        ];

        let brandSelector = $('#brand_id');

        brandSelector.change(function (event) {
            let brand_id = $(this).val();

            let brandWhere = [...productsWhere];

            if (brand_id) {
                brandWhere.push({
                    field: 'wc_products.brand_id',
                    operation: '=',
                    value: brand_id,
                });
            }

            let productSelector = $("#product_id");

            productSelector.data('where', brandWhere);
        })

        brandSelector.trigger('change');
    </script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/corals/demo.woobi.io/vendor/corals/woocommerce-reporting/src/WooCommerce/resources/views/stock_forecasting/index.blade.php ENDPATH**/ ?>

Spamworldpro Mini