123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244 |
- <html>
- <head>
- <link rel="preconnect" href="https://fonts.googleapis.com">
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
- <link href="https://fonts.googleapis.com/css2?family=Arimo&family=Roboto&family=Roboto+Slab:wght@300&display=swap" rel="stylesheet">
- <style>
- #invoice-POS *{
- font-family: 'Arimo', sans-serif !important;
- font-family: 'Roboto', sans-serif !important;
- font-family: 'Roboto Slab', serif !important;
- }
- </style>
- @php
- $resto = \App\Models\Restaurants::find(\App\Helpers\CommonMethods::getRestuarantID());
- $resto_metas = \App\Helpers\CommonMethods::getRestoMetas($resto);
- // $resto_meta = isset($resto->resto_metas)?$resto->resto_metas:null;
- //dd($resto_metas);
- $currency = isset($resto_metas['BUSSINESS_CCY'])?$resto_metas['BUSSINESS_CCY']:"IQD";
- $business_type = isset($resto_metas['BUSSINESS_TYPE'])?$resto_metas['BUSSINESS_TYPE']:"Restaurants";
- $is_allow_print_preview = isset($resto_metas['PRINT_PREVIEW_ON_ACCEPT_ORDER'])?$resto_metas['PRINT_PREVIEW_ON_ACCEPT_ORDER']:"Disabled";
- $imgix = isset($resto_metas['IMGIX_SOURCE']) && !empty($resto_metas['IMGIX_SOURCE'])?$resto_metas['IMGIX_SOURCE']:"https://meemappaws.imgix.net";
- $restoTax = isset($resto_metas['DISPLAY_TAX_INFO'])?$resto_metas['DISPLAY_TAX_INFO']:"";
- $trn_info = isset($resto_metas['TRN_DISPLAY'])?$resto_metas['TRN_DISPLAY']:"";
- app()->setLocale($resto->default_lang);
- //dump($order->customers->customer_addresses);
- @endphp
- <style>
- #invoice-POS{
- padding:1mm;
- margin: 0 auto;
- width: 60mm;
- background: #FFF;
- }
- #invoice-POS h1{
- font-size: 1.9em;
- color: #000;
- }
- #invoice-POS h2{font-size: 1.6em !important; color:#000}
- #invoice-POS h3{
- font-size: 1.7em;
- font-weight: 400;
- line-height: 2em;
- }
- #invoice-POS p{
- font-size: .9em;
- color: #000;
- line-height: 1.2em;
- }
- #invoice-POS #top, #mid,#bot{ /* Targets all id with 'col-' */
- border-bottom: 1px solid #EEE;
- }
- #top{min-height: 100px;}
- #mid{min-height: 80px;}
- #bot{ min-height: 50px;}
- #top .logo{
- //float: left;
- height: 60px;
- width: 60px;
- }
- .clientlogo{
- float: left;
- height: 60px;
- width: 60px;
- }
- .info{
- display: block;
- //float:left;
- margin-left: 0;
- }
- #invoice-POS .title{
- float: right;
- }
- #invoice-POS .title p{text-align: right;}
- #invoice-POS table{
- width: 100%;
- border-collapse: collapse;
- }
- #invoice-POS table td{
- //padding: 5px 0 5px 15px;
- //border: 1px solid #EEE
- }
- #invoice-POS .tabletitle{
- //padding: 5px;
- font-size: .5em;
- }
- #invoice-POS .service{border-bottom: 1px solid #EEE;}
- #invoice-POS .item{width: 24mm;}
- #invoice-POS .item h2, #invoice-POS .Hours h2, #invoice-POS .Rate h2{margin:0;font-size: 1.9em !important; color:#000; text-align: left !important; font-weight: bold !important;}
- #invoice-POS .itemtext{font-size: .9em;}
- #invoice-POS #legalcopy{
- margin-top: 0mm;
- }
- </style>
- </head>
- <body>
- <div id="invoice-POS">
- <center id="top">
- <div class="logo"><img src="{!! $order['business_info']['business_image'] !!}" height="60" /> </div>
- <div class="info">
- <h2>{!! $order['business_info']['business_name'] !!}</h2>
- </div><!--End Info-->
- </center><!--End InvoiceTop-->
- <div id="mid">
- <div class="info">
- <p style="text-align: center">
- Address : {!! $order['business_info']['business_address'] !!}</br>
- Phone : {!! $order['business_info']['whatsapp_number_notification'] !!}</br>
- @if(!empty($trn_info))
- TRN No : {!! $trn_info !!}
- @endif
- </p>
- </div>
- <hr>
- <h6 style="margin-bottom: 3px">Order Reference : {!! $order['order_info']['order_ref'] !!} </h6>
- <p>
- Placed At: {!! $order['order_info']['order_created_at'] !!}
- </p>
- <div class="info">
- <h6 style="margin-block-end: : 0">Customer Info</h6>
- <p>
- Name : {!! $order['customer']['customer_name'] !!} <br />
- Phone : {!! $order['customer']['customer_phone'] !!}</br>
- Address : {!! $order['customer']['deliveryAddress'] !!}</
- </p>
- </div>
- </div><!--End Invoice Mid-->
- <div id="bot">
- <div id="table">
- <table>
- <tr class="tabletitle">
- <td class="item"><h2>Item</h2></td>
- <td class="Hours"><h2>Qty</h2></td>
- <td class="Rate"><h2>Sub Total</h2></td>
- </tr>
- @foreach($order['basket']['items'] as $item)
- <tr class="service">
- <td class="tableitem"><p class="itemtext">{!! $item['item_name']!!}</p></td>
- <td class="tableitem"><p class="itemtext">{!! $item['quantity'] !!}</p></td>
- <td class="tableitem"><p class="itemtext"> {!! $item['item_price']['formatted_price'] !!}</p></td>
- </tr>
- @endforeach
- <tr class="tabletitle">
- <td colspan="2" style="padding:2px" class="Rate"><h2>Delivery</h2></td>
- <td class="payment"><h2> {!! $order['basket']['delivery_fee']['formatted_price'] !!}</h2></td>
- </tr>
- @if($order['basket']['is_discount'] && $order['basket']['discounted_amount']['normal_price'])
- <tr class="tabletitle">
- <td colspan="2" style="padding:2px" class="Rate"><h2>Discount</h2></td>
- <td class="payment"><h2>{!! $order['basket']['discounted_amount']['formatted_price'] !!}</h2></td>
- </tr>
- @endif
- @if($order['basket']['is_loyalty'] && $order['basket']['loyalty_amount']['normal_price'])
- <tr class="tabletitle">
- <td colspan="2" style="padding:2px" class="Rate"><h2>Loyalty Amount</h2></td>
- <td class="payment"><h2>{!! $order['basket']['loyalty_amount']['formatted_price'] !!}</h2></td>
- </tr>
- @endif
- @if($order['basket']['is_delivery_discount'] && $order['basket']['delivery_discounted_amount']['normal_price'] > 0)
- <tr class="tabletitle">
- <td colspan="2" style="padding:2px" class="Rate"><h2>Delivery Discount</h2></td>
- <td class="payment"><h2>{!! $order['basket']['delivery_discounted_amount']['formatted_price'] !!}</h2></td>
- </tr>
- @endif
- <tr class="tabletitle">
- <td colspan="2" style="padding:2px" class="Rate"><h2>Total</h2></td>
- <td class="payment"><h2>{!! $order['basket']['is_discount']?$order['basket']['discounted_total_price']['formatted_price']:$order['basket']['grand_total']['formatted_price'] !!}</h2></td>
- </tr>
- <tr class="tabletitle">
- <td colspan="2" style="padding:2px" class="Rate"><h2>Tax</h2></td>
- <td class="payment"><h2>{!! $restoTax !!}</h2></td>
- </tr>
- <tr class="tabletitle">
- <td colspan="2" style="padding:2px" class="Rate"><h2>Order Type / Pay</h2></td>
- <td class="payment"><h2>{!! $order['order_info']['order_type'] !!} / {!! $order['order_info']['payment'] !!}</h2></td>
- </tr>
- </table>
- </div><!--End Table-->
- <div id="legalcopy">
- <p class="legal" style="text-align: center"><strong>Thank you for your order!</strong><br />
- </p>
- </div>
- </div><!--End InvoiceBot-->
- </div><!--End Invoice-->
- </body>
- </html>
|