<?php include('parent/callMe.php');?>
<?php include('Sessioncheck.php');?>
<?php 

  
  $branch=getBranch($m);

 

?>
 <!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Favicons-->
<link rel="icon" type="image/png" href="img/favicon.png" sizes="32x32" />
<title>Print Double Voucher</title>
<!-- Favicons-->
<link rel="icon" type="image/png" href="img/favicon.png" sizes="32x32" />

<script type="text/javascript">
 //window.print();
</script>
<style> 
.section{width:45%; height:auto;float:left;padding-right:2%;margin-left:2%;margin-top:2%;}
     
tr th {background-color:gray; text-align:center;font-size:14px;border:1px solid black;padding:1%;}
tr td {border-bottom:1px solid black;border-left:1px solid black;padding:0.5%;}

@media print {
    #Header, #Footer { display: none !important; }
}
@media screen
   {
      p.bodyText {font-family:verdana, arial, sans-serif;}
   }

   @media print
   {
      p.bodyText {font-family:georgia, times, serif;}
   }
   @media screen, print
   {
      p.bodyText {font-size:10pt}
   }
   @media print {
  a[href]:after {
    content: none !important;
  }
}
</style>
</head>
<body>
<?php

 $array1=array("Institute Copy","Student Copy");

 for($i=0; $i<2;$i++){ ?>

 <!-- Vouchere Fist -->
<div class="section" style="<?php if($i<1){echo 'border-right: 2px solid black;border-right-style:dotted;';}?>">
   
   <div style="width:100%; text-align:center; height:auto;font-size:12px;">
            <?php echo $array1[$i]; ?>

   </div>
   
      <div style="">
        
        <div style="width: 15%;float: left;">
            <img src="<?php echo DOMAIN.AgentDirectory;?>img/<?php echo $branch[0]['logo']; ?>" style="height:80px;width:80px;" />    
        </div>
        <div style="width:85%;font-size:18px;float: right;margin-top: 25px;text-align:center;"><?php echo $branch[0]['Branch_Name'];?></div>

      </div>
      <br><br>
       <div style="font-size:10px; text-align:center;">  <?php echo $branch[0]['Branch_Location'];?> </div>
       <div style="font-size:10px; text-align:center;">  Contact: <?php echo $branch[0]['branch_contact'];?> </div>

<hr>



   <div style="width:50%; font-size:12px;text-align:left; height:25px; float:left;">

         Month: ___________ 

   </div>


   <div style="width:50%;font-size:12px; text-align:right; height:25px; float:left;">

        Due Date: ____________ 

   </div>

  


   <table width="100%" style="font-size:11px;" cellspacing="0">  
   
   
      <tr>  
         <td width="15%" style="border:none;"> Name:   </td>
         <td width="35%" style="border-bottom: 1px solid black;text-align:center;border-left:none;">    </td>
      
         <td width="15%" style="border:none;"> F.Name:   </td>
         <td width="35%" style="border-bottom: 1px solid black;text-align:center;border-left:none;">    </td>

      </tr>


  
  
      <tr>  
         <td width="15%" style="border:none;"> Class (Sec):   </td>
         <td width="35%" style="border-bottom: 1px solid black;text-align:center;border-left:none;"> 
          </td>
      
         <td width="15%" style="border:none;"> Roll No:   </td>
         <td width="35%" style="border-bottom: 1px solid black;text-align:center;border-left:none;">  
           </td>

      </tr>




      <tr>  
         <td width="15%" style="border:none;">Session:   </td>
         <td width="35%" style="border-bottom: 1px solid black;text-align:center;border-left:none;"> 
           </td>
      
         <td width="15%" style="border:none;"> Adm #:   </td>
         <td width="35%" style="border-bottom: 1px solid black;text-align:center;border-left:none;font-size:14px;">  
       
         
          </td>

      </tr>

 </table>




   <table width="100%" style="font-size:11px;margin-top:1%;" cellspacing="0">  
   

      <tr>  
         <th width="70%"> Particulars    </td>
         <th width="30%" style="text-align:center;border-right:1px solid gray;">  Amount </td>
      </tr>

      <tr style="background-color: lightgray;">  
         <td width="70%"> Standard Fee   </td>
         <td width="30%" style="text-align:center;border-right:1px solid gray;">  </td>
      </tr>

      <tr>  
         <td width="70%"> Previous Balance   </td>
         <td width="30%" style="text-align:center;border-right:1px solid gray;">   </td>
      </tr>
      
         
      <tr>  
         <td width="70%"> Monthly Fee   </td>
         <td width="30%" style="text-align:center;border-right:1px solid gray;"> </td>
      </tr>


      <tr>  
         <td width="70%"> Transport Fee   </td>
         <td width="30%" style="text-align:center;border-right:1px solid gray;">   </td>
      </tr>



      <tr>  
         <td width="70%"> <?php if ($branch[0]['misc_title']!=NULL){echo $branch[0]['misc_title'];}else {echo 'Miscellaneous';} ?>   </td>
         <td width="30%" style="text-align:center;border-right:1px solid gray;">   </td>
      </tr>


   <?php 
      $fee_types = $m->get("eduportal_fee_types");     
      foreach ($fee_types as $type) {    
      
   ?>
     <tr>  
         <td width="70%"> <?php echo $type['feetype_name']; ?>   </td>
         <td width= "30%" style="text-align:center;border-right:1px solid gray;"> 
          </td>
      </tr>

    <?php } ?>
        



        <tr>  
         <td width="70%"> Fee Discount   </td>
         <td width="30%" style="text-align:center;border-right:1px solid gray;">
          
           </td>
      </tr>
 
      
      <tr>  
         <th width="70%" style="text-align:left;"> &nbsp;&nbsp; Total   </th>
         <th width="30%" style="text-align:center;">  
           </th>
          
      </tr>
   
    
    
      <tr>  
         <td width="70%"> Balance </td>
         <td width="30%" style="text-align:center;border-right:1px solid gray;"> </td>         
        
      </tr>



      <?php  if($branch[0]['fine_type']=="0" || $branch[0]['fine_type']==0){  ?> 

       <tr>  
         <td width="70%" style="text-align:right;">  Late Fee Fine:   </td>
         <td width="30%" style="text-align:center;border-right:1px solid gray;">  </td>
      </tr>

    <?php } ?>
 
<?php  if($branch[0]['fine_type']=="0" || $branch[0]['fine_type']==0){  ?> 
   
      <tr>  
         <td width="70%" style="text-align:right;"> After Due Date:   </td>
         <td width="30%" style="text-align:center;border-right:1px solid gray;">  </td>
      </tr>
<?php  } else { ?>

       <tr>  
         <td width="100%" colspan="2" style="text-align:left;border-right:1px solid gray;"><b> After due date      Rs fine will be charged per day.</b></td>
        
      </tr>
 <?php }  ?>
     
     
       <tr>  
         <td colspan="2" width="100%" style="text-align:left;border-right: 1px solid gray;"><b>Discount & Reason:- 
         	</td>
      </tr>
    

      
<?php  if($WorkAssignListings[0]['paid_status']==1 || $WorkAssignListings[0]['paid_status']=="1"){  ?> 
  
      <tr>  

         <th width="70%" style="text-align:right;">Paid at: <?php echo $WorkAssignListings[0]['paying_time']; ?>, <?php echo date("d-M-Y", strtotime($WorkAssignListings[0]['paying_date'])); ?>  |  Paid Amount: &nbsp;&nbsp;</th>
         <th width="30%" style="text-align:center;">  <?php echo number_format($WorkAssignListings[0]['collected_amount']+$WorkAssignListings[0]['collected_fine'],2); ?> </th>
      </tr>

      <?php if ($WorkAssignListings[0]['paid_again_amount']!=NULL) { ?>

      <tr>  

         <th width="70%" style="text-align:right;">Paid at: <?php echo $WorkAssignListings[0]['paid_again_time']; ?>, <?php echo date("d-M-Y", strtotime($WorkAssignListings[0]['paid_again_date'])); ?>  |  Paid Again Amount: &nbsp;&nbsp;</th>
         <th width="30%" style="text-align:center;">  <?php echo number_format($WorkAssignListings[0]['paid_again_amount'],2); ?> </th>
      </tr>

    <?php } ?>
   
      <?php 

  if(date("Y-m-d",strtotime($WorkAssignListings[0]['paying_date'])) > $WorkAssignListings[0]['challan_duedate'] AND $WorkAssignListings[0]['collected_fine']!=0) { ?>

<tr>  
         <th width="70%" style="text-align:right;"> Remaining: &nbsp;&nbsp;  </th>
         <th width="30%" style="text-align:center; ">  <?php echo number_format(($other_fee+$total_fee+$fee_fine)-$WorkAssignListings[0]['collected_amount']-$WorkAssignListings[0]['collected_fine']-$WorkAssignListings[0]['paid_again_amount'],2); ?> </th>
</tr>

 <?php } else {  ?>

<tr>  
         <th width="70%" style="text-align:right;"> Remaining: &nbsp;&nbsp;  </th>
         <th width="30%" style="text-align:center; ">  <?php echo number_format(($other_fee+$total_fee)-$WorkAssignListings[0]['collected_amount']-$WorkAssignListings[0]['collected_fine']-$WorkAssignListings[0]['paid_again_amount'],2); ?> </th>
</tr>
 
      
     
<?php } }  ?>

 
         <tr>  
         <td width="100%" colspan="2" style="text-align:center;border:none;"> <br> 
         
 
      <?php if($branch[0]['fee_vouc_note']!=NULL){

          echo $branch[0]['fee_vouc_note'];
        ?>
      
      <?php }else { ?>
          Defaulters of two or more months will be expelled out. 
      <?php } ?>
  
          </td>
         
      </tr>

   
   </table>



   <table width="100%" style="font-size:11px;" cellspacing="0">  
   
   
         <tr>  
         <td width="100%" colspan="2" style="text-align:center;border-left:none;color:white;"> .  </td>
         
         </tr>

         <tr>  
         <td width="100%" colspan="2" style="text-align:center;border:none;color:black;"> (Signature & Stamp) <br>
            
           <!--  <span style="font-size:8px;"> <?php echo getPrintBottom($m);?>  </span> -->

          </td>
         
         </tr>
   </table>

</div>


</div>


<?php } ?>

</body>
</html>
