<?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="d-flex flex-wrap justify-content-around">
                <div class="p-1 col-6 col-sm-3 mb-3">
                    <div class="card border-primary">
                        <div class="card-header text-center">فروش ۳۰ روز گذشته سایت</div>
                        <div class="card-body text-primary">
                            <h5 class="card-title text-center">
                                <span><?php echo e($last_N_DaysTotal); ?></span>
                                <small class="text-muted">تومان</small>
                            </h5>
                        </div>
                    </div>
                </div>
                <div class="p-1 col-6 col-sm-3 mb-3">
                    <div class="card border-primary">
                        <div class="card-header text-center">درآمد خالص ۳۰ روز گذشته سایت</div>
                        <div class="card-body text-primary">
                            <h5 class="card-title text-center">
                                <span><?php echo e($last_N_DaysTotalPure); ?></span>
                                <small class="text-muted">تومان</small>
                            </h5>
                        </div>
                    </div>
                </div>
                <div class="p-1 col-6 col-sm-3 mb-3">
                    <div class="card border-primary">
                        <div class="card-header text-center">کل فروش سایت</div>
                        <div class="card-body text-primary">
                            <h5 class="card-title text-center">
                                <span><?php echo e($lastDaysTotal); ?></span>
                                <small class="text-muted">تومان</small>
                            </h5>
                        </div>
                    </div>
                </div>
                <div class="p-1 col-6 col-sm-3 mb-3">
                    <div class="card border-primary">
                        <div class="card-header text-center">کل درآمد خالص سایت</div>
                        <div class="card-body text-primary">
                            <h5 class="card-title text-center">
                                <span><?php echo e($lastDaysTotalPure); ?></span>
                                <small class="text-muted">تومان</small>
                            </h5>
                        </div>
                    </div>
                </div>

                <div class="card col-12">
                    <div class="card-body p-0">
                        <figure class="highcharts-figure">
                            <div id="container"></div>
                        </figure>

                    </div>
                </div>


            </div>
        </section>
        <script src="https://code.highcharts.com/highcharts.js"></script>
        <script src="https://code.highcharts.com/modules/series-label.js"></script>
        <script src="https://code.highcharts.com/modules/exporting.js"></script>
        <script src="https://code.highcharts.com/modules/export-data.js"></script>
        <script src="https://code.highcharts.com/modules/accessibility.js"></script>

        <script>
            Highcharts.chart('container', {
                title: {
                    text: 'نمودار پرداخت ۳۰ روز گذشته'
                },
                tooltip : {
                    useHTML : true,
                    style : {
                        dir : 'ltr',
                        fontFamily : 'tahoma',
                    },
                    formatter : function () {
                        return (this.x ?  'تاریخ ' + this.x + '<br>' : '') + 'مبلغ ' + this.y
                    }
                },
                xAxis: {
                    categories: [<?php $__currentLoopData = $dates; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $date => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> "<?php echo e(IR_TimestampToDate($date,'Y-m-d')); ?>", <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>]
                },
                yAxis: {
                    title: {
                        text: 'مبلغ'
                    },
                    labels: {
                        formatter : function () {
                           return  'تومان' + this.value;
                        }
                    }
                },
                labels: {
                    items: [{
                        html: 'نسبت ۳۰ روز گذشته',
                        style: {
                            left: '50px',
                            top: '18px',
                            color: ( // theme
                                Highcharts.defaultOptions.title.style &&
                                Highcharts.defaultOptions.title.style.color
                            ) || 'black'
                        }
                    }]
                },
                series: [
                    {
                        type: 'column',
                        name: 'درصد سایت',
                        color : ' #58d68d ',
                        data: [<?php $__currentLoopData = $dates; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $date => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php if($summery->where('date',$date)->first()): ?> <?php echo e($summery->where('date',$date)->first()->totalSiteShare); ?>, <?php else: ?> 0, <?php endif; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>]
                    },
                    {
                        type: 'column',
                        color : ' #85929e ',
                        name: 'تراکنش موفق',
                        data: [<?php $__currentLoopData = $dates; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $date => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php if($summery->where('date',$date)->first()): ?> <?php echo e($summery->where('date',$date)->first()->totalAmount); ?>, <?php else: ?> 0 , <?php endif; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>]
                    },
                    {
                        type: 'column',
                        name: 'درصد متخصص',
                        color : ' #f5b041 ',
                        data: [<?php $__currentLoopData = $dates; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $date => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php if($summery->where('date',$date)->first()): ?> <?php echo e($summery->where('date',$date)->first()->totalSellerShare); ?>, <?php else: ?> 0, <?php endif; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>]
                    },
                    {
                        type: 'spline',
                        name: 'فروش',
                        data: [<?php $__currentLoopData = $dates; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $date => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php if($summery->where('date',$date)->first()): ?> <?php echo e($summery->where('date',$date)->first()->totalAmount); ?>, <?php else: ?> 0, <?php endif; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>],
                        marker: {
                            lineWidth: 2,
                            lineColor: '#5dade2' ,
                            fillColor: 'white'
                        }
                    },
                    {
                        type: 'pie',
                        name: 'نسبت',
                        data: [{
                            name: 'درصد سایت',
                            y: <?php echo e($last_N_DaysTotalPure); ?>,
                            color : ' #58d68d ',
                            // color: Highcharts.getOptions().colors[0] // Jane's color
                        }, {
                            name: 'درصد متخصص',
                            color : '#f5b041',
                            y: <?php echo e($last_N_DaysTotalPureSeller); ?>,
                            // color: Highcharts.getOptions().colors[1] // John's color
                        }, {
                            name: 'Joe',
                            y: 19,
                            color: Highcharts.getOptions().colors[2] // Joe's color
                        }],
                        center: [100, 80],
                        size: 100,
                        showInLegend: false,
                        dataLabels: {
                            enabled: false
                        }
                    }
                ]
            })
            ;

        </script>
     <?php $__env->endSlot(); ?>
 <?php if (isset($__componentOriginalfcbcb094a4e25784fc05a845b0fe2686439b0eb5)): ?>
<?php $component = $__componentOriginalfcbcb094a4e25784fc05a845b0fe2686439b0eb5; ?>
<?php unset($__componentOriginalfcbcb094a4e25784fc05a845b0fe2686439b0eb5); ?>
<?php endif; ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php /**PATH /home/foroshg1/laravel/Modules/Mehrab/Payment/Providers/../Resources/Views//Admin/info_payment.blade.php ENDPATH**/ ?>