Advertisement
Cyrus_dev

invoice

Jan 27th, 2021
1,059
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 8.85 KB | None | 0 0
  1.  
  2. <!--=== Breadcrumbs ===-->
  3.     <div style="padding:10px;background:rgba(212, 224, 212, 0.72)">
  4.         <center>
  5.             <h1 class="text-center; "><?php echo translate('Invoice');?></h1>
  6.         </center><!--/container-->
  7.     </div><!--/breadcrumbs-->
  8.     <!--=== End Breadcrumbs ===-->
  9.  
  10.     <!--=== Content Part ===-->
  11.     <table width="100%" style="background:rgba(212, 224, 212, 0.17);">
  12.     <?php
  13.         $sale_details = $this->db->get_where('sale',array('sale_id'=>$sale_id))->result_array();
  14.         foreach($sale_details as $row){
  15.            $vat= $row['vat'];
  16.            $shipping=$row['shipping'];
  17.     ?>
  18.         <!--Invoice Header-->
  19.         <tr>
  20.             <td style="padding:10px;">
  21.                 <img src="<?php echo $this->crud_model->logo('home_top_logo'); ?>" alt="" width="60%">
  22.             </td>
  23.             <td>
  24.                 <table>
  25.                     <?php if(!empty($invoice)) { ?>
  26.                         <?php if($invoice == "guest") {?>
  27.                             <tr><td><strong><?php echo translate('guest_id');?></strong> : <?php echo $row['guest_id']; ?> </td></tr>
  28.                         <?php }?>
  29.                         <tr><td><strong><?php echo translate('receipt_no');?></strong> : <?php echo $row['sale_code']; ?> </td></tr>
  30.                         <?php if($invoice == "guest") {?>
  31.                             <tr><td><strong><?php echo translate('receipt_link');?></strong> : <?php echo base_url() ?>home/guest_invoice/<?php echo $row['guest_id']; ?> </td></tr>
  32.                         <?php }?>
  33.                         <tr><td><strong><?php echo translate('date');?></strong> : <?php echo date('d M, Y',$row['sale_datetime'] );?></td></tr>
  34.                         <?php } ?>
  35.                 </table>
  36.             </td>
  37.         </tr>
  38.         <!--End Invoice Header-->
  39.  
  40.         <!--Invoice Detials-->
  41.         <tr>
  42.             <td style="padding:20px;">
  43.                 <div class="tag-box tag-box-v3">
  44.                     <?php
  45.                         $info = json_decode($row['shipping_address'],true);
  46.                     ?>
  47.                     <h2><?php echo translate('client_information:');?></h2>
  48.                     <table>
  49.                         <tr><td><strong><?php echo translate('first_name:');?></strong> <?php echo $info['firstname']; ?></td></tr>
  50.                         <tr><td><strong><?php echo translate('last_name:');?></strong> <?php echo $info['lastname']; ?></td></tr>
  51.                     </table>
  52.                 </div>
  53.             </td>
  54.             <td>
  55.                 <div class="tag-box tag-box-v3">
  56.                     <h2><?php echo translate('payment_details_:');?></h2>
  57.                     <table>
  58.                         <tr><td><strong><?php echo translate('payment_status_:');?></strong> <i><?php echo translate($this->crud_model->sale_payment_status($row['sale_id'])); ?></i></td></tr>
  59.                         <tr><td>
  60.                                 <strong><?php echo translate('payment_method_:');?></strong>
  61.                                 <?php if($info['payment_type'] == 'c2'){
  62.                                     echo 'TwoCheckout';
  63.                                 }
  64.                                 else{
  65.                                     echo ucfirst(str_replace('_', ' ', $info['payment_type']));
  66.                                 }?>
  67.                             </td>
  68.                         </tr>
  69.                     </table>
  70.                 </div>
  71.             </td>
  72.         </tr>
  73.         <!--End Invoice Detials-->
  74.  
  75.         <!--Invoice Table-->
  76.         <tr>
  77.             <td style="padding:10px 5px 0px; background: #132b3b; color:white; text-align:center;" colspan="2" >
  78.                 <h3><?php echo translate('payment_receipt');?></h3>
  79.             </td>
  80.         </tr>
  81.         <tr>
  82.             <td colspan="2" style="padding:0px;">
  83.             <table width="100%">
  84.                 <thead>
  85.                     <tr>
  86.                         <th style="padding: 5px;background:rgba(128, 128, 128, 0.30)"><?php echo translate('no');?></th>
  87.                         <th style="padding: 5px;background:rgba(128, 128, 128, 0.30)"><?php echo translate('item');?></th>
  88.                         <th style="padding: 5px;background:rgba(128, 128, 128, 0.30)"><?php echo translate('quantity');?></th>
  89.                         <th style="padding: 5px;background:rgba(128, 128, 128, 0.30)"><?php echo translate('unit_cost');?></th>
  90.                         <th style="padding: 5px;background:rgba(128, 128, 128, 0.30)"><?php echo translate('total');?></th>
  91.                     </tr>
  92.                 </thead>
  93.                 <tbody>
  94.                     <?php
  95.                         $product_details = json_decode($row['product_details'], true);
  96.                         $i =0;
  97.                         $total = 0;
  98.                         foreach ($product_details as $row1) {
  99.                             $i++;
  100.                     ?>
  101.                         <tr>
  102.                             <td style="padding: 5px;text-align:center;background:rgba(128, 128, 128, 0.18)"><?php echo $i; ?></td>
  103.                             <td style="padding: 5px;text-align:center;background:rgba(128, 128, 128, 0.18)"><?php echo $row1['name']; ?></td>
  104.                             <td style="padding: 5px;text-align:center;background:rgba(128, 128, 128, 0.18)"><?php echo $row1['qty']; ?></td>
  105.                             <td style="padding: 5px;text-align:center;background:rgba(128, 128, 128, 0.18)"><?php echo currency($row1['price']); ?></td>
  106.                             <td style="padding: 5px;text-align:right;background:rgba(128, 128, 128, 0.18)"><?php echo currency($row1['subtotal']); $total += $row1['subtotal']; ?></td>
  107.  
  108.  
  109.                         </tr>
  110.                     <?php
  111.                         }
  112.                     ?>
  113.                 </tbody>
  114.             </table>
  115.             <td>
  116.         </tr>
  117.         <!--End Invoice Table-->
  118.  
  119.         <!--Invoice Footer-->
  120.         <tr>
  121.             <td width="50%" style="background:rgba(212, 224, 212, 0.72)">
  122.                  <table>
  123.                     <tr >
  124.                         <td style="padding:10px 20px;"><h2><?php echo translate('contact');?></h2></td>
  125.                     </tr>
  126.                     <!-- <tr>
  127.                         <td style="padding:3px 20px;">
  128.                             <?php if(!empty($info['address1'])) echo $info['address1']; ?>
  129.                         </td>
  130.                     </tr>
  131.                     <tr>
  132.                         <td style="padding:3px 20px;">
  133.                             <?php if(!empty($info['address2'])) echo $info['address2']; ?>
  134.                         </td>
  135.                     </tr>
  136.                     <tr>
  137.                         <td style="padding:3px 20px;">
  138.                             <?php echo translate('zip');?> : <?php if(!empty($info['zip'])) echo $info['zip']; ?>
  139.                         </td>
  140.                     </tr> -->
  141.                     <tr>
  142.                         <td style="padding:3px 20px;">
  143.                             <?php echo translate('phone');?> : <?php if(!empty($info['phone'])) echo $info['phone']; ?>
  144.                         </td>
  145.                     </tr>
  146.                     <tr>
  147.                         <td style="padding:3px 20px;">
  148.                             <?php echo translate('e-mail');?> : <?php if(!empty($info['email'])) echo $info['email']; ?>
  149.                         </td>
  150.                     </tr>
  151.                  </table>
  152.             </td>
  153.             <td style="text-align:right;">
  154.                  <table width="100%">
  155.                     <tr>
  156.                         <td style="text-align:right;padding:3px; width:80%; "><h3><?php echo translate('sub_total_amount');?> :</h3></td>
  157.                         <td style="text-align:right;padding:3px"><h3><?php echo currency($total);?></h3></td>
  158.                     </tr>
  159.                     <tr>
  160.                         <td style="text-align:right;padding:3px; width:80%;"><h3><?php echo translate('tax');?> :</h3></td>
  161.                         <td style="text-align:right;padding:3px"><h3><?php echo currency($vat);?></h3></td>
  162.                     </tr>
  163.                     <tr>
  164.                         <td style="text-align:right;padding:3px; width:80%;"><h3><?php echo translate('shipping');?> :</h3></td>
  165.                         <td style="text-align:right;padding:3px"><h3><?php echo currency($shipping);?></h3></td>
  166.                     </tr>
  167.                     <tr>
  168.                         <td style="text-align:right;padding:3px; width:80%;"><h2><?php echo translate('grand_total');?> :</h2></td>
  169.                         <td style="text-align:right;padding:3px"><h2><?php echo currency($row['grand_total']);?></h2></td>
  170.                     </tr>
  171.                  </table>
  172.  
  173.             </td>
  174.         </tr>
  175.     <?php } ?>
  176.     </table><!--/container-->
  177.     <!--=== End Content Part ===-->
  178.  
  179.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement