Subversion Repositories SmartDukaan

Rev

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

Rev 28352 Rev 28358
Line 9... Line 9...
9
	$(document).on('click', ".pending_fofo_order", function() {
9
	$(document).on('click', ".pending_fofo_order", function() {
10
		console.log("Helloo")
10
		console.log("Helloo")
11
		loadPendingOrder("main-content");
11
		loadPendingOrder("main-content");
12
	});
12
	});
13
 
13
 
-
 
14
	$(document).on('click', ".online-order", function() {
-
 
15
		loadOnlineOrder("main-content");
-
 
16
	});
-
 
17
 
14
	$(document).on('click', ".billed_order_item", function() {
18
	$(document).on('click', ".billed_order_item", function() {
15
		console.log("Helloo")
19
		console.log("Helloo")
16
		loadBilledOrder("main-content");
20
		loadBilledOrder("main-content");
17
	});
21
	});
18
 
22
 
Line 24... Line 28...
24
	$(document).on('click', ".settled_order_item", function() {
28
	$(document).on('click', ".settled_order_item", function() {
25
 
29
 
26
		loadSettledOrder("main-content");
30
		loadSettledOrder("main-content");
27
	});
31
	});
28
 
32
 
29
	$(document).on('click', ".verified_order_item", function() {
-
 
30
 
-
 
31
		loadVerifiedOrder("main-content");
-
 
32
	});
-
 
33
 
-
 
34
 
-
 
35
 
33
 
36
	$(document).on('click', ".claim_raised_order_item", function() {
34
	$(document).on('click', ".claim_raised_order_item", function() {
37
		console.log("Helloo")
35
		console.log("Helloo")
38
		loadClaimedOrder("main-content");
36
		loadClaimedOrder("main-content");
39
	});
37
	});
40
 
38
 
-
 
39
 
-
 
40
	$(document).on('click', ".online-order-submit",
-
 
41
		function() {
-
 
42
			var status = $("#status").val();
-
 
43
			var date = $(".order-date").val();
-
 
44
 
-
 
45
			if (status == null) {
-
 
46
				alert("please select status")
-
 
47
				return false;
-
 
48
			}
-
 
49
			if (date == "") {
-
 
50
				alert("please select date")
-
 
51
				return false;
-
 
52
			}
-
 
53
 
-
 
54
			doGetAjaxRequestHandler(context
-
 
55
				+ "/getAllOrdersByStatus?status=" + status + "&date=" + date, function(
-
 
56
					response) {
-
 
57
				$('.order-item-detail').html(response);
-
 
58
			});
-
 
59
		});
-
 
60
 
-
 
61
 
41
	$(document).on('click', "button.pendingOrderDetail",
62
	$(document).on('click', "button.pendingOrderDetail",
42
		function() {
63
		function() {
43
			doGetAjaxRequestHandler(context
64
			doGetAjaxRequestHandler(context
44
				+ "/getPendingOrderItem?orderId=" + $(this).data('orderid'), function(
65
				+ "/getPendingOrderItem?orderId=" + $(this).data('orderid'), function(
45
					response) {
66
					response) {
Line 498... Line 519...
498
 
519
 
499
	$(document).on('click', "#editamountbutton", function() {
520
	$(document).on('click', "#editamountbutton", function() {
500
		$('#editAmount').show();
521
		$('#editAmount').show();
501
	});
522
	});
502
 
523
 
503
 
-
 
504
 
-
 
505
 
-
 
506
 
-
 
507
});
524
});
508
 
525
 
509
function loadSaleDetails(orderId, domId) {
526
function loadSaleDetails(orderId, domId) {
510
	doGetAjaxRequestHandler(context + "/saleDetails?orderId=" + orderId,
527
	doGetAjaxRequestHandler(context + "/saleDetails?orderId=" + orderId,
511
		function(response) {
528
		function(response) {
512
			$('#' + domId).html(response);
529
			$('#' + domId).html(response);
513
		});
530
		});
514
}
531
}
515
 
532
 
-
 
533
function loadOnlineOrder(domId) {
-
 
534
	doGetAjaxRequestHandler(context + "/getOnlineOrder", function(response) {
-
 
535
		$('#' + domId).html(response);
-
 
536
 
-
 
537
	});
-
 
538
}
-
 
539
 
516
function loadPendingOrder(domId) {
540
function loadPendingOrder(domId) {
517
	doGetAjaxRequestHandler(context + "/pendingOrders", function(response) {
541
	doGetAjaxRequestHandler(context + "/pendingOrders", function(response) {
518
		$('#' + domId).html(response);
542
		$('#' + domId).html(response);
519
 
543
 
520
	});
544
	});
Line 595... Line 619...
595
	doAjaxGetDownload(context + "/downloadInvoices?searchType=" + searchType
619
	doAjaxGetDownload(context + "/downloadInvoices?searchType=" + searchType
596
		+ "&searchValue=" + searchValue + "&startTime=" + startTime
620
		+ "&searchValue=" + searchValue + "&startTime=" + startTime
597
		+ "&endTime=" + endTime, "invoices.pdf");
621
		+ "&endTime=" + endTime, "invoices.pdf");
598
}
622
}
599
 
623
 
600
function loadVerifiedOrder(domId) {
-
 
601
	doGetAjaxRequestHandler(context + "/verifiedOrders", function(response) {
-
 
602
		$('#' + domId).html(response);
-
 
603
	});
-
 
604
}
624