<?php
session_start();

include("../../php_crud/my_class.php");
$obj=new my_class();
extract($_GET);
$inv_no;
$fee_mas_info_table = "_fee_master_invoice fmi LEFT JOIN _pf_std_personal_info psf ON fmi._std_id=psf._id";
$fee_mas_info_cols = "psf._uniq_id AS std_uniq_id,psf._full_name AS std_name,fmi._month AS bill_mon,fmi._year AS bill_year,
						fmi._total_amount AS tot_amount,fmi._due_amount AS due_amount,fmi._paid_amount AS paid_amount,fmi._status AS payment_status";
$fee_mas_info_where_cond = "fmi._invoice_no='$inv_no'";
$fee_mas_info = $obj->View_column_details_By_Cond($fee_mas_info_table,$fee_mas_info_cols,$fee_mas_info_where_cond);
$month_name = $obj->Month($fee_mas_info['bill_mon']);
?>
<div class="modal-body">
    <span style="font-size:11px;" class="alert alert-info inline no-margin"><?php echo '<b>Invoice No:</b> '.$inv_no;?></span>
	<span style="font-size:11px;" class="alert alert-info inline no-margin"><?php echo '<b>Month:</b> '.$month_name ;?></span>
    <span style="font-size:11px;" class="alert alert-info inline no-margin"><?php echo '<b>Session:</b> '.$fee_mas_info['bill_year']; ?></span>
	<span style="margin-left: 30px;"> <div class="btn-group">
		<button  data-toggle="dropdown" class="btn btn-success btn-small dropdown-toggle" type="button">
			<i class="icon-print  align-top bigger-125 icon-on-right"></i>Print
			<i class="icon-angle-down icon-on-right"></i>
		</button>
		<ul class="dropdown-menu dropdown-success dropdown-menu-right">
			<li><a href="#" onclick="coll_id_inv_copy(<?php echo $inv_no; ?>,'Student')">Student Copy</a></li>
			<li><a href="#" onclick="coll_id_inv_copy(<?php echo $inv_no; ?>,'Office')">Office Copy</a></li>
			<li><a href="#" onclick="coll_id_inv_copy(<?php echo $inv_no; ?>,'Accounts')">Accounts Copy</a></li>
			<li><a href="#" onclick="coll_id_all_inv_copy(<?php echo $inv_no; ?>)">All copy</a></li>
		</ul>
	</div>
	</span>
	<div class="panel panel-info" style="margin-top: 10px;">
        <div class="panel-body">
			<table class="table">
				<tr>
					<td>
						<table class="table table-striped table-bordered">
							<tr><td>Student ID</td> <td><b><?php echo $fee_mas_info['std_uniq_id']; ?></b></td></tr>
							<tr><td>Name</td> <td><b><?php echo $fee_mas_info['std_name']; ?></b></td></tr>
							<tr><td>Total</td> <td><b><?php echo $fee_mas_info['tot_amount']; ?></b></td></tr>
							<tr><td>Due</td> <td><b><?php echo $fee_mas_info['due_amount']; ?></b></td></tr>
							<tr><td>Paid</td> <td><b><?php echo $fee_mas_info['paid_amount']; ?></b></td></tr>
							<tr><td>Status</td> <td><b><?php echo $fee_mas_info['payment_status']; ?></b></td></tr>
						</table>
					</td>
					<td>
						<?php
							$table_name="_fee_details_invoice";
							$column="*";
							$where_cond="_invoice_no='$inv_no'";

						?>
						<table class="table table-striped table-bordered">
							<?php
							foreach ($obj->View_all_data_row_column_By_Cond($table_name,$column,$where_cond) as $value)
							{
								extract($value);
								echo "<tr><td>$_fee_head</td> <td><b>$_amount</b></td></tr>";
							}
							?>
						</table>
					</td>
				</tr>
			</table>
		</div>
    </div>
</div>
<!--<div class="modal-footer">
	
</div>-->