summaryrefslogtreecommitdiff
path: root/FS/FS/Report/Table.pm
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2012-03-22 22:08:54 -0700
committerMark Wells <mark@freeside.biz>2012-03-22 22:08:54 -0700
commit9f97c81b19a3184ea68df32aaea43808b22e10f0 (patch)
tree91f707ca2c521d513856283bc021d54e2a07d13a /FS/FS/Report/Table.pm
parent69bf020f03918910e0e34260d6e5a9d984f0414d (diff)
customer signup report, #17050
Diffstat (limited to 'FS/FS/Report/Table.pm')
-rw-r--r--FS/FS/Report/Table.pm18
1 files changed, 18 insertions, 0 deletions
diff --git a/FS/FS/Report/Table.pm b/FS/FS/Report/Table.pm
index e8971ec..3942543 100644
--- a/FS/FS/Report/Table.pm
+++ b/FS/FS/Report/Table.pm
@@ -32,6 +32,24 @@ options in %opt.
=over 4
+=item signups: The number of customers signed up.
+
+=cut
+
+sub signups {
+ my( $self, $speriod, $eperiod, $agentnum, %opt ) = @_;
+ my @where = (
+ $self->in_time_period_and_agent($speriod, $eperiod, $agentnum, 'signupdate')
+ );
+ if ( $opt{'refnum'} ) {
+ push @where, "refnum = ".$opt{'refnum'};
+ }
+
+ $self->scalar_sql(
+ "SELECT COUNT(*) FROM cust_main WHERE ".join(' AND ', @where)
+ );
+}
+
=item invoiced: The total amount charged on all invoices.
=cut