| Current Path : /home2/wtmwscom/public_html/member/ |
| Current File : /home2/wtmwscom/public_html/member/product_sale_income_report.php |
<?php
$title= "Invest Income Report";
include 'header.php';
include_once('lib/ps_pagination.php');
$param = '';
$param .= !empty($_GET['uid']) ? "&uid=".$_GET['uid'] : '';
?>
<h1>Matching Income Report</h1>
<section id="comments">
</section>
<table>
<thead>
<tr >
<th>S.No.</th>
<th>User ID</th>
<th>User name</th>
<th>Matching Income</th>
<th>Left carry Income</th>
<th>Right carry Income</th>
<th>TDS (10%)</th>
<th>Service Tax (10 %)</th>
<th>Net Total</th>
<th>Date</th>
</tr>
</thead>
<tbody>
<?php
$today=date("Y-m-d");
//$sqlCondition = !empty($_GET['uid']) ? " WHERE b.login_id= '".$_GET['uid']."' " : '';
$query="select a.*, b.uid as uid, b.login_id as login_id, b.name as name from
my_earning a inner join user b on a.uid = b.uid order by a.date desc";
$pager = new PS_Pagination($link, $query, 20, 5, $param);
$pager->setDebug(true);
$result = $pager->paginate();
if($result){
if(!isset($_GET['page'])){ $i=1; }else{ $i=(($_GET['page']-1)*20)+1; }
while ($row = mysqli_fetch_object($result)){
$matching_income = $row->matching_amount * 0.08;
$tds = $matching_income * 0.1;
$service_tax = $matching_income * 0.1;
$net_amount = $matching_income - ($tds+$service_tax);
$left_carry_amount = $row->left_carry_amount;
$right_carry_amount =$row->right_carry_amount;
?>
<tr <?php if($i%2){echo "class='light'";}else{echo "class='dark'";}?> >
<td><?=$i?></td>
<td><?=$row->login_id?></td>
<td><?=$row->name?></td>
<td><?=$matching_income?></td>
<td><?=$left_carry_amount?></td>
<td><?=$right_carry_amount?></td>
<td><?=$tds?></td>
<td><?=$service_tax?></td>
<td><?=$net_amount?></td>
<td><?=$row->date?></td>
</tr>
<?php }
$i++; }
?>
</tbody>
</table>
<?php echo $pager->renderFullNav();?>
<?php include 'footer.php';?>