Merge branch 'xss_fixes' of https://github.com/mcreenan/Freeside
[freeside.git] / FS / FS / cust_pkg.pm
index bb1b4e3..741d440 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.