1 % if ( $cancel_date ) {
2 <I><% mt("Canceled [_1]", time2str('%b %o %Y', $cancel_date) ) |h %></I>
5 function areyousure_delete() {
6 if (confirm(<% mt('Permanently delete this service?') |js_string %>) == true)
7 window.location.href = '<% $cancel_url %>';
10 % if ( $curuser->access_right('Provision customer service') ) {
11 | <A HREF="<% $edit_url %>"><% mt("Edit this [_1]", $label) |h %></A>
13 % if ( $curuser->access_right('Unprovision customer service') ) {
14 | <A HREF="javascript:areyousure_delete()"><% mt('Unprovision this Service') |h %></A>
19 my $svc_x = $opt{'svc'} or die "'svc' required";
20 my $svcdb = $opt{'table'} || $svc_x->table;
21 my $edit_url = ($opt{'edit_url'} ||
22 $p . 'edit/' . $svcdb . '.cgi?' ). $svc_x->svcnum;
23 my $cancel_url = $p . 'misc/unprovision.cgi?' . $svc_x->svcnum;
24 my $cust_svc = $svc_x->cust_svc; # always exists
25 my $cancel_date = $cust_svc->pkg_cancel_date;
26 my ($label) = $cust_svc->label;
27 my $curuser = $FS::CurrentUser::CurrentUser;