-<& /elements/header-cust_main.html,
- view => 'packages',
- custnum => $cust_pkg->custnum,
-&>
-
-<& /elements/footer-cust_main.html &>
+<% $cgi->redirect($path) %>
<%init>
-
+# since cust_pkgs can't be viewed directly, just throw a redirect
my ($pkgnum) = $cgi->keywords;
$pkgnum =~ /^\d+$/ or die "invalid pkgnum '$pkgnum'";
+my $show = $FS::CurrentUser::CurrentUser->default_customer_view =~ /^(jumbo|packages)$/ ? '' : ';show=packages';
-my $cust_pkg = FS::cust_pkg->by_key($pkgnum) or die "pkgnum $pkgnum not found";
-
+my $self = FS::cust_pkg->by_key($pkgnum) or die "pkgnum $pkgnum not found";
+my $frag = 'cust_pkg'. $self->pkgnum;
+my $path = $p.'view/cust_main.cgi?custnum='.$self->custnum.";$show#$frag";
</%init>