<?php $__env->startPush('style'); ?>
<?php $__env->stopPush(); ?>



<?php $__env->startSection('content'); ?>
    <script>
        "use strict"

        function createCountDown(elementId, sec) {
            var tms = sec;
            var x = setInterval(function() {
                var distance = tms * 1000;
                var days = Math.floor(distance / (1000 * 60 * 60 * 24));
                var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
                var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
                var seconds = Math.floor((distance % (1000 * 60)) / 1000);
                document.getElementById(elementId).innerHTML = days + "d: " + hours + "h " + minutes + "m " +
                    seconds + "s ";
                if (distance < 0) {
                    clearInterval(x);
                    document.getElementById(elementId).innerHTML = "COMPLETE";
                }
                tms--;
            }, 1000);
        }
    </script>



    <body>
        <div class="withdraw-wrap recharge-wrap">
            <div class="navbar">
                <span onclick="onBack()">
                    <i></i>
                </span>
                <span></span>



                <h4>Device Record</h4>
                <h5 class="ye">
                    <p>Total Order</p>
                    <div><?php echo e(number_format($total_order)); ?></div>
                </h5>


                <div data-v-cbbf7adf="" class=":uno: container-card relative rd-$card-radius p-$mg c-$btn-text scale-x">
                    <div data-v-cbbf7adf="" class="task-list"><!---->
                        <div data-v-e7ebc72f="" class="base-list a-t-2">
                            <?php $__currentLoopData = $logs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $plan): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <div style="margin-top: 20px; margin-bottom:25px;">
                                    <div class="balance">
                                        <span>₦<?php echo e(number_format($plan->amount)); ?></span>
                                    </div>

                                    <h3>

                                        <span>Income Cycle: <?php echo e($plan->total_return); ?> days</span><br>
                                        <span>Daily Income: ₦<?php echo e(number_format($plan->interest_amount)); ?></span><br>
                                        <span>Gross Return: ₦<?php echo e(number_format($plan->interest_amount * $plan->total_return, 2)); ?></span><br>
                                        <span>Total Paid: ₦<?php echo e(number_format($plan->total_paid * $plan->interest_amount, 2)); ?></span><br>
                                        <span>Next Date : </span><span>
                                            <?php
                                                $nextTime = \Carbon\Carbon::parse($plan->next_return_date);
                                            ?>

                                            <script>
                                                createCountDown('counter<?php echo $plan->id; ?>', <?php echo e($nextTime->diffInSeconds()); ?>);
                                            </script>

                                            <span class="m-0 text-success" id="counter<?php echo e($plan->id); ?>"></span>
                                        </span>

                                    </h3>
                                </div>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                        </div>
                    </div>
                </div>


                <div class="line"></div>



            </div>
    </body>

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

<?php echo $__env->make('layouts.users', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /Applications/AMPPS/www/forge/core/resources/views/templates/basic/user/investment_log.blade.php ENDPATH**/ ?>