enable CardFortress in test database, #71513
[freeside.git] / FS / FS / agent.pm
index 2c06a05..fc23433 100644 (file)
@@ -1,9 +1,9 @@
 package FS::agent;
-use base qw( FS::m2m_Common FS::m2name_Common FS::Record );
+use base qw( FS::Commission_Mixin FS::m2m_Common FS::m2name_Common FS::Record );
 
 use strict;
 use vars qw( @ISA );
-use Business::CreditCard 0.28;
+use Business::CreditCard 0.35;
 use FS::Record qw( dbh qsearch qsearchs );
 use FS::cust_main;
 use FS::cust_pkg;
@@ -731,6 +731,16 @@ sub num_sales {
   $sth->fetchrow_arrayref->[0];
 }
 
+sub commission_where {
+  my $self = shift;
+  'cust_credit.commission_agentnum = ' . $self->agentnum;
+}
+
+sub sales_where {
+  my $self = shift;
+  'cust_main.agentnum = ' . $self->agentnum;
+}
+
 =back
 
 =head1 BUGS