<!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;
  }
  
  body{
      font-size:24px;
        
      
  }
    
}





 </style>
 
 <div class="row">
                    <div class="col-lg-12">

                        <div class="card mt-3">
                            
                            <div class="card-header"><img src="<?php echo base_url();?>assets/logo.png" style="width:130px;"/><br/>
                                <span class="float-right">
                                    <strong>P.O #:</strong> <?php if(!empty($get_invoice_data)) { echo $get_invoice_data[0]['po_no']; }?><br/>
                                   
                                      <strong>Date: </strong><?php if(!empty($get_invoice_data)) {echo date("d-m-Y", strtotime($get_invoice_data[0]['po_date']) ); } ?><br/>
                            <strong style="font-size:24px;">Admin Copy </strong></span>
                                </div>
                            <div class="card-body">
                                <div class="row mb-5" style="font-size:22px;">
                                    <div class="mt-4 col-xl-6 col-lg-6 col-md-6 col-sm-12">
                                        <h6>From:</h6>
                                        <div> <strong>Rizwan Associates</strong> </div>
                                        <div>75890,</div>
                                        <div>Manghopir Rd,Industrial Trading Estate, Karachi City, Sindh</div>
                                        <div>Email: info@rizwanassociates.com</div>
                                        <div>Phone: +92 21 32551101</div>
                                    </div>
                                    <div class="mt-4 col-xl-6 text-right col-lg-6 col-md-6 col-sm-12">
                                        <h6>To:</h6>
                                        <div> <strong><?php if(!empty($get_invoice_data)) {echo vendor($get_invoice_data[0]['vendor_id']); } ?></strong> </div>
                                        <div><?php if(!empty($get_invoice_data)) {echo attn($get_invoice_data[0]['vendor_id']); } ?></div>
                                        <div><?php if(!empty($get_invoice_data)) {echo addres_vendor($get_invoice_data[0]['vendor_id']); }?></div>
                                        <div>Email: <?php if(!empty($get_invoice_data)) { echo email_vendor($get_invoice_data[0]['vendor_id']); }?></div>
                                        <div>Phone: +<?php if(!empty($get_invoice_data)) { echo phone_vendor($get_invoice_data[0]['vendor_id']);  }?></div>
                                    </div>
                                </div>
                                <div class="table-responsive">
                                    <table class="table table-striped">
                                        <thead>
                                            <tr>
                                                <th class="center">Code</th>
                                                <th>Description</th>
                                                <th class="right">Quantity</th>
                                                <th class="center">Unit</th>
                                                <th class="right">Price</th>
                                                <th class="right">Total(GST)</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <?php 
                                            $sum =0;
                                            if(!empty($get_invoice_data)) {?>
                                                <?php foreach ($get_invoice_data as  $value) {
                                                    if($value['material_id'] !=0){
                                                  ?>
                                            <tr>
                                                <td class="center"><?php echo material_codess($value['material_id']); ?></td>
                                                <td class="left strong"><?php echo material_name($value['material_id']); ?></td>
                                                <td class="left"><?php echo $value['order_qty']; ?></td>
                                                <td class="right"><?php echo get_unit_name($value['unit']); ?></td>
                                                
                                                <td class="right"><?php echo $value['rate']; ?></td>
                                                <td class="right"><?php $total =  $value['order_qty']*$value['rate'];?>
                                                    
                                                    <?php echo $total; ?>
                                                    <?php $sum+= $total; ?>
                                                </td>
                                            </tr>
                                            <?php }else{ ?>


                                                <tr>
                                                <td class="center"><?php echo product_code($value['product_id']); ?></td>
                                                <td class="left strong"><?php echo product_name($value['product_id']); ?></td>
                                               <!-- <td class="left"><?php echo $value['weight']; ?></td>-->
                                                 <td class="left"><?php echo $value['order_qty']; ?></td>
                                                <td class="right"><?php echo get_unit_name($value['unit']); ?></td>
                                                
                                                <td class="right"><?php echo $value['rate']; ?></td>
                                                <td class="right"><?php $total =  $value['order_qty']*$value['rate'];?>
                                                    
                                                    <?php echo $total; ?>
                                                    <?php $sum+= $total; ?>
                                                </td>
                                            </tr>


                                           <?php } } }?>
                                            
                                        </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</strong></td>
                                                    <td class="right"><strong><?php echo number_format($sum); ?></strong></td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>
                                
                            </div>
                        
                    </div>
                </div>
                
                <div class="row">
                    <div class="col-lg-12">

                        <div class="card mt-3">
                            
                            <div class="card-header"><img src="<?php echo base_url();?>assets/logo.png" style="width:130px;"/><br/>
                                <span class="float-right">
                                    <strong>P.O #:</strong> <?php if(!empty($get_invoice_data)) { echo $get_invoice_data[0]['po_no']; }?><br/>
                                   
                                      <strong>Date: </strong><?php if(!empty($get_invoice_data)) {echo date("d-m-Y", strtotime($get_invoice_data[0]['po_date']) ); } ?></br>
                                 <strong style="font-size:24px;">QC Copy </strong></span>
                                </div>
                            <div class="card-body">
                                 <div class="row mb-5" style="font-size:22px;">
                                    <div class="mt-4 col-xl-6 col-lg-6 col-md-6 col-sm-12">
                                        <h6>From:</h6>
                                        <div> <strong>Rizwan Associates</strong> </div>
                                        <div>201-20C,</div>
                                        <div>Ittehad Comercial Lane 8, DHA Karachi, Pakistan</div>
                                        <div>Email: info@rizwanassociates.com</div>
                                        <div>Phone: +92 21 32551101</div>
                                    </div>
                                    <div class="mt-4 col-xl-6 text-right col-lg-6 col-md-6 col-sm-12">
                                        <h6>To:</h6>
                                        <div> <strong><?php if(!empty($get_invoice_data)) {echo vendor($get_invoice_data[0]['vendor_id']); } ?></strong> </div>
                                        <div><?php if(!empty($get_invoice_data)) {echo attn($get_invoice_data[0]['vendor_id']); } ?></div>
                                        <div><?php if(!empty($get_invoice_data)) {echo addres_vendor($get_invoice_data[0]['vendor_id']); }?></div>
                                        <div>Email: <?php if(!empty($get_invoice_data)) { echo email_vendor($get_invoice_data[0]['vendor_id']); }?></div>
                                        <div>Phone: +<?php if(!empty($get_invoice_data)) { echo phone_vendor($get_invoice_data[0]['vendor_id']);  }?></div>
                                    </div>
                                </div>
                                <div class="table-responsive">
                                    <table class="table table-striped">
                                        <thead>
                                            <tr>
                                                <th class="center">Code</th>
                                                <th>Description</th>
                                                <th class="right">Quantity</th>
                                                <th class="center">Unit</th>
                                                <th class="right">Price</th>
                                                <th class="right">Total(GST)</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <?php 
                                            $sum =0;
                                            if(!empty($get_invoice_data)) {?>
                                                <?php foreach ($get_invoice_data as  $value) {
                                                    if($value['material_id'] !=0){
                                                  ?>
                                            <tr>
                                                <td class="center"><?php echo material_codess($value['material_id']); ?></td>
                                                <td class="left strong"><?php echo material_name($value['material_id']); ?></td>
                                                <td class="left"><?php echo $value['order_qty']; ?></td>
                                                <td class="right"><?php echo get_unit_name($value['unit']); ?></td>
                                                
                                                <td class="right"><?php echo $value['rate']; ?></td>
                                                <td class="right"><?php $total =  $value['order_qty']*$value['rate'];?>
                                                    
                                                    <?php echo $total; ?>
                                                    <?php $sum+= $total; ?>
                                                </td>
                                            </tr>
                                            <?php }else{ ?>


                                                <tr>
                                                <td class="center"><?php echo product_code($value['product_id']); ?></td>
                                                <td class="left strong"><?php echo product_name($value['product_id']); ?></td>
                                               <!-- <td class="left"><?php echo $value['weight']; ?></td>-->
                                                 <td class="left"><?php echo $value['order_qty']; ?></td>
                                                <td class="right"><?php echo get_unit_name($value['unit']); ?></td>
                                                
                                                <td class="right"><?php echo $value['rate']; ?></td>
                                                <td class="right"><?php $total =  $value['order_qty']*$value['rate'];?>
                                                    
                                                    <?php echo $total; ?>
                                                    <?php $sum+= $total; ?>
                                                </td>
                                            </tr>


                                           <?php } } }?>
                                            
                                        </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</strong></td>
                                                    <td class="right"><strong><?php echo number_format($sum); ?></strong></td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>
                                
                            </div>
                        
                    </div>
                </div>
                
                <div class="row">
                    <div class="col-lg-12">

                        <div class="card mt-3">
                            
                            <div class="card-header"><img src="<?php echo base_url();?>assets/logo.png" style="width:130px;"/><br/>
                                <span class="float-right">
                                    <strong>P.O #:</strong> <?php if(!empty($get_invoice_data)) { echo $get_invoice_data[0]['po_no']; }?><br/>
                                   
                                      <strong>Date: </strong><?php if(!empty($get_invoice_data)) {echo date("d-m-Y", strtotime($get_invoice_data[0]['po_date']) ); } ?></br>
                                       <strong style="font-size:24px;">Vendor Copy </strong></span>
                                </div>
                            <div class="card-body">
                                 <div class="row mb-5" style="font-size:22px;">
                                    <div class="mt-4 col-xl-6 col-lg-6 col-md-6 col-sm-12">
                                        <h6>From:</h6>
                                        <div> <strong>Rizwan Associates</strong> </div>
                                        <div>201-20C,</div>
                                        <div>Ittehad Comercial Lane 8, DHA Karachi, Pakistan</div>
                                        <div>Email: info@rizwanassociates.com</div>
                                        <div>Phone: +92 21 32551101</div>
                                    </div>
                                    <div class="mt-4 col-xl-6 text-right col-lg-6 col-md-6 col-sm-12">
                                        <h6>To:</h6>
                                        <div> <strong><?php if(!empty($get_invoice_data)) {echo vendor($get_invoice_data[0]['vendor_id']); } ?></strong> </div>
                                        <div><?php if(!empty($get_invoice_data)) {echo attn($get_invoice_data[0]['vendor_id']); } ?></div>
                                        <div><?php if(!empty($get_invoice_data)) {echo addres_vendor($get_invoice_data[0]['vendor_id']); }?></div>
                                        <div>Email: <?php if(!empty($get_invoice_data)) { echo email_vendor($get_invoice_data[0]['vendor_id']); }?></div>
                                        <div>Phone: +<?php if(!empty($get_invoice_data)) { echo phone_vendor($get_invoice_data[0]['vendor_id']);  }?></div>
                                    </div>
                                </div>
                                <div class="table-responsive">
                                    <table class="table table-striped">
                                        <thead>
                                            <tr>
                                                <th class="center">Code</th>
                                                <th>Description</th>
                                                <th class="right">Quantity</th>
                                                <th class="center">Unit</th>
                                                <th class="right">Price</th>
                                                <th class="right">Total(GST)</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <?php 
                                            $sum =0;
                                            if(!empty($get_invoice_data)) {?>
                                                <?php foreach ($get_invoice_data as  $value) {
                                                    if($value['material_id'] !=0){
                                                  ?>
                                            <tr>
                                                <td class="center"><?php echo material_codess($value['material_id']); ?></td>
                                                <td class="left strong"><?php echo material_name($value['material_id']); ?></td>
                                                <td class="left"><?php echo $value['order_qty']; ?></td>
                                                <td class="right"><?php echo get_unit_name($value['unit']); ?></td>
                                                
                                                <td class="right"><?php echo $value['rate']; ?></td>
                                                <td class="right"><?php $total =  $value['order_qty']*$value['rate'];?>
                                                    
                                                    <?php echo $total; ?>
                                                    <?php $sum+= $total; ?>
                                                </td>
                                            </tr>
                                            <?php }else{ ?>


                                                <tr>
                                                <td class="center"><?php echo product_code($value['product_id']); ?></td>
                                                <td class="left strong"><?php echo product_name($value['product_id']); ?></td>
                                               <!-- <td class="left"><?php echo $value['weight']; ?></td>-->
                                                 <td class="left"><?php echo $value['order_qty']; ?></td>
                                                <td class="right"><?php echo get_unit_name($value['unit']); ?></td>
                                                
                                                <td class="right"><?php echo $value['rate']; ?></td>
                                                <td class="right"><?php $total =  $value['order_qty']*$value['rate'];?>
                                                    
                                                    <?php echo $total; ?>
                                                    <?php $sum+= $total; ?>
                                                </td>
                                            </tr>


                                           <?php } } }?>
                                            
                                        </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</strong></td>
                                                    <td class="right"><strong><?php echo number_format($sum); ?></strong></td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>
                                
                            </div>
                        
                    </div>
                </div>

<div class="row">
                    <div class="col-lg-12">

                        <div class="card mt-3">
                            
                            <div class="card-header"><img src="<?php echo base_url();?>assets/logo.png" style="width:130px;"/><br/>
                                <span class="float-right">
                                    <strong>P.O #:</strong> <?php if(!empty($get_invoice_data)) { echo $get_invoice_data[0]['po_no']; }?><br/>
                                   
                                      <strong>Date: </strong><?php if(!empty($get_invoice_data)) {echo date("d-m-Y", strtotime($get_invoice_data[0]['po_date']) ); } ?></br>
                                       <strong style="font-size:24px;">Store Copy </strong></span>
                                </div>
                            <div class="card-body">
                                 <div class="row mb-5" style="font-size:22px;">
                                    <div class="mt-4 col-xl-6 col-lg-6 col-md-6 col-sm-12">
                                        <h6>From:</h6>
                                        <div> <strong>Rizwan Associates</strong> </div>
                                        <div>201-20C,</div>
                                        <div>Ittehad Comercial Lane 8, DHA Karachi, Pakistan</div>
                                        <div>Email: info@rizwanassociates.com</div>
                                        <div>Phone: +92 21 32551101</div>
                                    </div>
                                    <div class="mt-4 col-xl-6 text-right col-lg-6 col-md-6 col-sm-12">
                                        <h6>To:</h6>
                                        <div> <strong><?php if(!empty($get_invoice_data)) {echo vendor($get_invoice_data[0]['vendor_id']); } ?></strong> </div>
                                        <div><?php if(!empty($get_invoice_data)) {echo attn($get_invoice_data[0]['vendor_id']); } ?></div>
                                        <div><?php if(!empty($get_invoice_data)) {echo addres_vendor($get_invoice_data[0]['vendor_id']); }?></div>
                                        <div>Email: <?php if(!empty($get_invoice_data)) { echo email_vendor($get_invoice_data[0]['vendor_id']); }?></div>
                                        <div>Phone: +<?php if(!empty($get_invoice_data)) { echo phone_vendor($get_invoice_data[0]['vendor_id']);  }?></div>
                                    </div>
                                </div>
                                <div class="table-responsive">
                                    <table class="table table-striped">
                                        <thead>
                                            <tr>
                                                <th class="center">Code</th>
                                                <th>Description</th>
                                                <th class="right">Quantity</th>
                                                <th class="center">Unit</th>
                                                <th class="right">Price</th>
                                                <th class="right">Total(GST)</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <?php 
                                            $sum =0;
                                            if(!empty($get_invoice_data)) {?>
                                                <?php foreach ($get_invoice_data as  $value) {
                                                    if($value['material_id'] !=0){
                                                  ?>
                                            <tr>
                                                <td class="center"><?php echo material_codess($value['material_id']); ?></td>
                                                <td class="left strong"><?php echo material_name($value['material_id']); ?></td>
                                                <td class="left"><?php echo $value['order_qty']; ?></td>
                                                <td class="right"><?php echo get_unit_name($value['unit']); ?></td>
                                                
                                                <td class="right"><?php echo $value['rate']; ?></td>
                                                <td class="right"><?php $total =  $value['order_qty']*$value['rate'];?>
                                                    
                                                    <?php echo $total; ?>
                                                    <?php $sum+= $total; ?>
                                                </td>
                                            </tr>
                                            <?php }else{ ?>


                                                <tr>
                                                <td class="center"><?php echo product_code($value['product_id']); ?></td>
                                                <td class="left strong"><?php echo product_name($value['product_id']); ?></td>
                                               <!-- <td class="left"><?php echo $value['weight']; ?></td>-->
                                                 <td class="left"><?php echo $value['order_qty']; ?></td>
                                                <td class="right"><?php echo get_unit_name($value['unit']); ?></td>
                                                
                                                <td class="right"><?php echo $value['rate']; ?></td>
                                                <td class="right"><?php $total =  $value['order_qty']*$value['rate'];?>
                                                    
                                                    <?php echo $total; ?>
                                                    <?php $sum+= $total; ?>
                                                </td>
                                            </tr>


                                           <?php } } }?>
                                            
                                        </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</strong></td>
                                                    <td class="right"><strong><?php echo number_format($sum); ?></strong></td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>
                                
                            </div>
                        
                    </div>
                </div>
                <div class="row">
                                    <div class="col-lg-12 text-right">
                                        <button class="btn btn-primary button"  onclick="proceed(<?php echo $get_invoice_data[0]['id']; ?>)"> Proceed </button>
                                       
                                         <input style="padding:5px;" value="Print Document" type="button" onclick="myFunction()" class="button"></input>
          
                                    </div>
                                </div>
           
       <?php  $this->load->view('footer'); ?>
        
</body>
<script type="text/javascript">
    function myFunction()
        {
             var mywindow = window.open('', 'PRINT', 'height=500,width=700');
            window.print();
        }

       /* function proceed(id)
        {
            var ids = id;
             
              $.ajax({
                type:'POST',
               
                url:'<?php echo base_url('Purchase_order/email_to_vendor/'); ?>'+ids,
                data:ids,
                dataType:'json',
                success:function(data){
                   
                    alert('ok');
                },
                error:function(data){console.log(data.responseText);}
            });
        }*/


     </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> 