<?php
session_start();

include("../../php_crud/my_class.php");
$obj=new my_class();
extract($_POST);

if($function=='stdfeeDtlsChange'){

$select=$obj->View_All_By_Cond('_pf_student_fee_assign', "_std_id='".$stdid."' AND _fee_head_id='$selectid' LIMIT 1");

if(count($select) > 0){
	if($select[0]["_fee_type"]=="M")
	{
        echo "Monthly"."~~".$select[0]["_fee_amount"];
	}
	else{
        echo "Others"."~~".$select[0]["_fee_amount"];
	}

}
else{
	$fee_table = '`_int_class_fee_declare` a LEFT JOIN `_int_fee_head` b ON b._id=a._fee_head_id';
	$fee_cols = 'a._fee_head_id _id,b._fee_head _name,b._fee_type fee_type,a._fee_amount fee_amount';
    $select=$obj->View_column_details_By_Cond($fee_table,$fee_cols, "a._fee_head_id='$selectid'");
    if($select["fee_type"]=="M")
    {
        echo "Monthly~~".$select["fee_amount"];
    }
    else{
        echo "Others~~".$select["fee_amount"];
    }

}

}

?>
