X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fcust_main_note-import.cgi;h=79fdd09ff8537071481969cebbdbf11266990eb0;hb=da86d5a8af2f915a340a74f6c97772451a1e23ef;hp=8a94ae4d4471c81570b5d3683c87ee3bb972f6be;hpb=0fb307c305e4bc2c9c27dc25a3308beae3a4d33c;p=freeside.git diff --git a/httemplate/misc/cust_main_note-import.cgi b/httemplate/misc/cust_main_note-import.cgi index 8a94ae4d4..79fdd09ff 100644 --- a/httemplate/misc/cust_main_note-import.cgi +++ b/httemplate/misc/cust_main_note-import.cgi @@ -39,24 +39,22 @@ custnum_obj.style.backgroundColor = '#dddddd'; - //alert('search for custnum ' + custnum + ', row#' + searchrow ); + function search_custnum_update(customers) { - function search_custnum_update(name) { - - var name = eval('(' + name + ')' ); + var customerArray = eval('(' + customers + ')'); custnum_obj.disabled = false; custnum_obj.style.backgroundColor = '#ffffff'; - if ( name.length > 0 ) { - //alert('custnum found: ' + name); + if ( customerArray.length == 0 ) { + custnum_obj.value = 'Not found'; + custnum_obj.style.color = '#ff0000'; + } else if ( customerArray.length == 3 ) { + var name = customerArray[1]; opt(customer_select,custnum,name,'#000000'); customer_select.selectedIndex = customer_select.length - 1; custnum_obj.value = custnum; name_obj.value = name; - } else { - custnum_obj.value = 'Not found'; - custnum_obj.style.color = '#ff0000'; } }