[freeside-commits] branch FREESIDE_3_BRANCH updated. a75d334b3f00e1945c668a5b5d22d2f76aeefb1d

Jeremy Davis jeremyd at 420.am
Tue Feb 11 06:10:31 PST 2014


The branch, FREESIDE_3_BRANCH has been updated
       via  a75d334b3f00e1945c668a5b5d22d2f76aeefb1d (commit)
      from  a792cb684abd3f132c683821416e4c97a7ee471c (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 a75d334b3f00e1945c668a5b5d22d2f76aeefb1d
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Thu Feb 6 00:05:07 2014 -0800

    add "Ordered" status to customer number/link on agent browse, RT#27442

diff --git a/FS/FS/agent.pm b/FS/FS/agent.pm
index b46d447..fcb5c24 100644
--- a/FS/FS/agent.pm
+++ b/FS/FS/agent.pm
@@ -410,6 +410,28 @@ sub cust_main_sql {
   );
 }
 
+=item num_ordered_cust_main
+
+Returns the number of ordered customers for this agent (customers with packages
+ordered, but not yet billed).
+
+=cut
+
+sub num_ordered_cust_main {
+  shift->num_sql(FS::cust_main->ordered_sql);
+}
+
+=item active_cust_main
+
+Returns the active customers for this agent, as cust_main objects.
+
+=cut
+
+sub active_cust_main {
+  shift->cust_main_sql(FS::cust_main->active_sql);
+}
+
+
 =item num_active_cust_main
 
 Returns the number of active customers for this agent (customers with active
diff --git a/httemplate/browse/agent.cgi b/httemplate/browse/agent.cgi
index 568d3f3..8da37a2 100755
--- a/httemplate/browse/agent.cgi
+++ b/httemplate/browse/agent.cgi
@@ -178,6 +178,26 @@ inactive
 
             <TR>
               <TH ALIGN="right" WIDTH="40%">
+                <FONT COLOR="#009999">
+                  <% my $num_ordered = $agent->num_ordered_cust_main %> 
+                </FONT>
+              </TH>
+
+              <TD>
+% if ( $num_ordered ) { 
+
+                  <A HREF="<% $cust_main_link %>&ordered=1">
+% } 
+ordered
+% if ($num_ordered ) { 
+</A>
+% } 
+
+              <TD>
+            </TR>
+
+            <TR>
+              <TH ALIGN="right" WIDTH="40%">
                 <FONT COLOR="#00CC00">
                   <% my $num_active = $agent->num_active_cust_main %> 
                 </FONT>
@@ -262,6 +282,11 @@ inactive
               </TD>
             </TR>
 
+            <!--ordered-->
+            <TR>
+              <TD> </TD>
+            </TR>
+
             <TR>
               <TH ALIGN="right" WIDTH="40%">
                 <FONT COLOR="#00CC00">
diff --git a/httemplate/search/cust_main.cgi b/httemplate/search/cust_main.cgi
index 69f04f5..ff13f07 100755
--- a/httemplate/search/cust_main.cgi
+++ b/httemplate/search/cust_main.cgi
@@ -393,6 +393,7 @@ if ( $cgi->param('browse')
 
   push @qual, FS::cust_main->cancel_sql   if $cgi->param('cancelled');
   push @qual, FS::cust_main->prospect_sql if $cgi->param('prospect');
+  push @qual, FS::cust_main->ordered_sql  if $cgi->param('ordered');
   push @qual, FS::cust_main->active_sql   if $cgi->param('active');
   push @qual, FS::cust_main->inactive_sql if $cgi->param('inactive');
   push @qual, FS::cust_main->susp_sql     if $cgi->param('suspended');

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

Summary of changes:
 FS/FS/agent.pm                  |   22 ++++++++++++++++++++++
 httemplate/browse/agent.cgi     |   25 +++++++++++++++++++++++++
 httemplate/search/cust_main.cgi |    1 +
 3 files changed, 48 insertions(+), 0 deletions(-)




More information about the freeside-commits mailing list