Subversion Repositories SmartDukaan

Rev

Rev 23547 | Rev 23629 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 23547 Rev 23577
Line 122... Line 122...
122
		getRechargeCommissionsPreviousItems(start, end, pre);
122
		getRechargeCommissionsPreviousItems(start, end, pre);
123
		$("#recharge-commissions-paginated .previous").blur();
123
		$("#recharge-commissions-paginated .previous").blur();
124
    });
124
    });
125
	
125
	
126
	$(".recharge-commission-details").live('click',function(){
126
	$(".recharge-commission-details").live('click',function(){
127
		var operatorId = $(this).attr('data');
127
		var operatorIdProviderIdString = $(this).attr('data').split(',');
-
 
128
		var operatorId = operatorIdProviderIdString[0];
-
 
129
		var providerId = operatorIdProviderIdString[1];
128
		console.log("operatorId = "+operatorId);
130
		console.log("operatorId = "+operatorId);
-
 
131
		console.log("providerId = "+providerId);
129
		loadRechargeCommissionDetails("recharge-commission-details-container", operatorId);
132
		loadRechargeCommissionDetails("recharge-commission-details-container", operatorId, providerId);
130
	});
133
	});
131
	
134
	
132
	$(".recharge-commission-update-details").live('click',function(){
135
	$(".recharge-commission-update-details").live('click',function(){
133
		var operatorId = $(this).attr('data');
136
		var operatorIdProviderIdString = $(this).attr('data').split(',');
-
 
137
		var operatorId = operatorIdProviderIdString[0];
-
 
138
		var providerId = operatorIdProviderIdString[1];
134
		console.log("operatorId : "+operatorId);
139
		console.log("operatorId = "+operatorId);
-
 
140
		console.log("providerId = "+providerId);
135
		var amountType = $('#amountType option:selected').val();
141
		var amountType = $('#amountType option:selected').val();
136
		console.log("amountType : "+amountType);
142
		console.log("amountType : "+amountType);
137
		var amount = $('#amount').val();
143
		var amount = $('#amount').val();
138
		console.log("amount : "+amount);
144
		console.log("amount : "+amount);
139
		var start = $( "#recharge-commissions-paginated .start" ).text();
145
		var start = $( "#recharge-commissions-paginated .start" ).text();
140
		//var end = $( "#schemes-paginated .end" ).text();
146
		//var end = $( "#schemes-paginated .end" ).text();
141
		var offset = start - 1;
147
		var offset = start - 1;
142
		if(confirm("Are you sure you want to update Recharge Commission details!") == true){
148
		if(confirm("Are you sure you want to update Recharge Commission details!") == true){
143
			updateRechargeCommissionDetails(operatorId, amountType, amount, offset, "recharge-commissions-table");
149
			updateRechargeCommissionDetails(operatorId, providerId, amountType, amount, offset, "recharge-commissions-table");
144
		}
150
		}
145
	});
151
	});
146
	
152
	
147
});
153
});
148
 
154
 
Line 299... Line 305...
299
		$('#' + domId).html(response);
305
		$('#' + domId).html(response);
300
	});
306
	});
301
}
307
}
302
 
308
 
303
function loadRechargeCommissionDetails(domId, operatorId){
309
function loadRechargeCommissionDetails(domId, operatorId){
304
	doGetAjaxRequestHandler(context+"/getRechargeCommissionByOperatorId?operatorId="+operatorId, function(response){
310
	doGetAjaxRequestHandler(context+"/getRechargeCommissionByOperatorId?operatorId="+operatorId+"&providerId="+providerId, function(response){
305
		$('#' + domId).html(response);
311
		$('#' + domId).html(response);
306
	});
312
	});
307
}
313
}
308
 
314
 
309
function updateRechargeCommissionDetails(operatorId, amountType, amount, offset, domId){
315
function updateRechargeCommissionDetails(operatorId, providerId, amountType, amount, offset, domId){
310
	doPutAjaxRequestHandler(context+"/updateRechargeCommission?operatorId="+operatorId
316
	doPutAjaxRequestHandler(context+"/updateRechargeCommission?operatorId="+operatorId
-
 
317
			+"&providerId="+providerId
311
			+"&amountType="+amountType+"&amount="+amount
318
			+"&amountType="+amountType+"&amount="+amount
312
	        +"&offset="+offset, function(response){
319
	        +"&offset="+offset, function(response){
313
		$('#' + domId).html(response);
320
		$('#' + domId).html(response);
314
		$('#recharge-commission-details-container').html('');
321
		$('#recharge-commission-details-container').html('');
315
		alert("Recharge Commission details have been updated successfully")
322
		alert("Recharge Commission details have been updated successfully")
316
	});
323
	});
317
	
324
	
318
}
325
}
319
 
326
 
320
function rechargeCheckStatus(domId, requestId, rechargeType, offset){
327
function rechargeCheckStatus(domId, requestId, rechargeType, offset){
-
 
328
	if(confirm("Are you sure you want to do Check Status Request!") == true){
321
	doGetAjaxRequestHandler(context+"/checkStatus?requestId="+requestId+"&rechargeType="+rechargeType+"&offset="+offset, function(response){
329
		doGetAjaxRequestHandler(context+"/checkStatus?requestId="+requestId+"&rechargeType="+rechargeType+"&offset="+offset, function(response){
322
		$('#' + domId).html(response);
330
			$('#' + domId).html(response);
323
	});
331
		});
-
 
332
	}
324
}
333
}
325
 
334
 
326
function loadOperatorsByOperatorType(domId, operatorType){
335
function loadOperatorsByOperatorType(domId, operatorType){
327
	doGetAjaxRequestHandler(context+"/getOperators?operatorType="+operatorType, function(response){
336
	doGetAjaxRequestHandler(context+"/getOperators?operatorType="+operatorType, function(response){
328
		$('#' + domId).html(response);
337
		$('#' + domId).html(response);