

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

<body >

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

	<style type="text/css">

.report_view_th{

	color:#000 !important;

	font-size:12px;	

}



.table-responsive td{

	font-size:11px;

	background-color:#fff !important;
		

}

h4{

	font-size:13px;

}

body{

	background-color:#fff !important;

}

</style>

		
<style  type="text/css" >

table{
	
	font-size:12px;
	
}


</style>


<div class="">



         



         

            <div class="modal-body">



 <div style="top:2px;" 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>

<div class="row">

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





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

  

   </div><!--col-xs-12-->

</div><!--row-->   





<div style="margin-bottom:15px;" class="row">



<div class="col-xs-7 pull-left">



<h4 style="margin-top:10px;"> <strong>Report : Daily Sales Note</strong></h4>






 Summary 


 <table  class="table table-bordered table-hover table-striped print-table order-table" border="1" id=""  >
   <!--<tr>
    <td></td>
    <td class="text-right">  <span id="f-date-txt"></span> <span id="t-date-txt"></span></td>
  </tr>
  <tr>-->
    <td width="150px" align="left">Sales Representative Name</td>
    <td width="150px"><div id="sale_rep_name">   <?php echo $summary['user_first_name']; ?></div></td>
  </tr>
  <tr>
    <td align="left">Route</td>
    <td><div id="rout">   <?php echo $summary['route_name']; ?></div></td>
  </tr>
  <tr>
    <td align="left">Sales Total</td>
    <td><div id="sales-total-tbl">   <?php echo number_format($summary['all_sale_total'], 2, '.', ','); ?></div></td>
  </tr>
   <tr>
    <td align="left">Collected Cash Value</td>
    <td><div id="cash-total-tbl">   <?php echo number_format($cash_value['all_cash_sale_pymnt_amount'], 2, '.', ','); ?></div></td>
  </tr>
  <tr>
    <td align="left">Collected Cheque Value</td>
    <td><div id="cheque-total-tbl">   <?php echo number_format($cheque['all_cheque_sale_pymnt_amount'], 2, '.', ','); ?></div></td>
  </tr>
 
  <tr>
    <td align="left">Total Collected Payments</td>
    <td><div id="total-payment-tbl">  <?php 
	
	echo number_format( $cash_value['all_cash_sale_pymnt_amount']+$cheque['all_cheque_sale_pymnt_amount'], 2, '.', ',');
	
	//echo 
	//$cash_value['all_cash_sale_pymnt_amount']+$cheque['all_cheque_sale_pymnt_amount']; ?></div></td>
  </tr>
</table>
</div>

</div>          





<div class="table-responsive">





<table class="table table-bordered table-hover table-striped print-table order-table" border="1" >

<thead>

<tr class="report_view_th">

<th class="col-sm-1 text-center">Referance No</th>





<th>Item</th>

<th>Qty</th>



<th>Grand Total</th>
<th>Down Payment</th>
<th>Payment</th>

<th>Payment Type</th>

<th>Balance</th>



</tr>

</thead>

<tbody>

 <?php 

 

 $tmpcount=0;
 $tot_qty=0;
 $tot_gross=0;
  foreach ($sales_list as $row)

 

 {

	 $tmpcount++;

	$to_be_received=$row['gross_total']-$row['sale_pymnt_amount'];
	 $tot_qty=$tot_qty+$row['quantity'];
	 $tot_gross=$tot_gross+$row['gross_total'];
?>
		

	
<td> <?php echo $row['card_ref_number']." / ".$row['sale_reference_no']; ?></td>

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

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

<td> <?php echo number_format($row['gross_total'], 2, '.', ','); ?></td>

<td> <?php echo number_format($row['totat_down_payment'], 2, '.', ','); ?></td>

<td> <?php echo number_format($row['sale_pymnt_amount'], 2, '.', ','); ?></td>

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

<td> <?php echo number_format($to_be_received, 2, '.', ','); ?></td>







</tr>

<?php } ?>

<tr>

<td style="text-align:right; width:40px; vertical-align:middle;"></td>

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

</td>

<td class="text-right"> <?php echo number_format( $tot_qty, 2, '.', ','); ?></td>

<td class="text-right"> <?php echo number_format($tot_gross, 2, '.', ','); ?></td>

<td> </td>

<td class="text-right"> <?php echo number_format($cash_value['all_cash_sale_pymnt_amount']+$cheque['all_cheque_sale_pymnt_amount'], 2, '.', ','); ?></td>

<td> </th>

<td class="text-right"> <?php  $all_sale_payment =$cash_value['all_cash_sale_pymnt_amount']+$cheque['all_cheque_sale_pymnt_amount'] ;echo number_format( $summary['all_sale_total']-$all_sale_payment, 2, '.', ','); ?></td>





</tr>

</tbody>

<tfoot>



</tfoot>

</table>

</div>









<div class="row">

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

</div>

<div class="col-xs-5 pull-left">

<div class="well-sm">

<p>
<br>

Sales Representative : .............................. </p> <p>
<br>
Cash Received By : ..................................</p>
<p>
<br>
Check By : ................................................ </p>

</div>

</div>

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

<div class="well-sm">

<p>

Created by:  <?php echo $this->session->userdata('ss_user_first_name'); ?> (<?php echo $this->session->userdata('ss_user_group_name'); ?>)</p> <p>

Date: <?php echo display_date_time_format(date("Y-m-d H:i:s")); ?> </p>

</div>

</div>

</div>



             

                 <!--/.col-md-12-->



</body>



