<?php 
	require "_header.php";
	require "data/combo_semester.php";
?>
<div id="main-content">
<script type="text/javascript">
var labelArray;
labelArray = [
	['Enrollment Reg No:'],
	['Branch'],
	['Semester:'],
	['Name:'],
	
];




var branchstore = new Ext.data.ArrayStore({		
	fields: ['branch_id','branch_name'],
	data:Ext.semester.branchall
});

var semesterstore = new Ext.data.ArrayStore({		
	fields: ['semester_id','semester_name'],
	data:Ext.semester.semester
});
var divisionstore = new Ext.data.ArrayStore({
    	fields:['division_id','division_name'],
		data: Ext.semester.division
	});	

var branch_disp = new Ext.form.TextField({
	name: 'branch_disp',
	id:'branch_disp',
	hidden:true
});

var semester_disp = new Ext.form.TextField({
	name: 'semester_disp',
	id:'semester_disp',
	hidden:true
});

studentstore = new Ext.data.JsonStore({
	url:'data/getstudent-feesrecive.php',
    root: 'data',
	totalProperty: 'total',
	fields: [{
		name: 'student_id',
		type:'int'
	},{
		name: 'student_name',
		type: 'string'
	},{
		name: 'student_gturegno',
		type: 'int'
	}] 
});

Ext.onReady(function(){
	Ext.QuickTips.init();

	


	
	var StudentPerfomanceForm = new Ext.FormPanel({
    	labelWidth: 80,
        url:'report-student-all-fees-records-result.php',
		frame:true,
		autoHeight: true,
		standardSubmit:true,
        title: '',
        bodyStyle:'padding:6px 6px 0',
        layout:'form',
		items :[
				{
				xtype:'combo',	
				name: 'branch_name',
				id:'branch_name',
				hiddenName:'branch_hidden',
				labelSeparator:'',	
				fieldLabel :labelArray[1] ,
				displayField:'branch_name',
				valueField: 'branch_id',
				editable:true,
				width:180,
				triggerAction:'all',
				mode:'local',
				allowBlank:true,
				store: branchstore,
			    listeners: {'select': function(cmb, rec, idx){
					Ext.getCmp('branch_disp').setValue(this.getRawValue());
					Ext.getCmp('semester_name').reset();
					Ext.getCmp('student_id').reset();	
					studentstore.removeAll();
			  	}}
				},
				{
					xtype:'combo',
					name: 'semester_name',
					id:'semester_name',
					hiddenName:'semester_hidden',
					labelSeparator:'',	
					fieldLabel :labelArray[2] ,
					displayField:'semester_name',
					valueField: 'semester_id',
					editable:true,
					triggerAction:'all',
					mode:'local',
					width:180,
					allowBlank:true,
					store: semesterstore,
				    listeners: {'select': function(cmb, rec, idx){
						Ext.getCmp('semester_disp').setValue(this.getRawValue());
						if(Ext.getCmp('branch_name').getValue()!=""){
							studentstore.load({params: {'branch_id': Ext.getCmp('branch_name').getValue(),'semester_id': Ext.getCmp('semester_name').getValue()}});
							
						}else{
							alert('Select Branch First')
							this.reset();
						}
						var branch=Ext.getCmp('branch_name').getValue();
							divisionstore.filter('division_id',branch+cmb.getValue(),false,true,true);
							var cnt=divisionstore.getCount();
							if(cnt==1)
								{
									Ext.getCmp('division_id').setValue('A');
								}
				  	}}
				},
				{		
					xtype: 'combo',
					name: 'division_id',
					id:'division_id',
					labelSeparator:'',	
					fieldLabel :'Division :' ,
					forceSelection:true,				
					displayField:'division_name',
					valueField: 'division_name'
					,lastQuery:''
					,allowBlank:true
					,triggerAction:'all'
					,mode:'local'
					,store:divisionstore
					,width:180
					,selectOnFocus: true,
				
					listeners: {'select': function(cmb, rec, idx){
		if(Ext.getCmp('semester_name').getValue()!=""){
			studentstore.load({params: {'branch_id': Ext.getCmp('branch_name').getValue(),'semester_id': Ext.getCmp('semester_name').getValue(),'division_id': cmb.getValue()}});
			
		}else{
			alert('Select Semester First')
			this.reset();
		}}}
				},
				{
					xtype:'combo',
					name: 'student_id',
					id:'student_id',
					hiddenName:'student_hidden',
					labelSeparator:'',	
					fieldLabel :labelArray[3] ,
					displayField:'student_name',
					valueField: 'student_id',
					editable:true,
					width:180,
					triggerAction:'all',
					mode:'local',
					allowBlank:true,
					store: studentstore,
					listeners: {'select': function(cmb, rec, idx){
					if(Ext.getCmp('branch_name').getValue()!="" && Ext.getCmp('semester_name').getValue()!=""){
								
						}else{
							alert('Select Branch And Semester First')
							this.reset();
						}
					}}
					
				},
				{
					xtype:'checkbox',
					name: 'show_detail',
					id:'show_detail',
					labelSeparator:'',	
					fieldLabel :'Show Detail :'
					
				}
				]
 	});
	
	var StudentPerfomanceWindow = new Ext.Window({
        title: 'Student Fees Records',
        autoHeight: true,
        width: 310,
		modal:true,
        layout: 'fit',
		border: false,
		closeAction:'close',
		collapsible:'true',
		items: StudentPerfomanceForm,
		buttonAlign: 'center',
	    buttons: [{
			text:'View Report',
			tabIndex:2,
			iconCls: 'new-tab',
			handler: function(b, e){	
					
			var branch_hidden=StudentPerfomanceForm.getForm().findField('branch_hidden').getValue();
			var semester_hidden=StudentPerfomanceForm.getForm().findField('semester_hidden').getValue();
			var division_id=StudentPerfomanceForm.getForm().findField('division_id').getValue();
			var student_hidden=StudentPerfomanceForm.getForm().findField('student_hidden').getValue();
			
			
			
		//	alert(show_mobile_no);
			
var redirect = 'report-student-all-fees-records-result.php?branch_hidden='+branch_hidden + '&semester_hidden='+semester_hidden + '&division_id='+division_id + '&student_hidden='+student_hidden; 
                window.location = redirect;
				
				
			}
		},{
			text: 'Reset', 
			tabIndex:3,
			iconCls: 'icon-reset',
			handler: function(){   
			  	StudentPerfomanceForm.getForm().reset();
				Ext.getCmp('student_gturegno').focus(true,500);
			}
		},{
		  	text: 'Close',
			tabIndex:4,
			iconCls: 'icon-close',
			handler: function () {    
				StudentPerfomanceWindow.close();
			}
      	}]
	});

	
	var varWidth =  (screen.width - StudentPerfomanceWindow.width)/2;
	StudentPerfomanceWindow.setPosition(varWidth,((screen.height/4)-85));
	StudentPerfomanceWindow.show();
	Ext.getCmp('student_gturegno').focus(true,1000);
});
</script>
</div>
<?php require "_footer.php";?><?php 
	require "_header.php";
	require "data/combo_semester.php";
?>
<div id="main-content">
<script type="text/javascript">
var labelArray;
labelArray = [
	['Enrollment Reg No:'],
	['Branch'],
	['Semester:'],
	['Name:'],
	
];




var branchstore = new Ext.data.ArrayStore({		
	fields: ['branch_id','branch_name'],
	data:Ext.semester.branchall
});

var semesterstore = new Ext.data.ArrayStore({		
	fields: ['semester_id','semester_name'],
	data:Ext.semester.semester
});
var divisionstore = new Ext.data.ArrayStore({
    	fields:['division_id','division_name'],
		data: Ext.semester.division
	});	

var branch_disp = new Ext.form.TextField({
	name: 'branch_disp',
	id:'branch_disp',
	hidden:true
});

var semester_disp = new Ext.form.TextField({
	name: 'semester_disp',
	id:'semester_disp',
	hidden:true
});

studentstore = new Ext.data.JsonStore({
	url:'data/getstudent-feesrecive.php',
    root: 'data',
	totalProperty: 'total',
	fields: [{
		name: 'student_id',
		type:'int'
	},{
		name: 'student_name',
		type: 'string'
	},{
		name: 'student_gturegno',
		type: 'int'
	}] 
});

Ext.onReady(function(){
	Ext.QuickTips.init();

	


	
	var StudentPerfomanceForm = new Ext.FormPanel({
    	labelWidth: 80,
        url:'report-student-all-fees-records-result.php',
		frame:true,
		autoHeight: true,
		standardSubmit:true,
        title: '',
        bodyStyle:'padding:6px 6px 0',
        layout:'form',
		items :[{
				xtype:'numberfield',
				name: 'student_gturegno',
				id:'student_gturegno',
				labelSeparator:'',	
				tabIndex:1,
				fieldLabel :labelArray[0] ,
				allowBlank:true,
				allowNegative: false,
				allowDecimals: false,
				width: 180,
				listeners: {
				specialkey: function(f,e){
					if (e.getKey() == e.ENTER){
					StudentPerfomanceForm.getForm().submit();
					}
				}
				}},
				{
				xtype:'combo',	
				name: 'branch_name',
				id:'branch_name',
				hiddenName:'branch_hidden',
				labelSeparator:'',	
				fieldLabel :labelArray[1] ,
				displayField:'branch_name',
				valueField: 'branch_id',
				editable:true,
				width:180,
				triggerAction:'all',
				mode:'local',
				allowBlank:true,
				store: branchstore,
			    listeners: {'select': function(cmb, rec, idx){
					Ext.getCmp('branch_disp').setValue(this.getRawValue());
					Ext.getCmp('semester_name').reset();
					Ext.getCmp('student_id').reset();	
					studentstore.removeAll();
			  	}}
				},
				{
					xtype:'combo',
					name: 'semester_name',
					id:'semester_name',
					hiddenName:'semester_hidden',
					labelSeparator:'',	
					fieldLabel :labelArray[2] ,
					displayField:'semester_name',
					valueField: 'semester_id',
					editable:true,
					triggerAction:'all',
					mode:'local',
					width:180,
					allowBlank:true,
					store: semesterstore,
				    listeners: {'select': function(cmb, rec, idx){
						Ext.getCmp('semester_disp').setValue(this.getRawValue());
						if(Ext.getCmp('branch_name').getValue()!=""){
							studentstore.load({params: {'branch_id': Ext.getCmp('branch_name').getValue(),'semester_id': Ext.getCmp('semester_name').getValue()}});
							
						}else{
							alert('Select Branch First')
							this.reset();
						}
						var branch=Ext.getCmp('branch_name').getValue();
							divisionstore.filter('division_id',branch+cmb.getValue(),false,true,true);
							var cnt=divisionstore.getCount();
							if(cnt==1)
								{
									Ext.getCmp('division_id').setValue('A');
								}
				  	}}
				},
				{		
					xtype: 'combo',
					name: 'division_id',
					id:'division_id',
					labelSeparator:'',	
					fieldLabel :'Division :' ,
					forceSelection:true,				
					displayField:'division_name',
					valueField: 'division_name'
					,lastQuery:''
					,allowBlank:true
					,triggerAction:'all'
					,mode:'local'
					,store:divisionstore
					,width:180
					,selectOnFocus: true,
				
					listeners: {'select': function(cmb, rec, idx){
		if(Ext.getCmp('semester_name').getValue()!=""){
			studentstore.load({params: {'branch_id': Ext.getCmp('branch_name').getValue(),'semester_id': Ext.getCmp('semester_name').getValue(),'division_id': cmb.getValue()}});
			
		}else{
			alert('Select Semester First')
			this.reset();
		}}}
				},
				{
					xtype:'combo',
					name: 'student_id',
					id:'student_id',
					hiddenName:'student_hidden',
					labelSeparator:'',	
					fieldLabel :labelArray[3] ,
					displayField:'student_name',
					valueField: 'student_id',
					editable:true,
					width:180,
					triggerAction:'all',
					mode:'local',
					allowBlank:true,
					store: studentstore,
					listeners: {'select': function(cmb, rec, idx){
					if(Ext.getCmp('branch_name').getValue()!="" && Ext.getCmp('semester_name').getValue()!=""){
								
						}else{
							alert('Select Branch And Semester First')
							this.reset();
						}
					}}
					
				},
				{
					xtype:'checkbox',
					name: 'show_detail',
					id:'show_detail',
					labelSeparator:'',	
					fieldLabel :'Show Detail :'
					
				}
				]
 	});
	
	var StudentPerfomanceWindow = new Ext.Window({
        title: 'Student Fees Records',
        autoHeight: true,
        width: 310,
		modal:true,
        layout: 'fit',
		border: false,
		closeAction:'close',
		collapsible:'true',
		items: StudentPerfomanceForm,
		buttonAlign: 'center',
	    buttons: [{
			text:'View Report',
			tabIndex:2,
			iconCls: 'new-tab',
			handler: function(b, e){	
				StudentPerfomanceForm.getForm().submit();	
			}
		},{
			text: 'Reset', 
			tabIndex:3,
			iconCls: 'icon-reset',
			handler: function(){   
			  	StudentPerfomanceForm.getForm().reset();
				Ext.getCmp('student_gturegno').focus(true,500);
			}
		},{
		  	text: 'Close',
			tabIndex:4,
			iconCls: 'icon-close',
			handler: function () {    
				StudentPerfomanceWindow.close();
			}
      	}]
	});

	
	var varWidth =  (screen.width - StudentPerfomanceWindow.width)/2;
	StudentPerfomanceWindow.setPosition(varWidth,((screen.height/4)-85));
	StudentPerfomanceWindow.show();
	Ext.getCmp('student_gturegno').focus(true,1000);
});
</script>
</div>
<?php require "_footer.php";?>