
<div class="page-content">
<?php
$id=$_GET['id'];

include("common/sitemap.php");
$GetReceiptNo=mysql_query("SELECT * FROM `sgvu_finance_payment_varify` WHERE `trans_id` = '$id'");
$GetReceiptNo1=mysql_fetch_assoc($GetReceiptNo);

//echo "SELECT * FROM `sgvu_payu-mis` WHERE `recpt_no` = '$id'";
$GetRpt = mysql_query("SELECT * FROM `sgvu_payu-mis` WHERE `transaction_id` = '$id'");
$GetRpt1= mysql_fetch_assoc($GetRpt);


//echo "SELECT * FROM `finance_student_list` WHERE `sid` ='$GetReceiptNo1[sid]'";

$GetDetail=mysql_query("SELECT * FROM `finance_student_list` WHERE `sid` ='$GetReceiptNo1[sid]'");
$GetDetail1=mysql_fetch_assoc($GetDetail);

//echo $GetDetail1['sid'];


/*Number To Word*/
function convert_number_to_words($number) {
   
    $hyphen      = '-';
    $conjunction = '  ';
    $separator   = ' ';
    $negative    = 'negative ';
    $decimal     = ' point ';
    $dictionary  = array(
        0                   => 'Zero',
        1                   => 'One',
        2                   => 'Two',
        3                   => 'Three',
        4                   => 'Four',
        5                   => 'Five',
        6                   => 'Six',
        7                   => 'Seven',
        8                   => 'Eight',
        9                   => 'Nine',
        10                  => 'Ten',
        11                  => 'Eleven',
        12                  => 'Twelve',
        13                  => 'Thirteen',
        14                  => 'Fourteen',
        15                  => 'Fifteen',
        16                  => 'Sixteen',
        17                  => 'Seventeen',
        18                  => 'Eighteen',
        19                  => 'Nineteen',
        20                  => 'Twenty',
        30                  => 'Thirty',
        40                  => 'Fourty',
        50                  => 'Fifty',
        60                  => 'Sixty',
        70                  => 'Seventy',
        80                  => 'Eighty',
        90                  => 'Ninety',
        100                 => 'Hundred',
        1000                => 'Thousand',
        1000000             => 'Million',
        1000000000          => 'Billion',
        1000000000000       => 'Trillion',
        1000000000000000    => 'Quadrillion',
        1000000000000000000 => 'Quintillion'
    );
   
    if (!is_numeric($number)) {
        return false;
    }
   
    if (($number >= 0 && (int) $number < 0) || (int) $number < 0 - PHP_INT_MAX) {
        // overflow
        trigger_error(
            'convert_number_to_words only accepts numbers between -' . PHP_INT_MAX . ' and ' . PHP_INT_MAX,
            E_USER_WARNING
        );
        return false;
    }

    if ($number < 0) {
        return $negative . convert_number_to_words(abs($number));
    }
   
    $string = $fraction = null;
   
    if (strpos($number, '.') !== false) {
        list($number, $fraction) = explode('.', $number);
    }
   
    switch (true) {
        case $number < 21:
            $string = $dictionary[$number];
            break;
        case $number < 100:
            $tens   = ((int) ($number / 10)) * 10;
            $units  = $number % 10;
            $string = $dictionary[$tens];
            if ($units) {
                $string .= $hyphen . $dictionary[$units];
            }
            break;
        case $number < 1000:
            $hundreds  = $number / 100;
            $remainder = $number % 100;
            $string = $dictionary[$hundreds] . ' ' . $dictionary[100];
            if ($remainder) {
                $string .= $conjunction . convert_number_to_words($remainder);
            }
            break;
        default:
            $baseUnit = pow(1000, floor(log($number, 1000)));
            $numBaseUnits = (int) ($number / $baseUnit);
            $remainder = $number % $baseUnit;
            $string = convert_number_to_words($numBaseUnits) . ' ' . $dictionary[$baseUnit];
            if ($remainder) {
                $string .= $remainder < 100 ? $conjunction : $separator;
                $string .= convert_number_to_words($remainder);
            }
            break;
    }
   
    if (null !== $fraction && is_numeric($fraction)) {
        $string .= $decimal;
        $words = array();
        foreach (str_split((string) $fraction) as $number) {
            $words[] = $dictionary[$number];
        }
        $string .= implode(' ', $words);
    }
   
    return $string;
}


?>                          <div class="container-fluid">
                                

<div data-widget-group="group1">
	<div class="row">
		<div class="col-md-12">
			<div class="panel panel-default">
				<div class="panel-heading">

				</div>
				<div class="panel-body"><div class="col-md-10">
				<table cellpadding="0" cellspacing="0" width="100%" style="border:1px #000000 solid;">
				<thead><tr><td width="50%" style="padding:10px"></td><td align="right" style="padding:10px"><img src="http://www.gyanvihar.org/assets/img/logo-gv.jpg" height="50"/></td></tr></thead>
				<tbody>
				<tr><td style="padding:10px; border:1px #000000 solid"><b>Transaction No:</b> <?php echo $id; ?></td><td style="padding:10px; border:1px #000000 solid"><b>Date:</b> <?php echo $dt= $GetRpt1['date']; 
				
				?></td></tr>
				<tr><td style="padding:10px; border:1px #000000 solid"><b>Student's Name:</b> <?php echo $GetDetail1['student_name']; ?> (SID: <?php echo $GetReceiptNo1['sid']; ?>)</td><td style="padding:10px; border:1px #000000 solid"><b>Father's Name:</b> <?php echo $GetDetail1['father_name']; ?></td></tr>
				<tr><td style="padding:10px; border:1px #000000 solid"><b>Course Name:</b> <?php 
				$GetCourseName = mysql_query("SELECT * FROM `sgvu_courses` WHERE `course_id` = '$GetDetail1[course]'");
				$GetCourseName1 = mysql_fetch_assoc($GetCourseName);
				echo $GetCourseName1['coursename'];
				
				$GetDept=mysql_query("SELECT * 
FROM  `sgvu_finance_school` 
WHERE  `id` ='$GetCourseName1[finance_school]'");
				$GetDept1=mysql_fetch_assoc($GetDept);
				
				?></td><td style="padding:10px; border:1px #000000 solid"><b>School:</b> <?php echo $GetDept1['SchoolName']; ?></td></tr>
				<tr>
				  <td style="padding:10px; border:1px #000000 solid"><b>Semester:</b> <?php echo $GetReceiptNo1['sem']; ?> Semester</td><td style="padding:10px; border:1px #000000 solid"><b>Year:</b> <?php echo date('Y');?></td></tr>
				<tr><td style="padding:10px; border:1px #000000 solid"><b>Fee Particulars:</b> <br />
				PayU Tranastion Id: <?php echo $id; ?><br />
				
				<?php  
				$GetFeeDetails = mysql_query("SELECT * FROM `sgvu_finence_receipt1` WHERE `recpt_no` = '$_GET[id]'");
				while($GetFeeDetails1 = mysql_fetch_assoc($GetFeeDetails))
				{
				$GetFeeType=mysql_query("SELECT * FROM `sgvu_fee_type` WHERE `id` ='$GetFeeDetails1[fee_type]'");
				$GetFeeType1=mysql_fetch_assoc($GetFeeType);
				echo $GetFeeType1['fees_type'];
				echo '&nbsp;:&nbsp;Rs.';
				echo $amt[]=$GetFeeDetails1['amount'];
				echo '<br>';
				}
				echo '<hr>';
				echo 'Grand Total:&nbsp;Rs.'.array_sum($amt);
				
				?></td><td style="padding:10px; border:1px #000000 solid"><b>Amount:</b> Rs. <?php echo $pay = array_sum($amt); ?> (<?php echo convert_number_to_words($pay);?> Rupees Only )</td></tr>
				<tr>
				  <td style="padding:10px; border:1px #000000 solid"><b>By:</b> PayU (Online)  </td><td style="padding:10px; border:1px #000000 solid"><b>Cashier:</b> </td></tr>
				</tbody>
				
				
				</table>
				<div style="padding-top:5px">1. Fee once deposited is not refundable/adjustment in any case.<br />
</div><br /><br />
					<a href="javascript:window.print()" class="btn btn-inverse"><i class="ti ti-printer"></i></a>
					</div>
						
					
					</div>
					
					
					
					
					
					
					
				</div>
				<div class="panel-footer"></div>
			</div>
			
			
			
			
			
			
		</div>
	</div>
</div> <!-- .container-fluid -->
                        </div>
						
						<script type="text/javascript" src="assets/js/jquery-1.10.2.min.js"></script> 							<!-- Load jQuery -->
<script type="text/javascript" src="assets/js/jqueryui-1.10.3.min.js"></script> 							<!-- Load jQueryUI -->
<script type="text/javascript" src="assets/js/bootstrap.min.js"></script> 								<!-- Load Bootstrap -->
<script type="text/javascript" src="assets/js/enquire.min.js"></script> 									<!-- Load Enquire -->

<script type="text/javascript" src="assets/plugins/velocityjs/velocity.min.js"></script>					<!-- Load Velocity for Animated Content -->
<script type="text/javascript" src="assets/plugins/velocityjs/velocity.ui.min.js"></script>

<script type="text/javascript" src="assets/plugins/wijets/wijets.js"></script>     						<!-- Wijet -->

<script type="text/javascript" src="assets/plugins/codeprettifier/prettify.js"></script> 				<!-- Code Prettifier  -->
<script type="text/javascript" src="assets/plugins/bootstrap-switch/bootstrap-switch.js"></script> 		<!-- Swith/Toggle Button -->

<script type="text/javascript" src="assets/plugins/bootstrap-tabdrop/js/bootstrap-tabdrop.js"></script>  <!-- Bootstrap Tabdrop -->

<script type="text/javascript" src="assets/plugins/iCheck/icheck.min.js"></script>     					<!-- iCheck -->

<script type="text/javascript" src="assets/plugins/nanoScroller/js/jquery.nanoscroller.min.js"></script> <!-- nano scroller -->

<script type="text/javascript" src="assets/js/application.js"></script>
<script type="text/javascript" src="assets/demo/demo.js"></script>
<script type="text/javascript" src="assets/demo/demo-switcher.js"></script>

<script type="text/javascript" src="assets/plugins/datatables/jquery.dataTables.js"></script>
<script type="text/javascript" src="assets/plugins/datatables/dataTables.bootstrap.js"></script>
<script type="text/javascript" src="assets/demo/demo-datatables.js"></script>
