fix method name conflict
authorMark Wells <mark@freeside.biz>
Wed, 17 Apr 2013 05:46:33 +0000 (22:46 -0700)
committerMark Wells <mark@freeside.biz>
Wed, 17 Apr 2013 05:46:33 +0000 (22:46 -0700)
FS/FS/cust_pkg.pm
httemplate/view/cust_main/packages/contact.html

index bb1b4e3..8012288 100644 (file)
@@ -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
index 87a7b02..bb94534 100644 (file)
@@ -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;