Current File : /home/tradevaly/public_html/storage/framework/views/de5c5b827106cb8b48088d4499a3fe463a866acd.php
<?php $__env->startPush('title'); ?> Invoice Details || Package <?php $__env->stopPush(); ?>
<?php $__env->startSection('css'); ?>
    <style>
        #invoice {
            margin-left: auto;
            margin-right: auto;
            background: #d0d0d044;
            position: relative;
            top: 0;
        }

        #invoice .table-bordered td, .table-bordered th {
            border: 1px solid #444 !important;
        }

        .card-title {
            font-size: 15px;
            margin: 0 0 7px;
            font-weight: 600;
            padding: 15px;
            background: #cdd7ef;
        }
    </style>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
    <?php $__env->startComponent('components.breadcrumb'); ?>
        <?php $__env->slot('li_1'); ?> Dashboard <?php $__env->endSlot(); ?>
        <?php $__env->slot('title'); ?> Invoice Details <?php $__env->endSlot(); ?>
    <?php echo $__env->renderComponent(); ?>
    <div class="row justify-content-center">
        <div class="col-11">
            <div class="card" id="invoice">
                <div class="card-body p-5">
                    <table style="width: 100%;">
                        <tr>
                            <td>
                                <?php
                                    $settings = \Illuminate\Support\Facades\DB::table('logo')->first();
                                ?>
                                <?php if(!empty($settings)): ?>
                                    <img
                                        src="<?php echo e(asset('storage/images/admin/logo/'.$settings->image)); ?>"
                                        height="60" width="200" alt="">
                                <?php else: ?>
                                    <img
                                        src="<?php echo e(asset('fav-icon.png')); ?>" height="60" width="200" alt="">
                                <?php endif; ?>
                            </td>
                            <td style="text-align: right">
                                <h3 class="text-uppercase text-dark fw-bold">
                                    Tradevaly
                                </h3>
                                <p><?php echo e(settings()->address); ?></p>
                            </td>
                        </tr>
                    </table>
                    <div class="card-title mb-4 d-flex align-items-center justify-content-between">
                        <h5 class="m-0">Invoice ID: <?php echo e($invoice->order_id); ?></h5>
                        <h5 class="m-0">Invoice Date: <?php echo e(date('F m Y', strtotime($invoice->created_at))); ?></h5>
                        <h5 class="m-0">
                            Payment Status:
                            <span
                                class="text-uppercase badge bg-<?php echo e($invoice->payment_status == 'paid' ? 'success':'danger'); ?>"><?php echo e($invoice->payment_status); ?></span>
                        </h5>
                    </div>
                    <div class="col-lg-4 col-12">
                        <h5>Invoiced To</h5>
                        <h6 class="mb-2"><b><?php echo e($invoice->user->industry); ?></b></h6>
                        <p class="mb-2"><b>Member ID:</b> <?php echo e($invoice->user->id); ?></p>
                        <p class="mb-2"><?php echo e($invoice->user->name); ?></p>
                        <p class="mb-2"><?php echo e($invoice->user->address); ?></p>
                        <p class="mb-2"><?php echo e($invoice->user->phone ?? ''); ?></p>
                        <p class="mb-2"><?php echo e($invoice->user->email); ?></p>
                    </div>
                    <table class="table table-bordered mt-4">
                        <thead>
                        <tr>
                            <th>Description</th>
                            <th>Start</th>
                            <th>End</th>
                            <th>Amount</th>
                            <th>Discount</th>
                            <th>Total Amount</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td>
                                <span
                                    class="text-capitalize"><?php echo e(str_replace('_',' ',$invoice->package->name)); ?></span>
                            </td>
                            <td>
                                <span
                                    class="text-capitalize">
                                        <?php echo e(\Carbon\Carbon::parse($invoice->start)->format('h:i A d M Y')); ?>

                                </span>
                            </td>
                            <td>
                                <span
                                    class="text-capitalize">
                                    <?php echo e(\Carbon\Carbon::parse($invoice->end)->format('h:i A d M Y')); ?>

                                </span>
                            </td>
                            <td><span
                                    class="text-uppercase">BDT</span> <?php echo e(number_format($invoice->package->price,2)); ?>

                            </td>
                            <td>BDT <?php echo e(number_format($invoice->transaction->discount_amount,2)); ?></td>
                            <td>
                                BDT <?php echo e(number_format(($invoice->amount),2)); ?>

                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
                <div class="col-lg-12 py-5 text-center">
                    <p><a href="">www.tradevaly.com.bd</a></p>
                </div>
            </div>
            <div class="col-lg-12 text-center my-5">
                <a class="btn btn-info my-2" href="<?php echo e(route('admin.subscriber.index')); ?>">
                    <i class="fa fa-arrow-left"></i> Back to list
                </a>
                <a href="javascript:" class="btn btn-success" id="downloadInvoice">
                    <i class="fa fa-download"></i> Download PDF
                </a>
                <a href="javascript:" class="btn btn-warning" onclick="printHandler()">
                    <i class="fa fa-print"></i> Print
                </a>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js"
            integrity="sha512-GsLlZN/3F2ErC5ifS5QtgpiJtWd43JWSuIgh7mbzZ8zBps+dvLusV+eNQATqgA/HdeKFVgA5v3S/cIrLF7QnIg=="
            crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script type="text/javascript">
        $(document).ready(function ($) {
            $('#downloadInvoice').on('click', function (event) {
                event.preventDefault();
                const element = document.getElementById("invoice");

                var options = {
                    margin: [0, 0, 0, 0],
                    filename: "invoice.pdf",
                    image: {type: "jpeg", quality: 0.98},
                    html2canvas: {scale: 3, y: 0, scrollY: 0},
                    jsPDF: {unit: "px", format: [800, 800], orientation: "portrait"},
                };
                html2pdf().set(options).from(element).save();
            })
        })

        function printHandler() {
            var printableContent = document.getElementById('invoice')
            var printContents = printableContent.innerHTML;
            var originalContents = document.body.innerHTML;
            document.body.innerHTML = printContents;
            window.setTimeout(function () {
                document.title = "Invoice"
                window.print();
                document.body.innerHTML = originalContents;
                window.location.reload()
            }, 1000);
        }
    </script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('backend.ayaan.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/tradevaly/public_html/resources/views/backend/pages/subscriber/invoice.blade.php ENDPATH**/ ?>