Fixed find customer
This commit is contained in:
parent
57cc410c59
commit
11e240238c
26
webroot/js/findcustomer.js
Normal file
26
webroot/js/findcustomer.js
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
/*
|
||||||
|
* filename: findcustomer.js
|
||||||
|
*
|
||||||
|
* used in: customers/find.ctp
|
||||||
|
* @todo: This doesn't update the ID for some reason.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
|
||||||
|
|
||||||
|
$("#customerName").autocomplete({
|
||||||
|
source: "/customers/completeCustomer",
|
||||||
|
minLength: 2,
|
||||||
|
select: function(event, ui) {
|
||||||
|
$("#CustomerId").val(ui.item.id);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
);
|
||||||
Loading…
Reference in a new issue