var reconstore=new Ext.data.JsonStore({
id:'reconstore',
fields:[
'application_no',
'student_name',
'college_name',
'dept_name',
'college_id',
'dept_id',
'batch_name',
'batch_id',
'flag',
'registration_no',
'total_amount',
'dept_name',
'payment_mode',
'reference_no',
'created_date',
'total_fee',
'mobile_no',
'tpsl_ref_no',
'app_pay_id',
'payment_mode',
'tokenid',
'payment_gateway',
'payment_type',
'category_id'
],
url:'/default/onlineappln/reconciliationtrans',
root:'applist',
totalProperty: 'totalCount'
});
reconstore.load({params: {start:0, limit:20,application_no:''}});
function renderimage(value, metaData, record, rowIndex, colIndex, store){
var allowreconciliation = record.data.allowreconciliation;
if(!Ext.isEmpty(record.data.response_result)){
return '
'+ record.data.response_result+'
';
}else{
return '
';
}
}
var recongrid=new Ext.grid.EditorGridPanel({
store:reconstore,
loadMask:true,
id:'recongrid',
title:'You Can Check Your Transaction Status.',
clicksToEdit: 1,
width:'100%',
height:Ext.getBody().getViewSize().height-140,
autoScroll: true,
storeId: 'jsstore',
remoteSort: true,
totalProperty:'totalCount',
columns:[{
header:'reference_no',
width:80,
dataIndex:'reference_no',
hidden:true
},{
header:'contact_no',
id:'contact_no',
width:80,
dataIndex:'mobile_no',
hidden:true
},{
header:'Transaction Number',
width:120,
dataIndex:'reference_no',
align: 'left',
sortable: true
},{
header:'Application Number',
width:120,
dataIndex:'application_no'
},{
header:'Student Name',
id:'astudent_name',
width:200,
dataIndex:'student_name',
align: 'left',
sortable: true
},{
header:'token id',
id:'tokenid',
width:200,
dataIndex:'tokenid',
align: 'left',
sortable: true,
hidden:true
},{
header: 'Transaction Date',
id: 'acurrent_addr',
width: 100,
dataIndex: 'created_date',
align: 'left',
sortable: true
},{
header:'app_pay_id',
id:'app_pay_id',
width:100,
dataIndex:'app_pay_id',
align: 'left',
sortable: true,
hidden:true
},{
header:'Amount',
id:'total_fee',
width:100,
dataIndex:'total_fee',
align: 'left',
sortable: true
},{
header:'tpsl_ref_no',
id:'paymode_ref_no',
width:100,
dataIndex:'tpsl_ref_no',
align: 'left',
sortable: true,
hidden:true
},{
header: 'Get Status',
width:100,
dataIndex:'trans_id',
renderer:renderimage,
align: 'center'
},{
header:'payment_mode',
id:'payment_mode',
width:100,
dataIndex:'payment_mode',
align: 'left',
sortable: true,
hidden:true
},{
header:'payment_gateway',
id:'payment_gateway',
width:100,
dataIndex:'payment_gateway',
align: 'left',
sortable: true,
hidden:true
}
],
viewConfig:{
stripeRows:true,
deferEmptyText:true,
emptyText:"No Records Found"
},listeners: {'cellclick':deptedit},
});
function deptedit(grid, rowIndex, columnIndex, e)
{
if(columnIndex==10){
var record = grid.getStore().getAt(rowIndex);
rrjsonData = Ext.util.JSON.encode(record.data);
var college_id = record.data.college_id;
var payment_gateway = record.data.payment_gateway;
var url ='/default/onlineappln/reconredirect';
myMask.show();
Ext.Ajax.request({
url: url,
params: {
rrjsonData:rrjsonData
},
success: function(resobj){
myMask.hide();
var result = resobj.responseText;
restext=Ext.util.JSON.decode(result);
if(restext.msg == 'status_updated'){
Ext.Msg.alert('Success','Payment Gateway Response: '+restext.res+', Message: '+restext.error_text);
}
reconstore.reload();
},
failure: function(resobj)
{
Ext.Msg.alert('Failed','Failed To Process Your Request');
myMask.hide();
}
});
}
}
var recwin = new Ext.Window({
id:'recwin',
name:'recwin',
maximized: true,
width:'100%',
autoScoll:true,
items:[recongrid]
});
recwin.show();