Subversion Repositories SmartDukaan

Rev

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

Rev 22283 Rev 22292
Line 225... Line 225...
225
				alert("Unable to fetch items");
225
				alert("Unable to fetch items");
226
			 },
226
			 },
227
	    });
227
	    });
228
}
228
}
229
 
229
 
-
 
230
function getSaleHistoryNextItems(start, end, invoiceNumber, searchType, startTime, endTime){
-
 
231
	console.log(start);
-
 
232
	console.log(end);
-
 
233
	console.log(+end + +10);
-
 
234
	console.log(+start + +10);
-
 
235
	jQuery.ajax({
-
 
236
	        type : "GET",
-
 
237
	        url : context+"/getPaginatedSaleHistory/?invoiceNumber="+invoiceNumber+"&searchType="+searchType
-
 
238
	        +"&startTime="+startTime
-
 
239
	        +"&endTime="+endTime+"&offset="+end,
-
 
240
			beforeSend: function(){
-
 
241
	        //$('#ajax-spinner').show();
-
 
242
	        },
-
 
243
	        complete: function(){
-
 
244
	        //$('#ajax-spinner').hide();
-
 
245
	        },
-
 
246
	        success : function(response) {
-
 
247
	        	$( "#sale-history-paginated .end" ).text(+end + +10);
-
 
248
	        	$( "#sale-history-paginated .start" ).text(+start + +10);
-
 
249
				var last = $( "#sale-history-paginated .end" ).text();
-
 
250
				var temp = $( "#sale-history-paginated .size" ).text();
-
 
251
				if (parseInt(last) >= parseInt(temp)){
-
 
252
					$("#sale-history-paginated .next").prop('disabled', true);
-
 
253
					//$( "#good-inventory-paginated .end" ).text(temp);
-
 
254
				}
-
 
255
	            $('#sale-history-table').html(response);
-
 
256
	            $("#sale-history-paginated .previous").prop('disabled', false);
-
 
257
	        },
-
 
258
			error : function() {
-
 
259
				alert("Unable to fetch items");
-
 
260
			 },
-
 
261
	    });  
-
 
262
	}
-
 
263
function getSaleHistoryPreviousItems(start, end, pre, invoiceNumber, searchType,startTime,endTime){
-
 
264
	jQuery.ajax({
-
 
265
	        type : "GET",
-
 
266
	        url : context+"/getPaginatedSaleHistory/?invoiceNumber="+invoiceNumber+"&searchType="+searchType
-
 
267
	        +"&startTime="+startTime
-
 
268
	        +"&endTime="+endTime+"&offset="+pre,
-
 
269
			beforeSend: function(){
-
 
270
	        //$('#ajax-spinner').show();
-
 
271
	        },
-
 
272
	        complete: function(){
-
 
273
	        //$('#ajax-spinner').hide();
-
 
274
	        },
-
 
275
	        success : function(response) {
-
 
276
	        	$( "#sale-history-paginated .end" ).text(+end - +10);
-
 
277
	        	$( "#sale-history-paginated .start" ).text(+start - +10);
-
 
278
	        	$('#sale-history-table').html(response);
-
 
279
	        	$("#sale-history-paginated .next").prop('disabled', false);
-
 
280
				if (parseInt(pre)==0)
-
 
281
				{
-
 
282
					$("#sale-history-paginated .previous").prop('disabled', true);
-
 
283
				}
-
 
284
	        },
-
 
285
			error : function() {
-
 
286
				alert("Unable to fetch items");
-
 
287
			 },
-
 
288
	    });
-
 
289
}
-
 
290
 
230
function loadGoodInventorySearchInfo(search_text){
291
function loadGoodInventorySearchInfo(search_text){
231
	loadGoodInventory("main-content",search_text);
292
	loadGoodInventory("main-content",search_text);
232
}
293
}
233
 
294
 
234
function loadGrnHistorySearchInfo(search_text,searchType,startTime,endTime){
295
function loadGrnHistorySearchInfo(search_text,searchType,startTime,endTime){