summaryrefslogtreecommitdiff
path: root/FS/FS/Report/Table.pm
diff options
context:
space:
mode:
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 e8971ec7a..3942543b5 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