Anons79 Mini Shell

Directory : /home/proudlyafrican/public_html/resources/views/general/
Upload File :
Current File : /home/proudlyafrican/public_html/resources/views/general/print_invoice.blade.php

<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>

<style>

    /* Set the background color of body to tan */


    /* On screens that are 992px or less, set the background color to blue */
    @media screen and (max-width: 992px) {
        body{
            font-size: 100px;
        }
        table{
            min-height:200px;
            font-size: 20px;
        }
        #delivery{
            margin-top: 50px;
        }
    }

    /* On screens that are 600px or less, set the background color to olive */
    @media screen and (max-width: 600px) {

        table{
            min-height:200px;
            font-size: 20px;
        }
        #delivery{
            margin-top: 50px;
        }
    }
</style>



<html>
<body style="font-size:13px;">
<div class="container" style="max-width: 780px;  min-height:500px; margin:0 auto;border: thick dashed #556fb5; padding:10px">

    <table width="100%">
        <tr>
            <td width="600px">
                <div  class="logotype" >
                    <div align="center">
                        <img  src="{{ url('public/general/logos/africa png 2_013939.jpg') }}" style="margin-left: 100px;  color:#fff; text-align: center; font-size:11px;" title="Logo">

                    </div>
                </div>
            </td>
            <td width="300px"><div style="background: #034c91;border-left: 15px solid #fff;padding-left: 30px;font-size: 26px;font-weight: bold;letter-spacing: -1px;height: 73px;line-height: 75px;color:white">Order invoice</div></td>
            <td></td>
        </tr>
    </table>
    <table width="100%" style="border-collapse: collapse; margin-top:20px;"><tr>
            <td widdth="50%" style="background:#ededed;padding:20px;">

                <strong>Date:</strong>

                <?php  $s = date("Y/m/d");
                $date = strtotime($s);
                ?>

                <?php  echo date('d-M-Y', $date); ?>
                <br><strong>Payment type:</strong> Credit Card<br><br>
            </td>
            <td style="background:#ede8e8;padding:20px;">
                <strong>Invoice Number:{{ $orders[0]->invoice_number }}</strong> <br>
            </td>
        </tr></table>
    <br><table width="100%"><tr>
            <td>
                <table><tr>
                        <td style="vertical-align: text-top;">
                            <!--              <div style="background: #ededed url(https://cdn0.iconfinder.com/data/icons/commerce-line-1/512/comerce_delivery_shop_business-07-128.png);width: 50px;height: 50px;margin-right: 10px;background-position: center;background-size: 42px;"></div>-->
                        </td>

                    </tr></table>
            </td>
            <td>
                <table>


                    <tr>
                        <td><div align="center" style="font-weight: bold"><b>Name:</b></div></td><td> {{ $orders[0]->first_name }}</td>
                    </tr>
                    <tr>
                    <tr>
                        <td><div align="center" style="font-weight: bold"><b>Delivery:</b></div></td>
                        <td>
                            {{ $orders[0]->address1 }}
                        </td>
                    </tr>
                    <tr>

                        <td></td>
                        <td>
                            {{ $orders[0]->address2 }}<br>

                            {{ $orders[0]->city }},{{ $orders[0]->zip }},<br>

                            {{ $orders[0]->country_name }}
                        </td>
                    </tr>

                    <tr>
                        <td><div align="center" style="font-weight: bold"><b>Phone:</b></div></td><td> {{ $orders[0]->phone }}</td>
                    </tr>

                    <tr>
                        <td><div align="center" style="font-weight: bold"><b>Email:</b></div></td><td> {{ $orders[0]->email }}</td>
                    </tr>








                </table>
            </td>
        </tr></table>


    <table width="100%" style="border-collapse: collapse;border-bottom:1px solid #eee; margin-top:30px;padding: 20px">
        <tr style="padding: 20px">
            <td width="40%" class="column-header" style="background:#eee;text-transform:uppercase;padding:15px;font-size:15px;border-right:1px solid #eee;"><b>Product</b></td>
            <td width="20%" class="column-header" style="background:#eee;text-transform:uppercase;padding:15px;font-size:15px;border-right:1px solid #eee;"><b>Unit</b></td>
            <td width="20%" class="column-header" style="background:#eee;text-transform:uppercase;padding:15px;font-size:15px;border-right:1px solid #eee;"><b>Price</b></td>
            <td width="20%" class="column-header" style="background:#eee;text-transform:uppercase;padding:15px;font-size:15px;border-right:1px solid #eee;"><b>Total</b></td>
        </tr>

        @foreach($products as $product)
        <tr style="padding: 20px">
            <td class="row" style="padding:7px 14px;border-left:1px solid #eee;border-right:1px solid #eee;border-bottom:1px solid #eee;">
                {{ $product->product_name }}</td>
            <td class="row" style="padding:7px 14px;border-left:1px solid #eee;border-right:1px solid #eee;border-bottom:1px solid #eee;">{{ $product->secondquantity }} {{ $product->unit }}</td>
            <td class="row" style="padding:7px 14px;border-left:1px solid #eee;border-right:1px solid #eee;border-bottom:1px solid #eee;">{{ $product->quantity}} <span style="color:#777">X</span> £.{{ $product->amount }} </td>
            <td class="row" style="padding:7px 14px;border-left:1px solid #eee;border-right:1px solid #eee;border-bottom:1px solid #eee;">£.{{ $product->amount }}</td>
        </tr>
        @endforeach();

    </table>

    <style>
        @media screen and (max-width: 992px){
            .mytable {
                min-height: 100px;
                font-size: 20px;
            }
        }

    </style>
    <br>
    <table width="100%" style="background:#eee;padding:10px; ">
        <tr>
            <td>
                <table width="300px" style="float:right" class="mytable">
                    <tr style="padding: 300px">
                        <td>
                            <strong>Sub-total:</strong></td>
                        <td style="text-align:right">£. {{ $orders[0]->subtotal }}</td>
                    </tr>
                    <tr>
                        <td><strong>Shipping fee:</strong></td>
                        <td style="text-align:right"> £.{{ $orders[0]->shipping_charge }}</td>
                    </tr>

                    @if($orders[0]->tax_amount>0)
                    <tr>
                        <td>
                            <strong>Tax {{ $orders[0]->tax_percentage }}%:</strong></td>
                        <td style="text-align:right">£.{{ $orders[0]->tax_amount }}
                        </td>
                    </tr>
                    @else
                    @endif


                    @if($orders[0]->discount>0)
                    <tr>
                        <td>
                            <strong>Discount :</strong></td>
                        <td style="text-align:right">£.{{ $orders[0]->discount }}
                        </td>
                    </tr>
                    @else
                    @endif

                    <tr>
                        <td><strong>Grand total:</strong></td>
                        <td style="text-align:right">£.<?php echo  number_format((float)$orders[0]->grandtotal, 2, '.', ''); ?></td>
                    </tr>
                </table>
            </td>
        </tr></table>

    <div class="alert" style="background: #ffd9e8;padding:20px;margin:20px 0;line-height:22px;color:#333"><span><strong>Description :</strong></span><br>
        This Invoice details was sent by Proudly African,  212 Terminus Road Eastbourne, East Sussex, BN21 3DF, +447485108269,
    </div>
    <div class="socialmedia" style="background:#eee;padding:20px; display:inline-block">Follow us online <small>

            @foreach($shared_socials as $social)


            @if($social->facebook_status=='E')
            <a href="{{ $social->facebook }}"><img src="https://i.imgur.com/uADHIil.png" style="width:20px"></a>
            @endif


            @if($social->twitter_status=='E')
            <a href="{{ $social->twitter }}"><img src="https://i.imgur.com/SPEABBH.png" style="width:20px"></a>
            @endif

            @if($social->youtube_status=='E')
            <a href="{{ $social->youtube }}"><img src="https://lh3.googleusercontent.com/j_RwVcM9d47aBDW5DS1VkdxUYCkDUCB6wZglv4x-9SmsxO0VaFs7Csh-FmKRCWz9r_Ef=w170" style="width:20px"></a>
            @endif

            @if($social->instagram_status=='E')
            <a href="{{ $social->instagram }}"><img src="https://www.mchenryvillage.com/images/instagram-icon.png" style="width:20px"></a>
            @endif

            @if($social->tiktok_status=='E')
            <a href="{{ $social->tiktok }}"><img src="https://cdn2.iconfinder.com/data/icons/social-media-2421/512/TikTok-512.png" style="width:20px"></a>
            @endif


            @endforeach
        </small>
    </div>

</div>
<!-- container -->
</body>
</html>



<script>
    $(document).ready(function(){
        <?php  if($type=='print'){ ?>
        printPromot();
        <?php  }?>

        <?php  if($type=='download'){ ?>
        downloadInvoice();
        <?php  }?>
    });
</script>


<script>
    function printPromot() {
        window.print();
        window.onfocus = function () { setTimeout(function () { window.close(); }, 500); }
    }
</script>

<script>
    function downloadInvoice() {

        var element = document.getElementById('full_Invoice');
        var invoiceName = 'invoice_pdf';
        html2pdf().from(element).set({
            margin:       [10,20,20,20],
            filename:     ''+invoiceName+'.pdf',
            image:        { type: 'jpeg', quality: 1 },
            html2canvas:  { dpi:96, scale: 2, scrollX: 0, scrollY: 0, backgroundColor: '#fff' },
            jsPDF:        { unit: 'pt', format: 'a4', orientation: 'portrait' }
        }).toPdf().get('pdf').then(function(pdf)
        {
            var totalPages = pdf.internal.getNumberOfPages();
            for(let i = 1; i <= totalPages; i++){
                pdf.setPage(i);
                pdf.setFontSize(9);
                pdf.setTextColor(200);
                //pdf.text('* Door to Door Shipping * * * Air & Sea Freight Services * * * Cargo * * Shipping * * Logistics * * Packaging * * Product Sourcing * *.', (pdf.internal.pageSize.getWidth()/13.25), (pdf.internal.pageSize.getHeight()-30))
                pdf.text('This invoice is created digitally, and it is valid without the signature and seal.', (pdf.internal.pageSize.getWidth()/5.25), (pdf.internal.pageSize.getHeight()-20))
                pdf.text('Page '+i +' of '+totalPages, (pdf.internal.pageSize.getWidth()-100), (pdf.internal.pageSize.getHeight()-20))

            }


        }).save().then(function(){
            setTimeout(function () { window.close(); }, 3000);
        });
    }

</script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.9.3/html2pdf.bundle.min.js" ></script>


<!--<script>-->
<!--    $(document).ready(function(){-->
<!--       window.print();-->
<!--    });-->
<!--</script>-->


Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]