last bit of magic for RT ticket customer auto-association: look for requestor email...
[freeside.git] / FS / FS / cust_main_invoice.pm
index 71029d0..11d5a44 100644 (file)
@@ -159,6 +159,17 @@ sub address {
   }
 }
 
+=item cust_main
+
+Returns the parent customer object (see L<FS::cust_main>).
+
+=cut
+
+sub cust_main {
+  my $self = shift;
+  qsearchs( 'cust_main', { 'custnum' => $self->custnum } );
+}
+
 =back
 
 =head1 BUGS