fix sales person dropdown for single agent, RT#23402
authorIvan Kohler <ivan@freeside.biz>
Thu, 5 Sep 2013 05:54:18 +0000 (22:54 -0700)
committerIvan Kohler <ivan@freeside.biz>
Thu, 5 Sep 2013 05:54:18 +0000 (22:54 -0700)
httemplate/elements/tr-select-sales.html

index b69b3d8..c29e0d7 100644 (file)
@@ -81,7 +81,11 @@ Example:
   function <% $field %>_agentnum_changed(what) {
     what.form.<% $field %>.disabled = 'disabled'; //disable sales dropdown
 
-    agentnum = what.options[what.selectedIndex].value;
+    if ( what.type == 'hidden' ) { 
+      agentnum = what.value;
+    } else {
+      agentnum = what.options[what.selectedIndex].value;
+    }
 
     function update_<% $field %>(sales) {