function invoice_report_showSuppliers_() {

	var from =document.getElementById("invoice_report_from").value;
	var to =document.getElementById("invoice_report_to").value;
 
         
	$.ajax({
		type : 'GET',
		url : 'create/get_suppliers/'+from+"/"+to ,
		/*data : {
			'_token' : $('meta[name="csrf-token"]').attr('content')
		},
		headers: {
			'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
		  },*/
		
		success : function(data) {
			console.log("data.suppliers_", data.suppliers_);
			var sel = $('#invoice_supplier_id').empty();
			 $('#invoice_supplier_id').empty();
			var suppliers = data.suppliers_ ;
			sel.append('<option> Choose Supplier</option>');
			for (var i = 0; i < suppliers.length; ++i) {
				sel.append('<option value="' + suppliers[i].supplier.id + '">' + suppliers[i].supplier.name + '</option>');			
			}
	  console.log(data); 
	  
		},
		error : function(request, status, error) {
			console.log(error);
		}
	});
  
		 
	}



function invoice_report_showClasses_( supplier_id ) {

	var from =document.getElementById("invoice_report_from").value;
	var to =document.getElementById("invoice_report_to").value;
 	console.log( from ,"  " ,  to );
        
	$.ajax({
		type : 'GET',
		url : 'create/get_classes/' + supplier_id + "/" +from+"/"+to ,
		/*data : {
			'_token' : $('meta[name="csrf-token"]').attr('content')
		},
		headers: {
			'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
		  },*/
		
		success : function(data) {
			console.log("data.classes_", data.classes_);
			var sel = $('#invoice_class_id').empty();
			 $('#invoice_class_id').empty();
			var classes = data.classes_ ;
			sel.append('<option> Choose Class</option>');
			for (var i = 0; i < classes.length; ++i) {
				sel.append('<option value="' + classes[i].id + '">' + classes[i].name + '</option>');			
			}
	  console.log(data); 
	  
		},
		error : function(request, status, error) {
			console.log(error);
		}
	});
  
		 
	}



	