Subversion Repositories SmartDukaan

Rev

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

Rev 27861 Rev 28339
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', ".billed_order_item", function() {
-
 
15
		console.log("Helloo")
-
 
16
		loadBilledOrder("main-content");
-
 
17
	});
-
 
18
 
-
 
19
	$(document).on('click', ".unsettled_order_item", function() {
-
 
20
		console.log("Helloo")
-
 
21
		loadUnsettledOrder("main-content");
-
 
22
	});
-
 
23
 
-
 
24
	$(document).on('click', ".settled_order_item", function() {
-
 
25
		console.log("Helloo")
-
 
26
		loadSettledOrder("main-content");
-
 
27
	});
-
 
28
 
-
 
29
 
-
 
30
 
-
 
31
	$(document).on('click', ".claim_raised_order_item", function() {
-
 
32
		console.log("Helloo")
-
 
33
		loadClaimedOrder("main-content");
-
 
34
	});
-
 
35
 
14
	$(document).on('click', "button.pendingOrderDetail",
36
	$(document).on('click', "button.pendingOrderDetail",
15
		function() {
37
		function() {
16
			doGetAjaxRequestHandler(context
38
			doGetAjaxRequestHandler(context
17
				+ "/getPendingOrderItem?orderId=" + $(this).data('orderid'), function(
39
				+ "/getPendingOrderItem?orderId=" + $(this).data('orderid'), function(
18
					response) {
40
					response) {
Line 57... Line 79...
57
				return false;
79
				return false;
58
			}
80
			}
59
 
81
 
60
		});
82
		});
61
 
83
 
-
 
84
	$(document).on('click', ".pendingOrderItemDelivered",
-
 
85
		function() {
-
 
86
 
-
 
87
			var orderItemId = $(this).data('poitemid');
-
 
88
			if (confirm("Are you sure you want to delivered the order item!") == true) {
-
 
89
				doPostAjaxRequestHandler(context
-
 
90
					+ "/deliveredPendingOrderItem?id="
-
 
91
					+ orderItemId, function(response) {
-
 
92
						if (response == 'true') {
-
 
93
							alert("successfully delivered marked");
-
 
94
							loadBilledOrder("main-content");
-
 
95
						}
-
 
96
					});
-
 
97
 
-
 
98
				return false;
-
 
99
			}
-
 
100
 
-
 
101
		});
-
 
102
 
-
 
103
	$(document).on('click', ".raiseClaim",
-
 
104
		function() {
-
 
105
 
-
 
106
			var orderItemId = $(this).data('poitemid');
-
 
107
			if (confirm("Are you sure you want to raise the claim!") == true) {
-
 
108
				doPostAjaxRequestHandler(context
-
 
109
					+ "/raiseClaimOrderItem?id="
-
 
110
					+ orderItemId, function(response) {
-
 
111
						if (response == 'true') {
-
 
112
							alert("successfully claim raised");
-
 
113
							loadClaimedOrder("main-content");
-
 
114
						}
-
 
115
					});
-
 
116
 
-
 
117
				return false;
-
 
118
			}
-
 
119
 
-
 
120
		});
-
 
121
 
62
	$(document).on('click', ".sale-history", function() {
122
	$(document).on('click', ".sale-history", function() {
63
		console.log("Sale History Button Clicked...")
123
		console.log("Sale History Button Clicked...")
64
		saleHistory("main-content", "", "", startDate, endDate);
124
		saleHistory("main-content", "", "", startDate, endDate);
65
	});
125
	});
66
 
126
 
Line 407... Line 467...
407
		$('#' + domId).html(response);
467
		$('#' + domId).html(response);
408
 
468
 
409
	});
469
	});
410
}
470
}
411
 
471
 
-
 
472
function loadClaimedOrder(domId) {
-
 
473
	doGetAjaxRequestHandler(context + "/claimedOrders", function(response) {
-
 
474
		$('#' + domId).html(response);
-
 
475
 
-
 
476
	});
-
 
477
}
-
 
478
 
-
 
479
 
-
 
480
function loadBilledOrder(domId) {
-
 
481
	doGetAjaxRequestHandler(context + "/billedOrders", function(response) {
-
 
482
		$('#' + domId).html(response);
-
 
483
 
-
 
484
	});
-
 
485
}
-
 
486
 
-
 
487
 
-
 
488
 
-
 
489
function loadUnsettledOrder(domId) {
-
 
490
	doGetAjaxRequestHandler(context + "/unsettledOrders", function(response) {
-
 
491
		$('#' + domId).html(response);
-
 
492
 
-
 
493
	});
-
 
494
}
-
 
495
 
-
 
496
 
-
 
497
function loadSettledOrder(domId) {
-
 
498
	doGetAjaxRequestHandler(context + "/settledOrders", function(response) {
-
 
499
		$('#' + domId).html(response);
-
 
500
 
-
 
501
	});
-
 
502
}
412
function loadSearchOrder(domId) {
503
function loadSearchOrder(domId) {
413
	doGetAjaxRequestHandler(context + "/getSearchOrder", function(response) {
504
	doGetAjaxRequestHandler(context + "/getSearchOrder", function(response) {
414
		$('#' + domId).html(response);
505
		$('#' + domId).html(response);
415
	});
506
	});
416
}
507
}