fix fallout from #22185 (#22601, #22600)
authorIvan Kohler <ivan@freeside.biz>
Wed, 17 Apr 2013 16:41:30 +0000 (09:41 -0700)
committerIvan Kohler <ivan@freeside.biz>
Wed, 17 Apr 2013 16:41:30 +0000 (09:41 -0700)
FS/FS/contact_Mixin.pm
httemplate/elements/tr-select-contact.html
httemplate/view/cust_main/packages/contact.html

index 33cd350..6e8f315 100644 (file)
@@ -4,13 +4,13 @@ use strict;
 use FS::Record qw( qsearchs );
 use FS::contact;
 
-=item contact
+=item contact_obj
 
 Returns the contact object, if any (see L<FS::contact>).
 
 =cut
 
-sub contact {
+sub contact_obj {
   my $self = shift;
   return '' unless $self->contactnum;
   qsearchs( 'contact', { 'contactnum' => $self->contactnum } );
index 5791178..d6bc67f 100644 (file)
@@ -162,7 +162,7 @@ if ( $contactnum && $contactnum > 0 ) {
   if ( $contactnum == -1 ) {
     $contact->$_( $cgi->param($_) ) foreach @contact_fields; #XXX
   } elsif ( $cust_pkg && $cust_pkg->contactnum ) {
-    my $pkg_contact = $cust_pkg->contact;
+    my $pkg_contact = $cust_pkg->contact_obj;
     $contact->$_( $pkg_contact->$_ ) foreach @contact_fields; #XXX why are we making a new one gagain??
     $opt{'empty_label'} ||= 'package contact: '.$pkg_contact->line;
   } elsif ( $cust_main ) {
index a6f8a42..f47705c 100644 (file)
@@ -22,7 +22,7 @@ my %opt = @_;
 
 my $cust_pkg       = $opt{'cust_pkg'};
 
-my $contact = $cust_pkg->contact;
+my $contact = $cust_pkg->contact_obj;
 
 sub pkg_change_contact_link {
   my $cust_pkg = shift;