![]() 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/ |
<?php $__env->startSection('title', $title); ?> <?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('css'); ?> <style> .table-head { background-color: #d3cefc; } .table-head a { color: #000; } .input-group-addon { padding: 0 5px; border: unset; } .input-group-addon .form-group { margin: 0; } .sm-gutters { margin-right: -5px; margin-left: -5px; } .sm-gutters .col, .sm-gutters [class*="col-"] { padding-right: 5px; padding-left: 5px; } th{ position: relative; } th a.sorting { position: absolute; top: 13px; } th a.sorting:hover .fa { color: white !important; } th a.sort-desc{ right: 10px; } th a.sort-asc{ right: 0; } .fa-sort-asc::before { content: "\2191" !important; } .fa-sort-desc::before { content: "\2193" !important; } .flex-item { flex-grow: 1; max-width: 25%; padding-right: 5px; } .flex-wrap { flex-wrap: wrap; } </style> <?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::select('per_page', 'Per Page', config('report.limit_per_page_options'), false, request()->get('per_page', 50), [ 'data-allow-clear' => 'false' ], 'select2'); ?> </div> <div class="col-md-2"> <?php echo CoralsForm::select('pre_defined_date', 'Predefined Date', \Reports::gerPredefinedDatesOptions(), false, request()->get('pre_defined_date', 'custom'), [], 'select2'); ?> </div> <div class="col-md-2"> <?php echo CoralsForm::date('start_date','Start Date',false, request('start_date', now()->subMonths(3)->toDateString())); ?> </div> <div class="col-md-2"> <?php echo CoralsForm::date('end_date','End Date', false,request('end_date', now()->toDateString())); ?> </div> </div> <div class="d-flex flex-wrap"> <div class="form-group flex-item"> <?php echo CoralsForm::select('stock','Stock Level',config('wooCommerce.stock_level'),false, request('stock')); ?> </div> <?php if(in_array(request('stock'), ['product','sku'])): ?> <div class="form-group flex-item"> <?php echo CoralsForm::text('filters[sku]', 'WooCommerce::attributes.variation.sku',false,request('filters.sku')); ?> </div> <?php endif; ?> <div class="form-group flex-item"> <?php echo CoralsForm::select('filters[brand_id]','WooCommerce::attributes.product.brand',WooCommerceManager::getBrandsList(), false, request('filters.brand_id'), [ 'id'=>'report-level-brand', ], 'select2'); ?> </div> <?php if(in_array(request('stock'), ['product','sku','color','size'])): ?> <div class="form-group flex-item"> <?php echo CoralsForm::select("filters[product_id]", 'WooCommerce::attributes.variation.product', [], false, [], ['class'=>'select2-ajax', 'id'=>'report-level-product', 'data'=>[ 'model'=>\Corals\Modules\WooCommerce\Models\Product::class, 'columns'=> json_encode(['name','sku']), 'selected'=>json_encode([request('filters.product_id')]), 'key_column' => 'integration_id', 'where'=>json_encode([ ['field'=>'wc_products.status','operation'=>'=','value'=>'publish'], ]), ] ], 'select2'); ?> </div> <?php endif; ?> <?php if(in_array(request('stock'), ['product','sku','color','size'])): ?> <div class="form-group flex-item"> <?php echo CoralsForm::select('category_id','WooCommerce::attributes.product.category',WooCommerceManager::getCategoriesList(), false, request('category_id'), [ 'id'=>'report-level-category', ], 'select2'); ?> </div> <?php endif; ?> <?php if(in_array(request('stock'),['stock','size'])): ?> <div class="form-group flex-item"> <?php echo CoralsForm::select('size','WooCommerce::attributes.variation.size',WooCommerceManager::getVariationSizes(), false, request('size'), [ 'id'=>'report-level-category', ], 'select2'); ?> </div> <?php endif; ?> <?php if(in_array(request('stock'),['stock','color'])): ?> <div class="form-group flex-item"> <?php echo CoralsForm::select('color','WooCommerce::attributes.variation.color',WooCommerceManager::getVariationColors(), false, request('color'), [ 'id'=>'report-level-category', ], 'select2'); ?> </div> <?php endif; ?> </div> <div class="d-flex flex-wrap"> <div class="form-group flex-item"> <label>Stock Qty</label> <div class="input-group"> <span class="input-group-addon"> <?php echo CoralsForm::radio('stock_qty_operator','',false, ['gte' => 'GTE', 'lte' => 'LTE'], request('stock_qty_operator','gte'),[]); ?> </span> <?php echo CoralsForm::number('stock_qty','',false,request('stock_qty'),['min'=>0,'max'=>99999999,'placeholder'=>'Stock Qty']); ?> </div> </div> <div class="form-group flex-item"> <label>STR (In)</label> <div class="input-group"> <span class="input-group-addon"> <?php echo CoralsForm::radio('str_operator','',false, ['gte' => 'GTE', 'lte' => 'LTE'], request('str_operator','gte'),[]); ?> </span> <?php echo CoralsForm::number('str_percentage','',false,request('str_percentage'),['min'=>0,'max'=>99999999,'placeholder'=>'In (%)']); ?> </div> </div> <div class="form-group flex-item"> <label>STR (Stock)</label> <div class="input-group"> <span class="input-group-addon"> <?php echo CoralsForm::radio('str2_operator','',false, ['gte' => 'GTE', 'lte' => 'LTE'], request('str2_operator','gte'),[]); ?> </span> <?php echo CoralsForm::number('str2_percentage','',false,request('str2_percentage'),['min'=>0,'max'=>99999999,'placeholder'=>'Stock (%)']); ?> </div> </div> <div class="form-group flex-item"> <label>In Qty</label> <div class="input-group"> <span class="input-group-addon"> <?php echo CoralsForm::radio('in_qty_operator','',false, ['gte' => 'GTE', 'lte' => 'LTE'], request('in_qty_operator','gte'),[]); ?> </span> <?php echo CoralsForm::number('in_qty','',false,request('in_qty'),['min'=>0,'max'=>99999999,'placeholder'=>'In Qty']); ?> </div> </div> <div class="form-group flex-item"> <label>Out Qty</label> <div class="input-group"> <span class="input-group-addon"> <?php echo CoralsForm::radio('out_qty_operator','',false, ['gte' => 'GTE', 'lte' => 'LTE'], request('out_qty_operator','gte'),[]); ?> </span> <?php echo CoralsForm::number('out_qty','',false,request('out_qty'),['min'=>0,'max'=>99999999,'placeholder'=>'Out Qty']); ?> </div> </div> </div> <?php echo $action_buttons; ?> </form> <div class="table-responsive"> <table class="table table-striped result-table"> <thead> <tr class="table-head"> <?php $__currentLoopData = $report->getHeaders(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $column=> $reportHeader): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php if(is_array($reportHeader)): ?> <th> <?php if(data_get($reportHeader,'sortable',false)): ?> <?php echo $report->columnSortHrefElement($reportHeader); ?> <?php endif; ?> <?php echo e($column); ?> </th> <?php else: ?> <th> <?php echo e($reportHeader); ?> </th> <?php endif; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </tr> </thead> <tbody> <?php $__empty_1 = true; $__currentLoopData = $items; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?> <tr> <?php $__currentLoopData = $report->getRowData($item); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <td><?php echo $data; ?></td> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </tr> <?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; ?> </tbody> </table> </div> <div class="row"> <div class="col-md-12 text-center"> <?php echo $items->appends(request()->except('page'))->links(); ?> </div> </div> </div> <?php echo $__env->renderComponent(); ?> <?php $__env->stopSection(); ?> <?php $__env->startSection('js'); ?> <script> $(document).on('click', '.report-level', function (event) { event.preventDefault(); let element = $(this); let level = element.data('level'); let id = element.data('id'); if (level === 'product') { $("#stock").val('sku').trigger('change'); selectViaAjax($('#report-level-' + level), id, false, function () { $('#filters-form').submit(); }) } else if (level === 'brand') { $("#stock").val('product').trigger('change'); $('#report-level-' + level).val(id).trigger('change'); $('#filters-form').submit(); } }); $('.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> <script> $('#filter_options').on('change', function () { let filterId = $('#filter_options').val(); if (filterId) { $("#delete_filter_button").removeClass('hidden'); $.get(`${base_url}/woocommerce/saved-report-filter/${filterId}/get-serialize-saved-params`, response => { window.location.search = response.data; }); } else { $("#delete_filter_button").addClass('hidden'); } }); $('#save_filter_button').on('click', function () { let filterForm = new FormData($('form')[0]); filterForm.delete('schedule'); $.post(`${base_url}/woocommerce/saved-report-filter`, { name: $(`[name='filter_name']`).val(), filter_selected: $(`[name='saved_filters']`).val(), report_key: 'str-report', query: new URLSearchParams(filterForm).toString(), schedule: $(`[name='schedule']`).val(), }).then(response => { window.location.search = response.filter; }).catch((response, textStatus, jqXHR) => { handleAjaxSubmitError(response, textStatus, jqXHR, $('form')[0]); }); }); $('#clear_filter_button').on('click', function () { window.location.search = ''; }); $('#delete_filter_button').on('click', function () { $.post(`${base_url}/woocommerce/delete-report-filter`, { hashed_id: $(`[name='saved_filters']`).val(), _method: 'DELETE' }, ).then(success => { window.location.search = ''; }).catch((err, textStatus, jqXHR) => { handleAjaxSubmitError(err, textStatus, jqXHR, $('form')[0]); }); }) $(() => { if ($(`[name='saved_filters']`).val()) { $("#delete_filter_button").removeClass('hidden'); } }) </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/str/index.blade.php ENDPATH**/ ?>