

<?php $this->load->view("common/header"); ?>

<div style="top:5px;" class="panel-tools open">

<button data-toggle="dropdown" class="btn btn-blue dropdown-toggle" onClick="window.print()">

<i class="fa fa-print"></i>

</button>

</div>



<style type="text/css">

th{

	text-align:center !important;

}

.report_view_th{

	color:#000 !important;

	text-align:center !important;	

}

body{

	background-color:#fff !important;

	font-size:12px;

	

}

p{

	margin:0;

}

.modal-body {

  padding: 2px 15px 15px;

  position: relative;

}

body .modal {

/* new custom width */

width: 750px;

/* must be half of the width, minus scrollbar on the left (30px) */

margin-left: -375px;

}

.print-table td, th{

	padding:1px;

	vertical-align:top !important;

}

thead { display: table-header-group; }

tfoot { display: table-footer-group; }

.width_cus{

	width:100px !important;

}

.width_qty{

	width:100px !important;

}

</style>

<!--https://css-tricks.com/almanac/properties/p/page-break/-->



<!--onLoad="window.print()-->



<?php 

$ref_usr=new User_Model;



$user_details=$ref_usr->get_user_info($sale_rtn_details['user']);

$inv_name='';

$inv_name=$user_details['invoice_name'];

$inv_user_name=$user_details['user_first_name'];

$discount_enable=false;

if($inv_name=='AKAKI TRADING'){

	$discount_enable=false;

}

if($inv_name=='AKAKI HOMES'){

	$discount_enable=true;

}

//echo 'dis_enable:'.$discount_enable;

$cr_limit_name='';

if($sale_rtn_details['cr_interest']){

//get unit cr limit name

$ref_cr_lmt=new Common_Model(); 

$cr_limit_des=$ref_cr_lmt->get_cr_limit_name_by_val($sale_rtn_details['cr_interest']);

//print_r($cr_limit_des);

$cr_limit_name=$cr_limit_des[0]['cr_limit_name'];

}

?>





<body onLoad="window.print()">



     <?php $this->load->view("common/report_header.php"); ?>

  <div class="row">

  <div class="col-xs-12">

<div class="col-xs-6">

<p>Customer Code: <?php echo $customer_details['cus_code']; ?></p>

<p>Name and Address: <?php echo $customer_details['cus_name']; ?> <?php echo $customer_details['cus_address']; ?> &nbsp; <?php echo $customer_details['cus_phone']; ?></p>



</div>

<div class="col-xs-4 pull-right">

<p>INVOICE: SALES RETURN </p>

<p>Date: <?php echo display_date_time_format($sale_rtn_details['sl_rtn_datetime']); ?></p>

</div>

</div>

</div>



<div class="print-start">





  



<table class="print-table" width="100%">

<thead>

<tr class="report_view_th">

  <th colspan="7" class="col-xs-1 text-right">

  <span style="float:right;">Invoice No: <?php echo $sale_rtn_details['sl_rtn_reference_no']; ?></span>

  </th>

  </tr>

<tr class="report_view_th text-center">

<th class="col-xs-1" width="20px">No</th>

<th class="col-xs-2">Description</th>

<th class="col-xs-1">Code</th>

<th class="col-xs-1">Quantity</th>

<th class="col-xs-1">Unit Price</th>

<th class="col-xs-1">Discount</th> 

<th class="col-xs-2" align="center">Subtotal</th>

</tr>

</thead>

<tbody>

 <?php 

 $tmpcount=0;

  foreach ($sale_rtn_item_list as $row)

 {

	 $tmpcount++;

 ?>  

<tr>

<td style="text-align:center; width:40px; vertical-align:middle;"><?php echo $tmpcount ?></td>

<td style="vertical-align:middle;">

  <?php echo $row['product_name']; ?> </td>

<td style="width: 80px; text-align:center; vertical-align:middle;"><?php echo $row['product_code']; ?></td>

<td style="width: 80px; text-align:center; vertical-align:middle;"><?php echo number_format($row['quantity'], 2, '.', ''); ?></td>

<td style="text-align:right; width:100px;"><?php echo number_format($row['unit_price'], 2, '.', ','); ?></td>



<td style="width: 100px; text-align:right; vertical-align:middle;"> (<?php echo $row['discount'] ?>) <?php echo number_format($row['discount_val'], 2, '.', ',') ?></td> <td style="text-align:right; width:120px;"><?php echo $row['gross_total']; ?></td>

</tr>

<?php }?>



<?php if ($sale_rtn_details['sl_rtn_inv_discount']){ ?>

<tr>

  <td style="text-align:right; padding-right:10px;" colspan="6">Order Discount</td>

  <td style="text-align:right; padding-right:10px;"><?php echo number_format($sale_rtn_details['sale_inv_discount_amount'], 2, '.', ',') ?></td>

</tr>

<?php }?>

<tr>

<td style="text-align:right; font-weight:bold;" colspan="6">Total Amount 

</td>

<td style="text-align:right; padding-right:10px; font-weight:bold; border-top:1px solid #000; border-bottom:4px double #000;"><?php echo number_format($sale_rtn_details['sl_rtn_total'], 2, '.', ',') ?></td>

</tr>







</tbody>

</table>

</div>







                 





 </body>







