X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fpayment_history%2Fcredit.html;h=db2e5e582c1f0c901d8bda676bb6a9a60a893964;hb=20729c347f88e5380b9309ad3f7dd452970b5c3a;hp=ec5041b55ec0ff4448498472ae71ce459d70d42c;hpb=359004f4f4091e9789cb6e23a97c8eb89256d0b2;p=freeside.git diff --git a/httemplate/view/cust_main/payment_history/credit.html b/httemplate/view/cust_main/payment_history/credit.html index ec5041b55..db2e5e582 100644 --- a/httemplate/view/cust_main/payment_history/credit.html +++ b/httemplate/view/cust_main/payment_history/credit.html @@ -1,5 +1,4 @@ -<% $credit %> -<% "$reason$desc$apply$delete$unapply" %> +<% $credit. ' '. $reason. $desc. $change_pkg. $apply . $unapply. $void %> <%init> my( $cust_credit, %opt ) = @_; @@ -113,15 +112,31 @@ if ( scalar(@cust_credit_bill) == 0 $desc .= '
'; } } -# -my $delete = ''; -$delete = areyousure_link("${p}misc/delete-cust_credit.cgi?".$cust_credit->crednum, - emt('Are you sure you want to delete this credit?'), - '', - emt('delete') - ) + +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.html?". + $cust_credit->crednum, + 'actionlabel' => emt('Void credit'), + ). + ')' if $cust_credit->closed !~ /^Y/i - && $opt{'Delete credit'}; + && $opt{'Void credit'}; my $unapply = ''; $unapply = areyousure_link("${p}misc/unapply-cust_credit.cgi?".$cust_credit->crednum,