RT# 75357 - Prospects can now be disabled
authorChristopher Burger <burgerc@freeside.biz>
Thu, 4 Apr 2019 14:59:48 +0000 (10:59 -0400)
committerChristopher Burger <burgerc@freeside.biz>
Sun, 7 Apr 2019 18:34:04 +0000 (14:34 -0400)
Conflicts:
httemplate/edit/prospect_main.html

FS/FS/prospect_main.pm
httemplate/edit/prospect_main.html

index a6b593d..7557e77 100644 (file)
@@ -427,7 +427,7 @@ sub search {
   # here is the agent virtualization
   push @where, $FS::CurrentUser::CurrentUser->agentnums_sql;
 
-  my $extra_sql = scalar(@where) ? ' WHERE '. join(' AND ', @where) : '';
+  my $extra_sql = scalar(@where) ? ' WHERE prospect_main.custnum IS NULL AND '. join(' AND ', @where) : '';
 
   my $count_query = "SELECT COUNT(*) FROM prospect_main $extra_sql";
   
index da5c6ce..9340493 100644 (file)
@@ -1,7 +1,22 @@
+<SCRIPT>
+  function checkPasswordValidation(fieldid)  {
+    var validationResult = document.getElementById(fieldid+'_result').innerHTML;
+    if (validationResult.match(/Password valid!/)) {
+      return true;
+    }
+    else {
+      return false;
+    }
+  }
+</SCRIPT>
+
+<& '/elements/validate_password_js.html', &>
+
 <% include('elements/edit.html',
      'name_singular'   => 'prospect',
      'table'           => 'prospect_main',
      'labels'          => { 'prospectnum' => 'Prospect',
+                            'disabled'    => 'Disabled',
                             'agentnum'    => 'Agent',
                             'refnum'      => 'Advertising source',
                             'company'     => 'Company',
          'options'  => [ 'Residential', 'Commercial', ],
          'onchange' => 'rescom_changed',
        },
+       { 'field'    => 'disabled',
+         'type'     => 'checkbox',
+         'value'    => 'Y',
+       },
        { 'field'    => 'company',
          'type'     => 'text',
          'size'     => 50,