summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2013-04-16 22:46:33 -0700
committerMark Wells <mark@freeside.biz>2013-04-16 22:46:33 -0700
commit7ce77a80cf98d1b97e8bcd942d03905902b9d653 (patch)
treeb12ad842eb6054e10dd30ccbe1b3b3251e9ff3a8
parent70703cceac85b646d72db2f71f82ca35f7a517dc (diff)
fix method name conflict
-rw-r--r--FS/FS/cust_pkg.pm7
-rw-r--r--httemplate/view/cust_main/packages/contact.html2
2 files changed, 7 insertions, 2 deletions
diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm
index bb1b4e37a..801228871 100644
--- a/FS/FS/cust_pkg.pm
+++ b/FS/FS/cust_pkg.pm
@@ -227,7 +227,7 @@ Create a new billing item. To add the item to the database, see L<"insert">.
=cut
sub table { 'cust_pkg'; }
-sub cust_linked { $_[0]->cust_main_custnum; }
+sub cust_linked { $_[0]->cust_main_custnum || $_[0]->custnum }
sub cust_unlinked_msg {
my $self = shift;
"WARNING: can't find cust_main.custnum ". $self->custnum.
@@ -3569,6 +3569,11 @@ sub main_pkg {
return;
}
+# workaround for name conflict
+sub pkg_contact {
+ FS::contact_Mixin::contact(@_);
+}
+
=back
=head1 CLASS METHODS
diff --git a/httemplate/view/cust_main/packages/contact.html b/httemplate/view/cust_main/packages/contact.html
index 87a7b02bd..bb9453470 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->contact;
+my $contact = $cust_pkg->pkg_contact;
sub pkg_change_contact_link {
my $cust_pkg = shift;