X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fagent.pm;h=4ad878d4306302141d8455bc58e36058b880170b;hb=770d8237cda1b6459962d31f6ae86997ad5843be;hp=2c06a05766b1d703d0a1d50807202b44277f1031;hpb=7e2ab49f83c119aeeaf7142e369b93bef9fdafd0;p=freeside.git diff --git a/FS/FS/agent.pm b/FS/FS/agent.pm index 2c06a0576..4ad878d43 100644 --- a/FS/FS/agent.pm +++ b/FS/FS/agent.pm @@ -1,5 +1,5 @@ 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 ); @@ -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