2 <% $contact->line |h %>
3 % if ( $show_change_link && ! $opt{no_links} ) {
5 ( <%pkg_change_contact_link($cust_pkg)%> )
8 % if ( $show_detach_link && ! $opt{no_links} ) {
10 ( <%pkg_detach_link($cust_pkg)%> )
19 my $cust_pkg = $opt{'cust_pkg'};
21 my $show_change_link =
22 ! $cust_pkg->get('cancel')
23 && $FS::CurrentUser::CurrentUser->access_right('Change customer package');
25 my $show_detach_link =
26 ! $cust_pkg->get('cancel')
27 && $FS::CurrentUser::CurrentUser->access_right('Detach customer package');
29 my $contact = $cust_pkg->contact_obj;
31 sub pkg_change_contact_link {
33 #my $pkgpart = $cust_pkg->pkgpart;
34 include( '/elements/popup_link-cust_pkg.html',
35 'action' => $p. "misc/change_pkg_contact.html",
36 'label' => emt('Change'), # contact'),
37 'actionlabel' => emt('Change'),
38 'cust_pkg' => $cust_pkg,
46 #my $pkgpart = $cust_pkg->pkgpart;
47 include( '/elements/popup_link-cust_pkg.html',
48 'action' => $p. "misc/detach_pkg.html",
49 'label' => emt('Detach'),
50 'actionlabel' => emt('Detach'),
51 'cust_pkg' => $cust_pkg,
57 #sub edit_contact_link {
58 # my $contactnum = shift;
59 # include( '/elements/popup_link.html',
60 # 'action' => $p. "edit/cust_contact.cgi?contactnum=$contactnum",
61 # 'label' => emt('Edit contact'),
62 # 'actionlabel' => emt('Edit'),