Subversion Repositories SmartDukaan

Rev

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

Rev 33091 Rev 33092
Line 68... Line 68...
68
	if (endDate == "" || endDate == undefined) {
68
	if (endDate == "" || endDate == undefined) {
69
 
69
 
70
		alert("end date is not be empty!!");
70
		alert("end date is not be empty!!");
71
		return;
71
		return;
72
	}
72
	}
73
	doGetAjaxRequestHandler(context + "/pendingIndentFetchReportByDate?startDate=" + startDate + "&endDate=" + endDate,
73
	let endPoint = `${context}/pendingIndentFetchReportByDate?startDate=${startDate}&endDate=${endDate}`;
-
 
74
	if (typeof partnerId != "undefined") {
-
 
75
		endPoint = `${endPoint}&fofoId=${partnerId}`;
-
 
76
	}
-
 
77
 
-
 
78
	doGetAjaxRequestHandler(endPoint,
74
		function(response) {
79
		function (response) {
75
			$('#' + 'main-content').html(response);
80
			$('#' + 'main-content').html(response);
76
		});
81
		});
77
});
82
});
78
 
83
 
79
 
84
 
80
 
85
 
81
$(document).on('click', ".wallet_statement", function() {
86
$(document).on('click', ".wallet_statement", function() {
82
	console.log('HELLO');
-
 
83
	doGetAjaxRequestHandler(context + "/walletSummaryReport",
87
	doGetAjaxRequestHandler(context + "/walletSummaryReport",
84
		function(response) {
88
		function(response) {
85
			$('#' + 'main-content').html(response);
89
			$('#' + 'main-content').html(response);
86
		});
90
		});
87
});
91
});
88
 
92
 
89
 
93
 
90
$(document).on('click', ".partner-collection-summary", function() {
94
$(document).on('click', ".partner-collection-summary", function() {
91
 
-
 
92
	doGetAjaxRequestHandler(context + "/collectionSummary",
95
	doGetAjaxRequestHandler(context + "/collectionSummary",
93
		function(response) {
96
		function(response) {
94
			$('#' + 'main-content').html(response);
97
			$('#' + 'main-content').html(response);
95
		});
98
		});
96
});
99
});
Line 127... Line 130...
127
	if (endDate == "" || endDate == undefined) {
130
	if (endDate == "" || endDate == undefined) {
128
 
131
 
129
		alert("end date is not be empty!!");
132
		alert("end date is not be empty!!");
130
		return;
133
		return;
131
	}
134
	}
-
 
135
	let endPoint = `${context}/collectionSummaryFetchReportByDate?startDate=${startDate}&endDate=${endDate}`;
-
 
136
	if (typeof partnerId != "undefined") {
-
 
137
		endPoint = `${endPoint}&fofoId=${partnerId}`;
-
 
138
	}
-
 
139
 
-
 
140
	doGetAjaxRequestHandler(endPoint,
-
 
141
		function (response) {
-
 
142
			$('#' + 'main-content').html(response);
-
 
143
		});
-
 
144
 
132
 
145
 
133
	 doGetAjaxRequestHandler(context + "/collectionSummaryFetchReportByDate?startDate=" + startDate + "&endDate=" + endDate,
-
 
134
     		function(response) {
-
 
135
     			$('#' + 'main-content').html(response);
-
 
136
     		});
-
 
137
});
146
});
138
 
147
 
139
 
148
 
140
$(document).on('click', '.download-price-drop-report', function() {
149
$(document).on('click', '.download-price-drop-report', function() {
141
	var startDate = $("#startDate-price-drop-report").val();
150
	var startDate = $("#startDate-price-drop-report").val();
Line 168... Line 177...
168
	if (endDate == "" || endDate == undefined) {
177
	if (endDate == "" || endDate == undefined) {
169
 
178
 
170
		alert("end date is not be empty!!");
179
		alert("end date is not be empty!!");
171
		return;
180
		return;
172
	}
181
	}
173
	doGetAjaxRequestHandler(context + "/priceDropFetchReportByDate?startDate=" + startDate + "&endDate=" + endDate,
182
	let endPoint = `${context}/priceDropFetchReportByDate?startDate=${startDate}&endDate=${endDate}`;
-
 
183
	if (typeof partnerId != "undefined") {
-
 
184
		endPoint = `${endPoint}&fofoId=${partnerId}`;
-
 
185
	}
-
 
186
 
-
 
187
	doGetAjaxRequestHandler(endPoint,
174
    		function(response) {
188
		function (response) {
175
    			$('#' + 'main-content').html(response);
189
			$('#' + 'main-content').html(response);
176
    		});
190
		});
177
 
191
 
178
});
192
});
179
 
193
 
180
 
194
 
181
 
195
 
Line 293... Line 307...
293
	if (endDate == "" || endDate == undefined) {
307
	if (endDate == "" || endDate == undefined) {
294
 
308
 
295
		alert("end date is not be empty!!");
309
		alert("end date is not be empty!!");
296
		return;
310
		return;
297
	}
311
	}
298
	let endPoint = `${context}/offerPayoutFetchReportByDate?startDate=${startDate}&endDate=${endDate}`;
-
 
299
	if (typeof partnerId != "undefined") {
-
 
300
		endPoint = `${endPoint}&fofoId=${partnerId}`;
-
 
301
	}
-
 
302
 
312
 
303
	doGetAjaxRequestHandler(endPoint,
313
	doGetAjaxRequestHandler(endPoint,
304
		function (response) {
314
		function (response) {
305
			$('#' + 'main-content').html(response);
315
			$('#' + 'main-content').html(response);
306
		});
316
		});
Line 312... Line 322...
312
	doGetAjaxRequestHandler(context + "/franchiseeSalesReport",
322
	doGetAjaxRequestHandler(context + "/franchiseeSalesReport",
313
		function(response) {
323
		function(response) {
314
			$('#' + 'main-content').html(response);
324
			$('#' + 'main-content').html(response);
315
		});
325
		});
316
});
326
});
-
 
327
$(document).on('click', '.franchisee-sales-fetch-report', function () {
-
 
328
	var startDate = $("#startDate-franchisee-sales").val();
-
 
329
 
-
 
330
	var endDate = $("#endDate-franchisee-sales").val();
-
 
331
 
-
 
332
	if (startDate == "" || startDate == undefined) {
-
 
333
 
-
 
334
		alert("start date is not be empty!!");
-
 
335
		return;
-
 
336
	}
-
 
337
	if (endDate == "" || endDate == undefined) {
-
 
338
 
-
 
339
		alert("end date is not be empty!!");
-
 
340
		return;
-
 
341
	}
-
 
342
	let endPoint = `${context}/franchiseeSalesFetchReportByDate?startDate=${startDate}&endDate=${endDate}`;
-
 
343
	if (typeof partnerId != "undefined") {
-
 
344
		endPoint = `${endPoint}&fofoId=${partnerId}`;
-
 
345
	}
-
 
346
 
-
 
347
	doGetAjaxRequestHandler(endPoint,
-
 
348
		function (response) {
-
 
349
			$('#' + 'main-content').html(response);
-
 
350
		});
-
 
351
});
-
 
352
 
-
 
353
 
317
 
354
 
318
$(document).on('click', '.download-wallet-summary-report', function() {
355
$(document).on('click', '.download-wallet-summary-report', function() {
319
	var startDate = $("#startDate-wallet-summary-report").val();
356
	var startDate = $("#startDate-wallet-summary-report").val();
320
 
357
 
321
	var endDate = $("#endDate-wallet-summary-report").val();
358
	var endDate = $("#endDate-wallet-summary-report").val();
Line 343... Line 380...
343
	if (endDate == "" || endDate == undefined) {
380
	if (endDate == "" || endDate == undefined) {
344
 
381
 
345
		alert("end date is not be empty!!");
382
		alert("end date is not be empty!!");
346
		return;
383
		return;
347
	}
384
	}
348
	doGetAjaxRequestHandler(context + "/walletSummaryFetchReportByDate?startDate=" + startDate + "&endDate=" + endDate,
385
//	doGetAjaxRequestHandler(context + "/walletSummaryFetchReportByDate?startDate=" + startDate + "&endDate=" + endDate,
349
    		function(response) {
386
//    		function(response) {
350
    			$('#' + 'main-content').html(response);
387
//    			$('#' + 'main-content').html(response);
351
    		});
388
//    		});
-
 
389
 
-
 
390
	let endPoint = `${context}/walletSummaryFetchReportByDate?startDate=${startDate}&endDate=${endDate}`;
-
 
391
	if (typeof partnerId != "undefined") {
-
 
392
		endPoint = `${endPoint}&fofoId=${partnerId}`;
-
 
393
	}
-
 
394
 
-
 
395
	doGetAjaxRequestHandler(endPoint,
-
 
396
		function (response) {
-
 
397
			$('#' + 'main-content').html(response);
-
 
398
		});
-
 
399
 
-
 
400
 
352
});
401
});
353
 
402
 
354
 
403
 
355
$(document).on('click', '.download-partner-billing-report', function() {
404
$(document).on('click', '.download-partner-billing-report', function() {
356
	var startDate = $("#startDate-partner-billing-report").val();
405
	var startDate = $("#startDate-partner-billing-report").val();
Line 405... Line 454...
405
		alert("end date is not be empty!!");
454
		alert("end date is not be empty!!");
406
		return;
455
		return;
407
	}
456
	}
408
	window.location.href = context + "/downloadFranchiseeSales?startDate=" + startDate + "&endDate=" + endDate;
457
	window.location.href = context + "/downloadFranchiseeSales?startDate=" + startDate + "&endDate=" + endDate;
409
});
458
});
410
$(document).on('click', '.franchisee-sales-fetch-report', function() {
-
 
411
	var startDate = $("#startDate-franchisee-sales").val();
-
 
412
 
-
 
413
	var endDate = $("#endDate-franchisee-sales").val();
-
 
414
 
-
 
415
	if (startDate == "" || startDate == undefined) {
-
 
416
 
-
 
417
		alert("start date is not be empty!!");
-
 
418
		return;
-
 
419
	}
-
 
420
	if (endDate == "" || endDate == undefined) {
-
 
421
 
-
 
422
		alert("end date is not be empty!!");
-
 
423
		return;
-
 
424
	}
-
 
425
	doGetAjaxRequestHandler(context + "/franchiseeSalesFetchReportByDate?startDate=" + startDate + "&endDate=" + endDate,
-
 
426
    		function(response) {
-
 
427
    			$('#' + 'main-content').html(response);
-
 
428
    		});
-
 
429
});
-
 
430
 
-
 
431
 
-
 
432
$(document).on('click', 'button.download-report', function() {
459
$(document).on('click', 'button.download-report', function() {
433
	var reportParams = {};
460
	var reportParams = {};
434
	var validated = true;
461
	var validated = true;
435
	$inputContainer.find("input.param,select.param").each(function(idx, inputElement) {
462
	$inputContainer.find("input.param,select.param").each(function(idx, inputElement) {
436
		var inputName = $(inputElement).attr("name");
463
		var inputName = $(inputElement).attr("name");