Subversion Repositories SmartDukaan

Rev

Rev 22254 | Rev 22292 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
21627 kshitij.so 1
var googleProfile;
2
 
22139 amit.gupta 3
 
4
$(document).ajaxComplete(
5
	function(){
6
 
7
	}
8
);
21627 kshitij.so 9
var startApp = function() {
10
  gapi.load('auth2', function(){
11
    // Retrieve the singleton for the GoogleAuth library and set up the client.
12
    auth2 = gapi.auth2.init({
22071 ashik.ali 13
      client_id: googleApiKey,
21627 kshitij.so 14
      cookiepolicy: 'single_host_origin',
15
      // Request scopes in addition to 'profile' and 'email'
16
      //scope: 'additional_scope'
17
    });
18
    attachSignin(document.getElementById('customBtn'));
19
  });
20
};
21
 
22
function attachSignin(element) {
23
    console.log(element.id);
24
    auth2.attachClickHandler(element, {},
25
        function(googleUser) {
26
    		googleProfile = googleUser.getBasicProfile();
27
        	console.log(googleProfile.getImageUrl());
28
        	submitUser(googleUser);
29
        }, function(error) {
30
          console.log(JSON.stringify(error, undefined, 2));
31
        });
32
  }
33
 
34
function submitUser(googleUser){
35
	jQuery.ajax({
36
        type : "POST",
22090 amit.gupta 37
        url : context+"/login",
22139 amit.gupta 38
        dataType: 'json',
21627 kshitij.so 39
        data: {"token":googleUser.getAuthResponse().id_token},
40
        success: function(data, textStatus, request){
41
        	console.log(data);
42
        	addProfileInLocalDb();
22139 amit.gupta 43
        	window.location.href= data.redirectUrl;
21627 kshitij.so 44
   		}
45
    });  
46
}
47
 
48
function addProfileInLocalDb(){
49
	var profile = {'image_url':googleProfile.getImageUrl(),'name':googleProfile.getName()};
50
	localStorage.setItem("profile",JSON.stringify(profile));
51
}
52
 
53
 
54
function loadNewGrn(domId){
55
	jQuery.ajax({
56
        type : "GET",
22091 amit.gupta 57
        url : context+"/purchase",
21627 kshitij.so 58
        success : function(response) {
59
            $('#' + domId).html(response);
60
        }
61
    });  
62
}
63
 
21987 kshitij.so 64
function loadGoodInventory(domId, search_text){
65
	jQuery.ajax({
66
        type : "GET",
22091 amit.gupta 67
        url : context+"/getCurrentInventorySnapshot/?searchTerm="+search_text,
21987 kshitij.so 68
        success : function(response) {
69
            $('#' + domId).html(response);
70
        }
71
    });  
72
}
73
 
74
function loadCatalog(domId, search_text){
75
	jQuery.ajax({
76
        type : "GET",
22091 amit.gupta 77
        url : context+"/getCatalog/?searchTerm="+search_text,
21987 kshitij.so 78
        success : function(response) {
79
            $('#' + domId).html(response);
80
        }
81
    });  
82
}
83
 
84
function loadBadInventory(domId, search_text){
85
	jQuery.ajax({
86
        type : "GET",
22090 amit.gupta 87
        url : context+"/getBadInventorySnapshot/?searchTerm="+search_text,
21987 kshitij.so 88
        success : function(response) {
89
            $('#' + domId).html(response);
90
        }
91
    });  
92
}
93
 
94
function loadGrnHistory(domId,purchase_reference,searchType, startTime, endTime){
95
	jQuery.ajax({
96
        type : "GET",
22090 amit.gupta 97
        url : context+"/grnHistory/?purchaseReference="+purchase_reference+"&searchType="+searchType
21987 kshitij.so 98
        +"&startTime="+startTime
99
        +"&endTime="+endTime,
100
        success : function(response) {
101
            $('#' + domId).html(response);
102
        }
103
    });  
104
}
105
 
22245 ashik.ali 106
 
107
 
22283 ashik.ali 108
 
109
 
21987 kshitij.so 110
function getNextItems(start, end, searchText){
111
	console.log(start);
112
	console.log(end);
113
	console.log(+end + +10);
114
	console.log(+start + +10);
115
	jQuery.ajax({
116
	        type : "GET",
22090 amit.gupta 117
	        url : context+"/getPaginatedCurrentInventorySnapshot/?offset="+end+"&searchTerm="+searchText,
21987 kshitij.so 118
			beforeSend: function(){
119
	        //$('#ajax-spinner').show();
120
	        },
121
	        complete: function(){
122
	        //$('#ajax-spinner').hide();
123
	        },
124
	        success : function(response) {
125
	        	$( "#good-inventory-paginated .end" ).text(+end + +10);
126
	        	$( "#good-inventory-paginated .start" ).text(+start + +10);
127
				var last = $( "#good-inventory-paginated .end" ).text();
128
				var temp = $( "#good-inventory-paginated .size" ).text();
129
				if (parseInt(last) >= parseInt(temp)){
130
					$("#good-inventory-paginated .next").prop('disabled', true);
131
					//$( "#good-inventory-paginated .end" ).text(temp);
132
				}
133
	            $('#good-inventory-table').html(response);
134
	            $("#good-inventory-paginated .previous").prop('disabled', false);
135
	        },
136
			error : function() {
137
				alert("Unable to fetch items");
138
			 },
139
	    });  
140
	}
141
function getPreviousItems(start,end,pre,searchText){
142
	jQuery.ajax({
143
	        type : "GET",
22090 amit.gupta 144
	        url : context+"/getPaginatedCurrentInventorySnapshot/?offset="+pre+"&searchTerm="+searchText,
21987 kshitij.so 145
			beforeSend: function(){
146
	        //$('#ajax-spinner').show();
147
	        },
148
	        complete: function(){
149
	        //$('#ajax-spinner').hide();
150
	        },
151
	        success : function(response) {
152
	        	$( "#good-inventory-paginated .end" ).text(+end - +10);
153
	        	$( "#good-inventory-paginated .start" ).text(+start - +10);
154
	        	$('#good-inventory-table').html(response);
155
	        	$("#good-inventory-paginated .next").prop('disabled', false);
156
				if (parseInt(pre)==0)
157
				{
158
					$("#good-inventory-paginated .previous").prop('disabled', true);
159
				}
160
 
161
	        },
162
			error : function() {
163
				alert("Unable to fetch items");
164
			 },
165
	    });
166
}
167
 
168
function getGrnHistoryNextItems(start, end, purchase_reference, searchType,startTime,endTime){
169
	console.log(start);
170
	console.log(end);
171
	console.log(+end + +10);
172
	console.log(+start + +10);
173
	jQuery.ajax({
174
	        type : "GET",
22090 amit.gupta 175
	        url : context+"/getPaginatedGrnHistory/?purchaseReference="+purchase_reference+"&searchType="+searchType
21987 kshitij.so 176
	        +"&startTime="+startTime
177
	        +"&endTime="+endTime+"&offset="+end,
178
			beforeSend: function(){
179
	        //$('#ajax-spinner').show();
180
	        },
181
	        complete: function(){
182
	        //$('#ajax-spinner').hide();
183
	        },
184
	        success : function(response) {
185
	        	$( "#grn-history-paginated .end" ).text(+end + +10);
186
	        	$( "#grn-history-paginated .start" ).text(+start + +10);
187
				var last = $( "#grn-history-paginated .end" ).text();
188
				var temp = $( "#grn-history-paginated .size" ).text();
189
				if (parseInt(last) >= parseInt(temp)){
190
					$("#grn-history-paginated .next").prop('disabled', true);
191
					//$( "#good-inventory-paginated .end" ).text(temp);
192
				}
193
	            $('#grn-history-table').html(response);
194
	            $("#grn-history-paginated .previous").prop('disabled', false);
195
	        },
196
			error : function() {
197
				alert("Unable to fetch items");
198
			 },
199
	    });  
200
	}
201
function getGrnHistoryPreviousItems(start,end,pre,purchase_reference, searchType,startTime,endTime){
202
	jQuery.ajax({
203
	        type : "GET",
22090 amit.gupta 204
	        url : context+"/getPaginatedGrnHistory/?purchaseReference="+purchase_reference+"&searchType="+searchType
21987 kshitij.so 205
	        +"&startTime="+startTime
206
	        +"&endTime="+endTime+"&offset="+pre,
207
			beforeSend: function(){
208
	        //$('#ajax-spinner').show();
209
	        },
210
	        complete: function(){
211
	        //$('#ajax-spinner').hide();
212
	        },
213
	        success : function(response) {
214
	        	$( "#grn-history-paginated .end" ).text(+end - +10);
215
	        	$( "#grn-history-paginated .start" ).text(+start - +10);
216
	        	$('#grn-history-table').html(response);
217
	        	$("#grn-history-paginated .next").prop('disabled', false);
218
				if (parseInt(pre)==0)
219
				{
220
					$("#grn-history-paginated .previous").prop('disabled', true);
221
				}
222
 
223
	        },
224
			error : function() {
225
				alert("Unable to fetch items");
226
			 },
227
	    });
228
}
229
 
230
function loadGoodInventorySearchInfo(search_text){
231
	loadGoodInventory("main-content",search_text);
232
}
233
 
234
function loadGrnHistorySearchInfo(search_text,searchType,startTime,endTime){
235
	loadGrnHistory("main-content",search_text,searchType,startTime,endTime);
236
}
237
 
21627 kshitij.so 238
function findDuplicateSerialNumbers(value){
239
    var result = $("#grnImeiInformation :input[value='" + value + "']").length - 1;
240
    return result;
241
}
21987 kshitij.so 242
 
243
function loadGrnDetails(purchaseId,domId){
244
	jQuery.ajax({
245
        type : "GET",
22090 amit.gupta 246
        url : context+"/grnHistoryDetailByPurchaseId/?purchaseId="+purchaseId,
21987 kshitij.so 247
        success : function(response) {
248
            $('#' + domId).html(response);
249
            window.dispatchEvent(new Event('resize'));
250
        }
251
    });
252
}
253
 
22245 ashik.ali 254
function loadSaleDetails(orderId, domId){
255
	jQuery.ajax({
256
        type : "GET",
257
        url : context+"/saleDetails?orderId="+orderId,
258
        success : function(response) {
259
            $('#' + domId).html(response);
260
            window.dispatchEvent(new Event('resize'));
261
        }
262
    });
263
}
264
 
21987 kshitij.so 265
function loadPendingGrnDetails(purchaseId,domId){
266
	jQuery.ajax({
22090 amit.gupta 267
		url: context+"/purchase/?airwayBillOrInvoiceNumber="+purchaseId,
21987 kshitij.so 268
		type: 'POST',
269
		async: false,
270
		success: function (data) {
271
			$('#'+domId).html(data);
272
		},
273
		error : function() {
274
			alert("OOPS!!!Failed to do changes.Try Again.",'ERROR');
275
		},
276
		cache: false,
277
		contentType: false,
278
		processData: false
279
	});
280
}
281
 
282
function getNextCatalogItems(start, end, searchText){
283
	console.log(start);
284
	console.log(end);
285
	console.log(+end + +10);
286
	console.log(+start + +10);
287
	jQuery.ajax({
288
	        type : "GET",
22090 amit.gupta 289
	        url : context+"/getPaginatedCatalog/?offset="+end+"&searchTerm="+searchText,
21987 kshitij.so 290
			beforeSend: function(){
291
	        //$('#ajax-spinner').show();
292
	        },
293
	        complete: function(){
294
	        //$('#ajax-spinner').hide();
295
	        },
296
	        success : function(response) {
297
	        	$( "#catalog-paginated .end" ).text(+end + +10);
298
	        	$( "#catalog-paginated .start" ).text(+start + +10);
299
				var last = $( "#catalog-paginated .end" ).text();
300
				var temp = $( "#catalog-paginated .size" ).text();
301
				if (parseInt(last) >= parseInt(temp)){
302
					$("#catalog-paginated .next").prop('disabled', true);
303
				}
304
	            $('#catalog-table').html(response);
305
	            $("#catalog-paginated .previous").prop('disabled', false);
306
	        },
307
			error : function() {
308
				alert("Unable to fetch items");
309
			 },
310
	    });  
311
	}
312
function getPreviousCatalogItems(start,end,pre,searchText){
313
	jQuery.ajax({
314
	        type : "GET",
22090 amit.gupta 315
	        url : context+"/getPaginatedCatalog/?offset="+pre+"&searchTerm="+searchText,
21987 kshitij.so 316
			beforeSend: function(){
317
	        //$('#ajax-spinner').show();
318
	        },
319
	        complete: function(){
320
	        //$('#ajax-spinner').hide();
321
	        },
322
	        success : function(response) {
323
	        	$( "#catalog-paginated .end" ).text(+end - +10);
324
	        	$( "#catalog-paginated .start" ).text(+start - +10);
325
	        	$('#catalog-table').html(response);
326
	        	$("#catalog-paginated .next").prop('disabled', false);
327
				if (parseInt(pre)==0)
328
				{
329
					$("#catalog-paginated .previous").prop('disabled', true);
330
				}
331
 
332
	        },
333
			error : function() {
334
				alert("Unable to fetch items");
335
			 },
336
	    });
337
}
338
 
339
function loadCatalogSearchInfo(search_text){
340
	loadCatalog("main-content",search_text);
341
}
342
 
343
function addItemInLocalStorage(bagObj){
344
	if (localStorage.getItem("bag")!=null){
345
		var bag = JSON.parse(localStorage.getItem("bag"));
346
		bag[bagObj.itemId] = bagObj
347
		localStorage.setItem("bag",JSON.stringify(bag));
348
		bag = localStorage.getItem("bag")
349
		$("#cart_bar").find('span').text(Object.keys(JSON.parse(bag)).length);
350
	}
351
	else{
352
		var tempObj = {};
353
		tempObj[bagObj.itemId] = bagObj
354
		localStorage.setItem("bag",JSON.stringify(tempObj));
355
		var bag = localStorage.getItem("bag")
356
		$("#cart_bar").find('span').text(Object.keys(JSON.parse(bag)).length);
357
	}
358
}
359
 
360
 
361
function changeQuantityInLocalStorage(itemId, newQuantity){
362
	var bag = JSON.parse(localStorage.getItem("bag"));
363
	bag[itemId].quantity = newQuantity;
364
	localStorage.setItem("bag",JSON.stringify(bag));
365
}
366
 
367
function removeItemFromLocalStorage(itemId){
368
	if (localStorage.getItem("bag")!=null){
369
		var bag = JSON.parse(localStorage.getItem("bag"));
370
		delete bag[itemId];
371
		localStorage.setItem("bag",JSON.stringify(bag));
372
		$("#cart_bar").find('span').text(Object.keys(bag).length);
373
	}
374
}
375
 
376
function emptyBag(){
22095 kshitij.so 377
	localStorage.setItem("bag",JSON.stringify({}));
21987 kshitij.so 378
	$("#cart_bar").find('span').text(0);
379
}
380
 
381
function loadCart(domId){
382
	jQuery.ajax({
383
        type : "POST",
384
        data: {"cartData":localStorage.getItem("bag")},
22090 amit.gupta 385
        url : context+"/cart",
21987 kshitij.so 386
        success : function(response) {
387
            $('#' + domId).html(response);
388
        }
389
    });  
390
}
391
 
392
function checkout(domId){
393
	jQuery.ajax({
22095 kshitij.so 394
        type : "GET",
21987 kshitij.so 395
        data: {"cartData":localStorage.getItem("bag")},
22090 amit.gupta 396
        url : context+"/validate-cart",
21987 kshitij.so 397
        success : function(response) {
398
        	var obj = JSON.parse(response);
399
        	redirectCart(obj.redirectUrl, obj.params, obj.method, "main-content");
22095 kshitij.so 400
        	$('#main-content').html(response);
21987 kshitij.so 401
        }
22245 ashik.ali 402
    });
21987 kshitij.so 403
}
404
 
405
function redirectCart(url, cartData, method, domId){
406
	jQuery.ajax({
407
        type : method,
408
        data: {"cartData":cartData},
409
        url : context+url,
410
        success : function(response) {
411
            $('#' + domId).html(response);
412
            window.dispatchEvent(new Event('resize'));
413
        }
414
    });  
415
}
416
 
22245 ashik.ali 417
function saleHistory(domId, invoiceNumber, searchType, startTime, endTime){
418
	jQuery.ajax({
419
        type : "GET",
420
        url : context+"/saleHistory?invoiceNumber="+invoiceNumber+"&searchType="+searchType
421
        +"&startTime="+startTime
422
        +"&endTime="+endTime,
423
        success : function(response) {
424
            $('#' + domId).html(response);
425
        }
426
    });  
427
}
428
 
22283 ashik.ali 429
function saleHistorySearchInfo(search_text, searchType, startTime, endTime){
430
	saleHistory("main-content", search_text, searchType, startTime, endTime);
431
}
22245 ashik.ali 432
 
22283 ashik.ali 433
 
21987 kshitij.so 434
function validateOrderDetails(){
435
	var sNumbers = [];
436
	var error = false;
437
	$("form#cd input.serialNumber").each(function(){
438
		var input = $(this).val().trim();
22245 ashik.ali 439
		var itemType = $(this).attr("itemType");
21987 kshitij.so 440
		$(this).removeClass("border-highlight");
22245 ashik.ali 441
		if (sNumbers.indexOf(input) !=-1 || (itemType ==='SERIALIZED' && !input)){
21987 kshitij.so 442
			error = true;
443
			$(this).addClass("border-highlight");
444
		}
445
		sNumbers.push(input);
446
	});
447
 
448
	$("form#cd input.unitPrice").each(function(){
449
		var input = $(this).val().trim();
450
		$(this).removeClass("border-highlight");
451
		if (!input || parseInt(input)<=0 || isNaN(input)){
452
			error=true;
453
			$(this).addClass("border-highlight");
454
		}
455
	});
456
 
457
	var amount = 0;
458
	var netPayableAmount = parseFloat($("form#cd input.netPayableAmount").val());
459
 
460
 
461
	$("form#cd input.amount").each(function(){
462
		if ($(this).val() ==""){
463
			$(this).val(0);
464
		}
465
		var tmpAmount = parseFloat($(this).val());
466
		amount = amount + tmpAmount;
467
	});
468
 
469
	console.log(amount);
470
	console.log(netPayableAmount);
471
 
472
	if (amount!=netPayableAmount){
473
		alert("Mismatch in amount");
474
		error = true;
475
	}
476
 
477
	if (error){
478
		return false;
479
	}
480
	return true;
481
 
482
}
483
 
484
function orderDetailsPayload(){
485
		var orderObj = {};
486
		var priceQtyArray = [];
487
		var customerObj = {};
488
		var paymentOption = [];
489
 
490
		$("form#cd input.serialNumber").each(function(){
491
			var itemId = parseInt($(this).attr("itemId"));
492
			if (orderObj.hasOwnProperty('fofoLineItems')){
493
				var itemDetails = orderObj['fofoLineItems'];
494
				if (itemDetails.hasOwnProperty(itemId)){
495
					var serialNumbers = itemDetails[itemId];
496
					serialNumbers.push($(this).val());
497
					itemDetails[itemId] = serialNumbers;
22245 ashik.ali 498
				}else{
21987 kshitij.so 499
					var serialNumbers = [];
500
					serialNumbers.push($(this).val());
501
					itemDetails[itemId] = serialNumbers;
502
				}
22245 ashik.ali 503
			}else{
21987 kshitij.so 504
				var serialNumbers = [];
505
				serialNumbers.push($(this).val());
506
				var tmp ={};
507
				tmp[itemId]  = serialNumbers;
508
				orderObj['fofoLineItems'] = tmp;
509
			}
510
		});
511
		console.log( JSON.stringify(orderObj));
512
		$("form#cd input.unitPrice").each(function(){
513
			var itemId = parseInt($(this).attr("itemId"));
514
			var unitPrice = parseFloat($(this).val());
515
			var qty = parseInt($(this).attr("quantity"));
516
			var tmpObj = {'itemId':itemId,'sellingPrice':unitPrice,'quantity':qty};
22245 ashik.ali 517
			if (orderObj['fofoLineItems'][itemId] === undefined){
518
				tmpObj['serialNumberDetails'] =[];
21987 kshitij.so 519
			}
520
			else{
22245 ashik.ali 521
				//tmpObj['serialNumbers'] = orderObj['fofoLineItems'][itemId];
522
				tmpObj['serialNumberDetails'] = [];
21987 kshitij.so 523
			}
22245 ashik.ali 524
			var found = false;
525
			for(var i = 0; i < priceQtyArray.length; i++){			
526
				if (priceQtyArray[i]["itemId"] == itemId){
527
					found = true;
528
					break;
529
				}
530
			}
531
			if(!found){
532
				priceQtyArray.push(tmpObj);
533
			}
21987 kshitij.so 534
		});
535
 
22245 ashik.ali 536
 
22254 ashik.ali 537
		var insurance = false;
538
 
22245 ashik.ali 539
		$("#order-details").find("tr:not(:first-child)").each(function(index,el){
540
			//console.log(el);
541
			//console.log(index);
542
			var $serialNumberElement = $(el).find('.serialNumber');
543
			var itemId = parseInt($serialNumberElement.attr("itemId"));
544
			var insuranceAmount = parseFloat($(el).find('.insuranceAmount').val());
545
			//if (priceQtyArray['fofoLineItems'][itemId] !=undefined){
546
 
547
			//}
548
			//console.log($serialNumberElement.val());
549
			//console.log(itemId);
550
			for(var i = 0; i < priceQtyArray.length; i++){
551
				console.log(priceQtyArray[i]["itemId"]);			
552
				if (priceQtyArray[i]["itemId"] == itemId){
553
					if(insuranceAmount > 0){
554
						insurance = true;
555
					}
556
					var serialNumberDetails = {'serialNumber':$serialNumberElement.val(),'insurance':insurance,'amount':insuranceAmount}
557
					priceQtyArray[i]['serialNumberDetails'].push(serialNumberDetails);
558
				}
559
            }
560
 
561
		});
562
 
563
		console.log("priceQtyArray : "+JSON.stringify(priceQtyArray));
21987 kshitij.so 564
		//customer-details
565
		/*$("#customer-details input").each(function(){
566
			console.log($(this).attr('name'));
567
			customerObj[$(this).attr('name')] = $(this).val();
568
		});*/
569
		//$("input[name=nameGoesHere]").val();
22245 ashik.ali 570
		customerObj['firstName'] = $("form#cd input[name=firstName]").val();
571
		customerObj['lastName'] = $("form#cd input[name=lastName]").val();
21987 kshitij.so 572
		customerObj['mobileNumber'] = $("form#cd input[name=phone]").val(); 
573
		customerObj['emailId'] = $("form#cd input[name=email]").val();
22245 ashik.ali 574
		customerObj['dateOfBirth'] = $("form#cd input[name=dateOfBirth").val();
21987 kshitij.so 575
		var customerAddress = {};
22245 ashik.ali 576
		customerAddress['name'] = $("form#cd input[name=firstName]").val() + " " + $("form#cd input[name=lastName]").val();
21987 kshitij.so 577
		customerAddress['line1'] = $("form#cd input[name=line1]").val();
578
		customerAddress['line2'] = $("form#cd input[name=line2]").val();
579
		customerAddress['landmark'] = $("form#cd input[name=landmark]").val();
580
		customerAddress['city'] = $("form#cd input[name=city]").val();
581
		customerAddress['state'] = $('select[name=state] option:selected').val();
22245 ashik.ali 582
		customerAddress['pinCode'] = $("form#cd input[name=pinCode]").val();
21987 kshitij.so 583
		customerAddress['phoneNumber'] = $("form#cd input[name=alternatePhone]").val();
584
		customerAddress['country'] = "India";
585
		customerObj['address'] = customerAddress; 
586
		console.log( JSON.stringify(customerObj));
587
		$("#payment-details input").each(function(){
588
		console.log($(this).attr('name'));
589
		if ($(this).attr('name') =="" ){
590
			return;
591
		}
592
		var paymentObj = {};
593
		paymentObj['type'] = $(this).attr('name');
594
		if ($(this).val() == ""){
595
			paymentObj['amount'] = 0.0;
596
		}
597
		else{
598
			paymentObj['amount'] = parseFloat($(this).val());
599
		}
600
		paymentOption.push(paymentObj);
601
		});
602
		console.log( JSON.stringify(paymentOption));
603
 
604
		var retObj = {};
22254 ashik.ali 605
		var dateOfBirth = $("form#cd input[name=dateOfBirth]").val();
606
		if(insurance){
607
			retObj['customerDateOfBirth'] = (dateOfBirth)
608
		}
21987 kshitij.so 609
		retObj['fofoLineItems'] = (priceQtyArray);
610
		retObj['customer'] = (customerObj);
611
		retObj['paymentOptions'] =  (paymentOption);
22254 ashik.ali 612
 
21987 kshitij.so 613
		console.log(retObj);
614
		return  JSON.stringify(retObj);
615
}