 
function autocomplet() {
	var min_length = 0; // min caracters to display the autocomplete
	var keyword = $('#pdc_bank').val();
	if (keyword.length >= min_length) {
		$.ajax({
			url: './ajax/autocomplete.php',
			type: 'POST',
			data: {keyword:keyword},
			success:function(data){
				$('#bank_list_id').show();
				$('#bank_list_id').html(data);
			}
		});
	} else {
		$('#bank_list_id').hide();
	}
}
 
function autocomplet2() {
	var min_length = 0; // min caracters to display the autocomplete
	var keyword = $('#pdc_bank_replace_cheque').val();
	if (keyword.length >= min_length) {
		$.ajax({
			url: './ajax/autocomplete2.php',
			type: 'POST',
			data: {keyword:keyword},
			success:function(data){
				$('#bank_list_id2').show();
				$('#bank_list_id2').html(data);
			}
		});
	} else {
		$('#bank_list_id2').hide();
	}
}

// set_item : this function will be executed when we select an item
function set_item(item) {
	// change input value
	$('#pdc_bank').val(item);
	// hide proposition list
	$('#bank_list_id').hide();
}

// set_item : this function will be executed when we select an item
function set_item2(item) {
	// change input value
	$('#pdc_bank_replace_cheque').val(item);
	// hide proposition list
	$('#bank_list_id2').hide();
}




function autocomplet_amount() {
	var min_length = 0; // min caracters to display the autocomplete
	var keyword = $('#pdc_amount_replace_cash').val();
	if (keyword.length >= min_length) {
		$.ajax({
			url: './ajax/autocomplete3.php',
			type: 'POST',
			data: {keyword:keyword},
			success:function(data){
				$('.amount_list_id').show();
				$('.amount_list_id').html(data);
			}
		});
	} else {
		$('.amount_list_id').hide();
	}
}

function autocomplet_amount2() {
	var min_length = 0; // min caracters to display the autocomplete
	var keyword = $('#pdc_amount_replace_cheque').val();
	if (keyword.length >= min_length) {
		$.ajax({
			url: './ajax/autocomplete4.php',
			type: 'POST',
			data: {keyword:keyword},
			success:function(data){
				$('.amount_list_id').show();
				$('.amount_list_id').html(data);
			}
		});
	} else {
		$('.amount_list_id').hide();
	}
}

function autocomplet_amount3() {
	var min_length = 0; // min caracters to display the autocomplete
	var keyword = $('#pdc_amount').val();
	if (keyword.length >= min_length) {
		$.ajax({
			url: './ajax/autocomplete5.php',
			type: 'POST',
			data: {keyword:keyword},
			success:function(data){
				$('.amount_list_id').show();
				$('.amount_list_id').html(data);
			}
		});
	} else {
		$('.amount_list_id').hide();
	}
}
 
function set_item3(item) {
	// change input value
	$('#pdc_amount_replace_cash').val(item);
	// hide proposition list
	$('.amount_list_id').hide();
}
 
function set_item4(item) {
	// change input value
	$('#pdc_amount_replace_cheque').val(item);
	// hide proposition list
	$('.amount_list_id').hide();
}
 
function set_item5(item) {
	// change input value
	$('#pdc_amount').val(item);
	// hide proposition list
	$('.amount_list_id').hide();
}
 