X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fagent.pm;h=d70ff18b4f7dd2224427b4432f1195b04acfe030;hb=2e7ce01632012ccc0dd440a8bc37a9ec9bd55fac;hp=0cd07ef15b4984aebc1cb903ca6992351c668242;hpb=5c0cfcb8dec7c4f3a7aecea4c550ffb4bfb774c3;p=freeside.git diff --git a/FS/FS/agent.pm b/FS/FS/agent.pm index 0cd07ef15..d70ff18b4 100644 --- a/FS/FS/agent.pm +++ b/FS/FS/agent.pm @@ -378,6 +378,23 @@ sub payment_gateway { $payment_gateway; } +=item invoice_modes + +Returns all L objects that are valid for this agent (i.e. +those with this agentnum or null agentnum). + +=cut + +sub invoice_modes { + my $self = shift; + qsearch( { + table => 'invoice_mode', + hashref => { agentnum => $self->agentnum }, + extra_sql => ' OR agentnum IS NULL', + order_by => ' ORDER BY modename', + } ); +} + =item num_prospect_cust_main Returns the number of prospects (customers with no packages ever ordered) for