From e549e88c134121259da8c57c6f56f398320e0929 Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Thu, 4 Apr 2019 10:59:48 -0400 Subject: [PATCH] RT# 75357 - Prospects can now be disabled Conflicts: httemplate/edit/prospect_main.html --- FS/FS/prospect_main.pm | 2 +- httemplate/edit/prospect_main.html | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/FS/FS/prospect_main.pm b/FS/FS/prospect_main.pm index a6b593d56..7557e7706 100644 --- a/FS/FS/prospect_main.pm +++ b/FS/FS/prospect_main.pm @@ -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"; diff --git a/httemplate/edit/prospect_main.html b/httemplate/edit/prospect_main.html index da5c6ce37..9340493b4 100644 --- a/httemplate/edit/prospect_main.html +++ b/httemplate/edit/prospect_main.html @@ -1,7 +1,22 @@ + + +<& '/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', @@ -24,6 +39,10 @@ 'options' => [ 'Residential', 'Commercial', ], 'onchange' => 'rescom_changed', }, + { 'field' => 'disabled', + 'type' => 'checkbox', + 'value' => 'Y', + }, { 'field' => 'company', 'type' => 'text', 'size' => 50, -- 2.11.0