Subversion Repositories SmartDukaan

Rev

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

Rev 30466 Rev 30599
Line 1... Line 1...
1
var grnhistory= grnhistory || {};
1
var grnhistory= grnhistory || {};
2
grnhistory.searchText = "";
2
grnhistory.searchText = "";
3
grnhistory.searchType = "";
3
grnhistory.searchType = "";
4
grnhistory.startTime = "0";
4
grnhistory.startTime = "0";
5
grnhistory.endTime = "0";
5
grnhistory.endTime = "0";
6
dateRangeCallback(moment(), moment());
-
 
7
 
6
 
8
$(function() {
7
$(function() {
9
	$(document).on('click', ".new_grn", function() {
8
	$(document).on('click', ".new_grn", function() {
10
		loadNewGrn("main-content");
9
		loadNewGrn("main-content");
11
	});
10
	});
12
 
11
 
13
	$(document).on('click', ".grn_history", function() {
12
	$(document).on('click', ".grn_history", function() {
14
		loadGrnHistory("main-content","","",startDate,endDate);
13
		loadGrnHistory("main-content", "", "", moment(), moment);
15
	});
14
	});
16
	
15
	
17
	$(document).on('click', ".pending_grn", function() {
16
	$(document).on('click', ".pending_grn", function() {
18
		loadPendingGrn("main-content");
17
		loadPendingGrn("main-content");
19
	});
18
	});
Line 230... Line 229...
230
		
229
		
231
    });
230
    });
232
	
231
	
233
	$(document).on('click', "#grn-history-date-button", function() {
232
	$(document).on('click', "#grn-history-date-button", function() {
234
		var dateRange = $('#reportrange span').text();
233
		var dateRange = $('#reportrange span').text();
235
		grnhistory.startTime = startDate;
234
		grnhistory.startTime = getDatesFromPicker($("#grnDateRange")).startDate;
236
		grnhistory.endTime = endDate;
235
		grnhistory.endTime = getDatesFromPicker($("#grnDateRange")).endDate;
237
		grnhistory.searchType = "dateFilter";
236
		grnhistory.searchType = "dateFilter";
238
		grnhistory.searchText = "";
237
		grnhistory.searchText = "";
239
		loadGrnHistorySearchInfo(grnhistory.searchText,grnhistory.searchType,grnhistory.startTime,grnhistory.endTime);
238
		loadGrnHistorySearchInfo(grnhistory.searchText, grnhistory.searchType, grnhistory.startTime, grnhistory.endTime);
240
    });
239
	});
241
 
240
 
242
    $(document).on('click', ".grn-details",function(){
241
    $(document).on('click', ".grn-details",function(){
243
		var purchaseId = $(this).attr('data');
242
		var purchaseId = $(this).attr('data');
244
		console.log(purchaseId);
243
		console.log(purchaseId);
245
		loadGrnDetails(purchaseId,"grn-details-container");
244
		loadGrnDetails(purchaseId,"grn-details-container");