<!DOCTYPE html>
<html lang="en">


<!-- Mirrored from edumin.dexignlab.com/xhtml/add-departments.html by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 17 Nov 2020 13:56:15 GMT -->
<head>
    
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>Rizwan </title>
    <!-- Favicon icon -->
    <link rel="icon" type="image/png" sizes="16x16" href="<?php echo base_url();?>assets/images/favicon.png">
    <link rel="stylesheet" href="<?php echo base_url();?>assets/vendor/bootstrap-select/dist/css/bootstrap-select.min.css">
    <link rel="stylesheet" href="<?php echo base_url();?>assets/css/style.css">
    <!-- Pick date -->
   <link rel="stylesheet" href="<?php echo base_url();?>assets/vendor/pickadate/themes/default.css">
    <link rel="stylesheet" href="<?php echo base_url();?>assets/vendor/pickadate/themes/default.date.css">
     <link href="<?php echo base_url();?>assets/vendor/datatables/css/jquery.dataTables.min.css" rel="stylesheet">
    <!-- Custom Stylesheet -->
     

</head>

<body>

 <style type="text/css">
     @media print
{
  .button
  {
    display: none;
  }
}

 </style>

<div class="row">
    <div class="col-md-10">

        <div class="card mt-4">
            
            <div class="card-header"><img src="" style="width:105px;"/><br/>
                <span class="float-right">
                <!--<strong>ST-0001-04</strong> <br/>-->
                <strong>Date: </strong><?php $currentDate = date('d-m-Y');
                echo $currentDate; ?><br/>
                <strong>Bill #: <?php
                    echo $view_all[0]['bill_no'];
                 ?></strong><br/>
                <strong>P.O #: </strong><?php 
                echo so_number_dc($view_all[0]['so_id']);
                $sum = 0;
                ?></span>
                </div>
            <div class="card-body">
            <div id='purchase_order_success' class='alert alert-success solid' style='display:none;'></div>
                <div class="table-responsive">
                    <table class="table table-striped">
                        <thead>
                            <tr>
                                <th class="center">Quantity</th>
                                <th class="center">Description</th>
                                <th class="center">Unit Price</th>
                                <th class="center">Value Excluding Sales Tax</th>
                                <th class="center">Sale Tax</th>
                                <th class="center">Value Including Taxes</th>
                                
                            </tr>
                        </thead>
                        <tbody>
                           
                                <tr>
                                    <td class="center">
                                    <?php 
                                    echo $view_all[0]['qty'];
                                    ?></td>
                                <td class="center"><?php
                                   $get_product = get_product_id($view_all[0]['so_id']);
                                   $get_fg_refcode = fg_rates_product_desc($get_product);
                                   echo @code_description($get_fg_refcode);
                                   ?>
                                </td>
                                <td class="center"><?php 
                                     $product = sale_order_pro($view_all[0]['so_id']); 
                                      $rates = get_fg_rates($product);
                                      echo $rates;
                                ?></td>
                                <td class="center"><?php 
                                     $total_with_sale_tax = $rates*$view_all[0]['qty'];
                                     echo number_format($total_with_sale_tax);
                                ?></td>
                                <td class="center">
                                <?php
                                  $gstRate = 0.18;
                                  $totalValueWithGST = $rates * $view_all[0]['qty'] *$gstRate;
                                  echo number_format($totalValueWithGST);
                                  ?></td>
                                <td class="right"><?php 
                                 $totalValue = $rates*$view_all[0]['qty']+$totalValueWithGST;
                                 echo number_format($totalValue);
                                ?></td>
                            </tr>
                            <?php
                           $sum+= $totalValue;
                        //}  ?>
                            
                        </tbody>
                    </table>
                </div>
                <div class="row">
                    
                    <div class="col-lg-4 col-sm-5 ml-auto">
                        <table class="table table-clear">
                            <tbody>
                                <tr>
                                    <td class="left"><strong>Total Amount:</strong></td>
                                    <td class="right"><strong>Pkr/= <?php echo number_format($sum,2); ?></strong></td>
                                </tr>
                                <tr>
                                    <td class="left"><strong>Amount in Words:</strong></td>
                               
                                    <td class="right"><strong><?php
                                    //echo numberToWords($sum);
                                    ?></strong></td>
                                   
                                </tr>
                            </tbody>
                           
                            
                        </table>
                        
                    </div>
                    
                </div>
                <table class="">
                        <tr>
                                <td class="right"><strong>Signature:</strong></td>
                                <td class="right"><strong>_________________________</strong></td>
                                </tr>
                        </table>
            </div>
            </div>
            <div class="col-lg-12 text-right">
                <button type="submit" id="dis_submit" class="btn btn-primary button" onclick="myFunction()">Save & Print<i class="icon-arrow-right14 position-right"></i></button>
                                 
             </div>
    </div>
</div>
       <?php  $this->load->view('footer'); ?>  
</body>
<script type="text/javascript">
function myFunction()
    {
            var mywindow = window.open('', 'PRINT', 'height=400,width=600');
        window.print();
    }

     </script>
<!-- Mirrored from edumin.dexignlab.com/xhtml/add-departments.html by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 17 Nov 2020 13:56:15 GMT -->
</html> 