fix an error message in quick payment entry, from #17356
authorMark Wells <mark@freeside.biz>
Sat, 14 Jul 2012 23:31:35 +0000 (16:31 -0700)
committerMark Wells <mark@freeside.biz>
Sat, 14 Jul 2012 23:31:35 +0000 (16:31 -0700)
httemplate/elements/customer-table.html

index 1e717ca..ed2513d 100644 (file)
@@ -198,7 +198,11 @@ Example:
 
       var customerArrayArray = eval('(' + customers + ')') || [];
 
-      if ( customerArrayArray.length == 1 ) {
+      if ( customerArrayArray.length == 0 ) {
+
+        update_customer(searchrow, []);
+
+      } else if ( customerArrayArray.length == 1 ) {
 
         update_customer(searchrow, customerArrayArray[0]);
 % if ( $opt{custnum_update_callback} ) {
@@ -272,7 +276,11 @@ Example:
       custnum_obj.disabled = false;
       custnum_obj.style.backgroundColor = '#ffffff';
 
-      if ( customerArrayArray.length == 1 ) {
+      if ( customerArrayArray.length == 0 ) {
+
+        update_customer(searchrow, []);
+
+      } else if ( customerArrayArray.length == 1 ) {
 
         update_customer(searchrow, customerArrayArray[0]);
 % if ( $opt{custnum_update_callback} ) {