<?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>


    <section class="opay_wrap">
        <header class="header_top main_Wrap bg-white mb-0">
            <div class="inner">
                <a class="f-16" href="<?php echo e(URL::previous()); ?>"><i class="fa fa-angle-left"></i> My Orders</a>
            </div>
        </header>
        <div class="opay_body payid_wrap bank_card_page  Refer_Friend">
            <br>
            <h2 class="f-19 text-left pl-20 mb-3"><b>Orders</b></h2>
            <?php $__currentLoopData = $logs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $plan): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <div class="accout_page_body pt-0">
                    <div class="card">
                        <ul>
                            <li class="mb-0">
                                <a> <span class="left_text"><i class="fa fa-shopping-cart"></i> </span><span
                                        class="text_inner">₦<?php echo e(number_format($plan->amount)); ?>




                                        <small>Daily: <span
                                                class="txt-lit"><b>₦<?php echo e(number_format($plan->interest_amount)); ?></b></span></small>

                                        <small>Earned: <span
                                                class="txt-lit"><b>₦<?php echo e(number_format($plan->total_paid * $plan->interest_amount, 2)); ?></b></span></small>

                                        <small>Next Date: <span class="txt-lit"><b><?php
                                            $nextTime = \Carbon\Carbon::parse($plan->next_return_date);
                                        ?>

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

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

                                        <b> <?php echo e($plan->created_at); ?> </b>

                                    </span>
                                    <?php if($plan->status == 0): ?>
                                        <button type="button" class="theme_btn"><i class="fa fa-spinner"
                                                style="color: yellow;"></i></button>
                                    <?php elseif($plan->status == 1): ?>
                                        <button type="button" class="theme_btn"><i class="fa fa-check"
                                                style="color: white;"></i></button>
                                    <?php endif; ?>


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


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

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