diff options
-rw-r--r-- | FS/FS/contact_Mixin.pm | 4 | ||||
-rw-r--r-- | FS/FS/cust_pkg.pm | 5 | ||||
-rw-r--r-- | httemplate/elements/tr-select-contact.html | 2 | ||||
-rw-r--r-- | httemplate/view/cust_main/packages/contact.html | 2 |
4 files changed, 4 insertions, 9 deletions
diff --git a/FS/FS/contact_Mixin.pm b/FS/FS/contact_Mixin.pm index 33cd3509a..6e8f315b9 100644 --- a/FS/FS/contact_Mixin.pm +++ b/FS/FS/contact_Mixin.pm @@ -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 } ); diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm index 801228871..741d440fa 100644 --- a/FS/FS/cust_pkg.pm +++ b/FS/FS/cust_pkg.pm @@ -3569,11 +3569,6 @@ sub main_pkg { return; } -# workaround for name conflict -sub pkg_contact { - FS::contact_Mixin::contact(@_); -} - =back =head1 CLASS METHODS diff --git a/httemplate/elements/tr-select-contact.html b/httemplate/elements/tr-select-contact.html index 579117808..d6bc67f36 100644 --- a/httemplate/elements/tr-select-contact.html +++ b/httemplate/elements/tr-select-contact.html @@ -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 ) { diff --git a/httemplate/view/cust_main/packages/contact.html b/httemplate/view/cust_main/packages/contact.html index bb9453470..c3b161b70 100644 --- a/httemplate/view/cust_main/packages/contact.html +++ b/httemplate/view/cust_main/packages/contact.html @@ -20,7 +20,7 @@ my %opt = @_; my $cust_pkg = $opt{'cust_pkg'}; -my $contact = $cust_pkg->pkg_contact; +my $contact = $cust_pkg->contact_obj; sub pkg_change_contact_link { my $cust_pkg = shift; |