


			JOINING FEETYPE TABLE WITH FEETYPES, FEE GROUP, FEE SESSION GROUP, FEE MASTER
			
SELECT student_fees_master.id. as invoice_number ,student_fees_master.student_session_id,
student_fees_master.fee_session_group_id, student_fees_master.created_at, fee_groups.id, 
fee_groups.name, fee_groups_feetype.id, fee_groups_feetype.fee_session_group_id,  fee_groups_feetype.fee_groups_id,fee_groups_feetype.feetype_id,
fee_groups_feetype.amount, feetype.id, feetype.type , feetype.code FROM student_fees_master 
JOIN fee_session_groups ON fee_session_groups.fee_groups_id = student_fees_master.fee_session_group_id 
JOIN fee_groups ON fee_groups.id = fee_session_groups.fee_groups_id 
JOIN fee_groups_feetype ON fee_groups_feetype.fee_session_group_id = fee_session_groups.fee_groups_id 
JOIN feetype ON feetype.id = fee_groups_feetype.feetype_id 
WHERE student_fees_master.student_session_id = '3';
			