Subversion Repositories SmartDukaan

Rev

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

Rev 22523 Rev 22551
Line 406... Line 406...
406
				alert("Unable to fetch items");
406
				alert("Unable to fetch items");
407
			 },
407
			 },
408
	    });
408
	    });
409
}
409
}
410
 
410
 
-
 
411
 
-
 
412
 
-
 
413
function getWalletHistoryNextItems(start, end, startTime, endTime){
-
 
414
	console.log(start);
-
 
415
	console.log(end);
-
 
416
	console.log(+end + +10);
-
 
417
	console.log(+start + +10);
-
 
418
	jQuery.ajax({
-
 
419
	        type : "GET",
-
 
420
	        url : context+"/getPaginatedWalletHistory?startTime="+startTime
-
 
421
	        +"&endTime="+endTime+"&offset="+end,
-
 
422
			beforeSend: function(){
-
 
423
	        //$('#ajax-spinner').show();
-
 
424
	        },
-
 
425
	        complete: function(){
-
 
426
	        //$('#ajax-spinner').hide();
-
 
427
	        },
-
 
428
	        success : function(response) {
-
 
429
	        	$( "#wallet-history-paginated .end" ).text(+end + +10);
-
 
430
	        	$( "#wallet-history-paginated .start" ).text(+start + +10);
-
 
431
				var last = $( "#wallet-history-paginated .end" ).text();
-
 
432
				var temp = $( "#wallet-history-paginated .size" ).text();
-
 
433
				if (parseInt(last) >= parseInt(temp)){
-
 
434
					$("#wallet-history-paginated .next").prop('disabled', true);
-
 
435
					//$( "#good-inventory-paginated .end" ).text(temp);
-
 
436
				}
-
 
437
	            $('#wallet-history-table').html(response);
-
 
438
	            $("#wallet-history-paginated .previous").prop('disabled', false);
-
 
439
	        },
-
 
440
			error : function() {
-
 
441
				alert("Unable to fetch items");
-
 
442
			 },
-
 
443
	    });  
-
 
444
	}
-
 
445
function getWalletHistoryPreviousItems(start, end, pre, invoiceNumber, searchType,startTime,endTime){
-
 
446
	jQuery.ajax({
-
 
447
	        type : "GET",
-
 
448
	        url : context+"/getPaginatedWalletHistory?startTime="+startTime
-
 
449
	        +"&endTime="+endTime+"&offset="+pre,
-
 
450
			beforeSend: function(){
-
 
451
	        //$('#ajax-spinner').show();
-
 
452
	        },
-
 
453
	        complete: function(){
-
 
454
	        //$('#ajax-spinner').hide();
-
 
455
	        },
-
 
456
	        success : function(response) {
-
 
457
	        	$( "#wallet-history-paginated .end" ).text(+end - +10);
-
 
458
	        	$( "#wallet-history-paginated .start" ).text(+start - +10);
-
 
459
	        	$('#wallet-history-table').html(response);
-
 
460
	        	$("#wallet-history-paginated .next").prop('disabled', false);
-
 
461
				if (parseInt(pre)==0)
-
 
462
				{
-
 
463
					$("#wallet-history-paginated .previous").prop('disabled', true);
-
 
464
				}
-
 
465
	        },
-
 
466
			error : function() {
-
 
467
				alert("Unable to fetch items");
-
 
468
			 },
-
 
469
	    });
-
 
470
}
-
 
471
 
411
function loadGoodInventorySearchInfo(search_text){
472
function loadGoodInventorySearchInfo(search_text){
412
	loadGoodInventory("main-content",search_text);
473
	loadGoodInventory("main-content",search_text);
413
}
474
}
414
 
475
 
415
function loadGrnHistorySearchInfo(search_text,searchType,startTime,endTime){
476
function loadGrnHistorySearchInfo(search_text,searchType,startTime,endTime){
Line 568... Line 629...
568
            $('#' + domId).html(response);
629
            $('#' + domId).html(response);
569
        }
630
        }
570
    });  
631
    });  
571
}
632
}
572
 
633
 
-
 
634
function loadWallet(domId, startTime, endTime){
-
 
635
	jQuery.ajax({
-
 
636
        type : "GET",
-
 
637
        //data: {"cartData":localStorage.getItem("bag")},
-
 
638
        url : context+"/walletDetails?startTime="+startTime
-
 
639
        +"&endTime="+endTime,
-
 
640
        success : function(response) {
-
 
641
            $('#' + domId).html(response);
-
 
642
        }
-
 
643
    });  
-
 
644
}
-
 
645
 
573
function checkout(domId){
646
function checkout(domId){
574
	jQuery.ajax({
647
	jQuery.ajax({
575
        type : "GET",
648
        type : "GET",
576
        data: {"cartData":localStorage.getItem("bag")},
649
        data: {"cartData":localStorage.getItem("bag")},
577
        url : context+"/validate-cart",
650
        url : context+"/validate-cart",
Line 642... Line 715...
642
 
715
 
643
function saleHistorySearchInfo(search_text, searchType, startTime, endTime){
716
function saleHistorySearchInfo(search_text, searchType, startTime, endTime){
644
	saleHistory("main-content", search_text, searchType, startTime, endTime);
717
	saleHistory("main-content", search_text, searchType, startTime, endTime);
645
}
718
}
646
 
719
 
-
 
720
function walletHistoryDateSearchSearchInfo(startTime, endTime){
-
 
721
	
-
 
722
}
-
 
723
 
647
 
724
 
648
function validateOrderDetails(){
725
function validateOrderDetails(){
649
	var sNumbers = [];
726
	var sNumbers = [];
650
	var error = false;
727
	var error = false;
651
	$("form#cd input.serialNumber").each(function(){
728
	$("form#cd input.serialNumber").each(function(){