
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tableBorder">
  <tr>
    <td class="mainTableTitle">

      <span>&nbsp;&nbsp;&raquo;</span> Client Payment List

    </td>
  </tr>


 <tr>
    <td>

 <!-- Client Payment List -->

 <table class="gbTable">

   <tr class="header">
     <td width="2%"><div align="left" style="padding-left:5px;">NR</div></td>
     <td width="15%"><div align="left" style="padding-left:5px;">Date</div></td>
     <td width="12%"><div align="left" style="padding-left:5px;">Login</div></td>
     <td width="7%"><div align="left" style="padding-left:5px;">Parent</div></td>
     <td width="12%"><div align="left" style="padding-left:5px;">Client Type</div></td>
     <td width="12%"><div align="left" style="padding-left:5px;">Amount</div></td>
     <td width="10%"><div align="left" style="padding-left:5px;">Type</div></td>
     <td width="30%"><div align="left" style="padding-left:5px;">Description</div></td>
   </tr>



<?
$i=1;
$add = 0;
$return = 0;
if(is_array($paymentList))
{
    foreach($paymentList as $row)
    {
        $passid = $i;
?>

      <?
	  		if($i%2==0)
	  		 {
	  		     $str = "
	  		 		     <TR id = \"$passid\" class=\"row2 \"
	  		 		                   onmousedown=\"rowPointer(this, 'down', 'row2', 'rowSel', 'rowMark')\"
	  		 		                   onmouseover=\"rowPointer(this, 'over', 'row2', 'rowSel', 'rowMark')\"
	  		                   onmouseout=\"rowPointer(this, 'out', 'row2', 'rowSel', 'rowMark')\">";
	  		 }
	  		else
	  		 {
	  			$str = "
	  					 <TR id = \"$passid\" class=\"row1 \"
	  					               onmousedown=\"rowPointer(this, 'down', 'row1', 'rowSel', 'rowMark')\"
	  					               onmouseover=\"rowPointer(this, 'over', 'row1', 'rowSel', 'rowMark')\"
	  		               onmouseout=\"rowPointer(this, 'out', 'row1', 'rowSel', 'rowMark')\">";
	  		 }
	         echo $str;
	  ?>

 <td align=center class="tableBorderAll" style="padding-left:0px;padding-top:2px;padding-bottom:2px;"><input name="checkActive" type="checkbox"  id="checkActive" value="1" /></td>
 <td align=left class="tableBorderAll" style="padding-left:5px;padding-top:2px;padding-bottom:2px;"><?=$row->paymentdate?></td>
 <td align=left class="tableBorderAll" style="padding-left:5px;padding-top:2px;padding-bottom:2px;"><?=$row->login?></td>
 <td align=left class="tableBorderAll" style="padding-left:5px;padding-top:2px;padding-bottom:2px;"><?=$row->id_reseller?></td>
 <td align=left class="tableBorderAll" style="padding-left:5px;padding-top:2px;padding-bottom:2px;"><?=$row->clienttype?></td>
 <td align=left class="tableBorderAll" style="padding-left:5px;padding-top:2px;padding-bottom:2px;"><?=$row->amount?></td>
 <td align=left class="tableBorderAll" style="padding-left:5px;padding-top:2px;padding-bottom:2px;">
    <?
        if($row->type==1)
        {
            $add += $row->amount;
            echo'Add';
        }
        else
        {
            $return += $row->amount;
            echo'Return';
        }
    ?>
 </td>
 <td align=left class="tableBorderAll" style="padding-left:5px;padding-top:2px;padding-bottom:2px;"><?=$row->description?></td>

   </tr>

<?
$i++;
}

}

?>


 </table>

<!-- End client payment List -->

    </td>
  </tr>

  <tr>
    <td align="center" style="padding-top:5px;">

    <input type="hidden" name="startdate" id="startdate" value="<?=$startdate?>" />
    <input type="hidden" name="enddate" id="enddate" value="<?=$enddate?>" />
    <input type="hidden" name="wholesale_id" id="wholesale_id" value="<?=$wholesale_id?>" />
	<input type="hidden" name="gk_register_id" id="gk_register_id" value="<?=$gk_register_id?>" />
	<input type="hidden" name="ivr_id" id="ivr_id" value="<?=$ivr_id?>" />
    </td>
  </tr>

  <tr>
    <td align="center" style="padding-top:0px;">

    <!-- Client payment summery start -->
        <table width="50%" border="0" cellspacing="0" cellpadding="0" class="tableBorder">
          <tr>
            <td colspan="2" class="mainTableTitle"><span>&nbsp;&nbsp;&raquo;</span> Client Payment Summary</td>
          </tr>

         <tr>
            <td class='formLabelRigit' width="50%" style='padding-top:10px;'> Total Add :  </td>
            <td class='formLabelLeft' width="50%" style='padding-top:10px;'><?=$add?></td>
         </tr>

         <tr>
            <td class='formLabelRigit'>  Total Return :  </td>
            <td class='formLabelLeft'><?=$return?></td>
         </tr>
       </table>
    <!-- Client payment summery end -->

    </td>
  </tr>

</table>