-#
-my $delete = '';
-$delete = areyousure_link("${p}misc/delete-cust_credit.cgi?".$cust_credit->crednum,
- mt('Are you sure you want to delete this credit?'),
- '',
- mt('delete')
- )
-if ( $cust_credit->closed !~ /^Y/i && $curuser->access_right('Delete credit') );
+
+my $change_pkg = '';
+if ( $apply && $opt{'pkg-balances'} && $cust_credit->pkgnum ) {
+ $change_pkg =
+ ' ('. include('/elements/popup_link.html',
+ 'label' => emt('change package'),
+ 'action' => "${p}edit/cust_credit-pkgnum.html?crednum=".
+ $cust_credit->crednum,
+ 'actionlabel' => emt('Change credit package'),
+ 'width' => 763,
+ ).
+ ')';
+}
+
+my $void = '';
+$void = ' ('.
+ include( '/elements/popup_link.html',
+ 'label' => emt('void'),
+ 'action' => "${p}misc/void-cust_credit.cgi?".
+ $cust_credit->crednum,
+ 'actionlabel' => emt('Void credit'),
+ ).
+ ')'
+ if $cust_credit->closed !~ /^Y/i
+ && $opt{'Void credit'};