summaryrefslogtreecommitdiff
path: root/FS/FS/agent.pm
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2013-09-27 17:19:36 -0700
committerMark Wells <mark@freeside.biz>2013-09-27 17:19:36 -0700
commiteb3bd392a89b8b666dc512951e78913c05b98810 (patch)
tree22670bdf99b0a473abb708f6f5c55cbfa2f0c249 /FS/FS/agent.pm
parente3012c0751dad6710ea35b6d074b551bffdad09b (diff)
invoice configurations, #24723
Diffstat (limited to 'FS/FS/agent.pm')
-rw-r--r--FS/FS/agent.pm17
1 files changed, 17 insertions, 0 deletions
diff --git a/FS/FS/agent.pm b/FS/FS/agent.pm
index 0cd07ef..d70ff18 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<FS::invoice_mode> 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