print-order.blade.php 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. <html>
  2. <head>
  3. <link rel="preconnect" href="https://fonts.googleapis.com">
  4. <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  5. <link href="https://fonts.googleapis.com/css2?family=Arimo&family=Roboto&family=Roboto+Slab:wght@300&display=swap" rel="stylesheet">
  6. <style>
  7. #invoice-POS *{
  8. font-family: 'Arimo', sans-serif !important;
  9. font-family: 'Roboto', sans-serif !important;
  10. font-family: 'Roboto Slab', serif !important;
  11. }
  12. </style>
  13. @php
  14. $resto = \App\Models\Restaurants::find(\App\Helpers\CommonMethods::getRestuarantID());
  15. $resto_metas = \App\Helpers\CommonMethods::getRestoMetas($resto);
  16. // $resto_meta = isset($resto->resto_metas)?$resto->resto_metas:null;
  17. //dd($resto_metas);
  18. $currency = isset($resto_metas['BUSSINESS_CCY'])?$resto_metas['BUSSINESS_CCY']:"IQD";
  19. $business_type = isset($resto_metas['BUSSINESS_TYPE'])?$resto_metas['BUSSINESS_TYPE']:"Restaurants";
  20. $is_allow_print_preview = isset($resto_metas['PRINT_PREVIEW_ON_ACCEPT_ORDER'])?$resto_metas['PRINT_PREVIEW_ON_ACCEPT_ORDER']:"Disabled";
  21. $imgix = isset($resto_metas['IMGIX_SOURCE']) && !empty($resto_metas['IMGIX_SOURCE'])?$resto_metas['IMGIX_SOURCE']:"https://meemappaws.imgix.net";
  22. $restoTax = isset($resto_metas['DISPLAY_TAX_INFO'])?$resto_metas['DISPLAY_TAX_INFO']:"";
  23. $trn_info = isset($resto_metas['TRN_DISPLAY'])?$resto_metas['TRN_DISPLAY']:"";
  24. app()->setLocale($resto->default_lang);
  25. //dump($order->customers->customer_addresses);
  26. @endphp
  27. <style>
  28. #invoice-POS{
  29. padding:1mm;
  30. margin: 0 auto;
  31. width: 60mm;
  32. background: #FFF;
  33. }
  34. #invoice-POS h1{
  35. font-size: 1.9em;
  36. color: #000;
  37. }
  38. #invoice-POS h2{font-size: 1.6em !important; color:#000}
  39. #invoice-POS h3{
  40. font-size: 1.7em;
  41. font-weight: 400;
  42. line-height: 2em;
  43. }
  44. #invoice-POS p{
  45. font-size: .9em;
  46. color: #000;
  47. line-height: 1.2em;
  48. }
  49. #invoice-POS #top, #mid,#bot{ /* Targets all id with 'col-' */
  50. border-bottom: 1px solid #EEE;
  51. }
  52. #top{min-height: 100px;}
  53. #mid{min-height: 80px;}
  54. #bot{ min-height: 50px;}
  55. #top .logo{
  56. //float: left;
  57. height: 60px;
  58. width: 60px;
  59. }
  60. .clientlogo{
  61. float: left;
  62. height: 60px;
  63. width: 60px;
  64. }
  65. .info{
  66. display: block;
  67. //float:left;
  68. margin-left: 0;
  69. }
  70. #invoice-POS .title{
  71. float: right;
  72. }
  73. #invoice-POS .title p{text-align: right;}
  74. #invoice-POS table{
  75. width: 100%;
  76. border-collapse: collapse;
  77. }
  78. #invoice-POS table td{
  79. //padding: 5px 0 5px 15px;
  80. //border: 1px solid #EEE
  81. }
  82. #invoice-POS .tabletitle{
  83. //padding: 5px;
  84. font-size: .5em;
  85. }
  86. #invoice-POS .service{border-bottom: 1px solid #EEE;}
  87. #invoice-POS .item{width: 24mm;}
  88. #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;}
  89. #invoice-POS .itemtext{font-size: .9em;}
  90. #invoice-POS #legalcopy{
  91. margin-top: 0mm;
  92. }
  93. </style>
  94. </head>
  95. <body>
  96. <div id="invoice-POS">
  97. <center id="top">
  98. <div class="logo"><img src="{!! $order['business_info']['business_image'] !!}" height="60" /> </div>
  99. <div class="info">
  100. <h2>{!! $order['business_info']['business_name'] !!}</h2>
  101. </div><!--End Info-->
  102. </center><!--End InvoiceTop-->
  103. <div id="mid">
  104. <div class="info">
  105. <p style="text-align: center">
  106. Address : {!! $order['business_info']['business_address'] !!}</br>
  107. Phone : {!! $order['business_info']['whatsapp_number_notification'] !!}</br>
  108. @if(!empty($trn_info))
  109. TRN No : {!! $trn_info !!}
  110. @endif
  111. </p>
  112. </div>
  113. <hr>
  114. <h6 style="margin-bottom: 3px">Order Reference : {!! $order['order_info']['order_ref'] !!} </h6>
  115. <p>
  116. Placed At: {!! $order['order_info']['order_created_at'] !!}
  117. </p>
  118. <div class="info">
  119. <h6 style="margin-block-end: : 0">Customer Info</h6>
  120. <p>
  121. Name : {!! $order['customer']['customer_name'] !!} <br />
  122. Phone : {!! $order['customer']['customer_phone'] !!}</br>
  123. Address : {!! $order['customer']['deliveryAddress'] !!}</
  124. </p>
  125. </div>
  126. </div><!--End Invoice Mid-->
  127. <div id="bot">
  128. <div id="table">
  129. <table>
  130. <tr class="tabletitle">
  131. <td class="item"><h2>Item</h2></td>
  132. <td class="Hours"><h2>Qty</h2></td>
  133. <td class="Rate"><h2>Sub Total</h2></td>
  134. </tr>
  135. @foreach($order['basket']['items'] as $item)
  136. <tr class="service">
  137. <td class="tableitem"><p class="itemtext">{!! $item['item_name']!!}</p></td>
  138. <td class="tableitem"><p class="itemtext">{!! $item['quantity'] !!}</p></td>
  139. <td class="tableitem"><p class="itemtext"> {!! $item['item_price']['formatted_price'] !!}</p></td>
  140. </tr>
  141. @endforeach
  142. <tr class="tabletitle">
  143. <td colspan="2" style="padding:2px" class="Rate"><h2>Delivery</h2></td>
  144. <td class="payment"><h2> {!! $order['basket']['delivery_fee']['formatted_price'] !!}</h2></td>
  145. </tr>
  146. @if($order['basket']['is_discount'] && $order['basket']['discounted_amount']['normal_price'])
  147. <tr class="tabletitle">
  148. <td colspan="2" style="padding:2px" class="Rate"><h2>Discount</h2></td>
  149. <td class="payment"><h2>{!! $order['basket']['discounted_amount']['formatted_price'] !!}</h2></td>
  150. </tr>
  151. @endif
  152. @if($order['basket']['is_loyalty'] && $order['basket']['loyalty_amount']['normal_price'])
  153. <tr class="tabletitle">
  154. <td colspan="2" style="padding:2px" class="Rate"><h2>Loyalty Amount</h2></td>
  155. <td class="payment"><h2>{!! $order['basket']['loyalty_amount']['formatted_price'] !!}</h2></td>
  156. </tr>
  157. @endif
  158. @if($order['basket']['is_delivery_discount'] && $order['basket']['delivery_discounted_amount']['normal_price'] > 0)
  159. <tr class="tabletitle">
  160. <td colspan="2" style="padding:2px" class="Rate"><h2>Delivery Discount</h2></td>
  161. <td class="payment"><h2>{!! $order['basket']['delivery_discounted_amount']['formatted_price'] !!}</h2></td>
  162. </tr>
  163. @endif
  164. <tr class="tabletitle">
  165. <td colspan="2" style="padding:2px" class="Rate"><h2>Total</h2></td>
  166. <td class="payment"><h2>{!! $order['basket']['is_discount']?$order['basket']['discounted_total_price']['formatted_price']:$order['basket']['grand_total']['formatted_price'] !!}</h2></td>
  167. </tr>
  168. <tr class="tabletitle">
  169. <td colspan="2" style="padding:2px" class="Rate"><h2>Tax</h2></td>
  170. <td class="payment"><h2>{!! $restoTax !!}</h2></td>
  171. </tr>
  172. <tr class="tabletitle">
  173. <td colspan="2" style="padding:2px" class="Rate"><h2>Order Type / Pay</h2></td>
  174. <td class="payment"><h2>{!! $order['order_info']['order_type'] !!} / {!! $order['order_info']['payment'] !!}</h2></td>
  175. </tr>
  176. </table>
  177. </div><!--End Table-->
  178. <div id="legalcopy">
  179. <p class="legal" style="text-align: center"><strong>Thank you for your order!</strong><br />
  180. </p>
  181. </div>
  182. </div><!--End InvoiceBot-->
  183. </div><!--End Invoice-->
  184. </body>
  185. </html>