[freeside-commits] branch master updated. a36e0f8a0f69349dafaa16d1d2d57dfb6e5dbc85

Ivan ivan at 420.am
Wed Dec 14 12:29:43 PST 2016


The branch, master has been updated
       via  a36e0f8a0f69349dafaa16d1d2d57dfb6e5dbc85 (commit)
      from  a889c7e41bb3bd9ccebbf4f956c36377f328400e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a36e0f8a0f69349dafaa16d1d2d57dfb6e5dbc85
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed Dec 14 12:29:42 2016 -0800

    add customer fields option with agent, display_custnum, status and name, RT#73721

diff --git a/FS/FS/ConfDefaults.pm b/FS/FS/ConfDefaults.pm
index 2fa8344..2c24b13 100644
--- a/FS/FS/ConfDefaults.pm
+++ b/FS/FS/ConfDefaults.pm
@@ -33,6 +33,9 @@ sub cust_fields_avail { (
   'Cust# | Cust. Status | Customer' =>
     'custnum | Status | Last, First or Company (Last, First)',
 
+  'Agent | Agent Cust# or Cust# | Cust. Status | Customer' =>
+    'Agent | Agent Cust# | Status | Last, First or Company (Last, First)',
+
   'Customer | Day phone | Night phone | Mobile phone | Fax number' =>
     'Customer | (all phones)',
   'Cust# | Customer | Day phone | Night phone | Mobile phone | Fax number' =>
diff --git a/FS/FS/UI/Web.pm b/FS/FS/UI/Web.pm
index 04aeda1..709e3f7 100644
--- a/FS/FS/UI/Web.pm
+++ b/FS/FS/UI/Web.pm
@@ -347,6 +347,8 @@ sub cust_header {
 #    'Payment Type'             => 'cust_payby',
     'Current Balance'          => 'current_balance',
     'Agent Cust#'              => 'agent_custid',
+    'Agent'                    => 'agent_name',
+    'Agent Cust# or Cust#'     => 'display_custnum',
     'Advertising Source'       => 'referral',
   );
   $header2method{'Cust#'} = 'display_custnum'
@@ -450,6 +452,8 @@ sub cust_sql_fields {
   }
   push @fields, 'agent_custid';
 
+  push @fields, 'agentnum' if grep { $_ eq 'agent_name' } @cust_fields;
+
   my @extra_fields = ();
   if (grep { $_ eq 'current_balance' } @cust_fields) {
     push @extra_fields, FS::cust_main->balance_sql . " AS current_balance";

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/ConfDefaults.pm |    3 +++
 FS/FS/UI/Web.pm       |    4 ++++
 2 files changed, 7 insertions(+)




More information about the freeside-commits mailing list