X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fpayment_history%2Fvoided_invoice.html;h=ff4d12f58fd2c6baffbaaacf1b6ed7ea03cda9b4;hb=6d34c5060a4e5e9338ebc0d04459861a5c45e812;hp=15393cbf5f6c5f5d1d596d18e764e67a46dc0657;hpb=0af38652da3b3be7da2d35b048285ef6f2194e1a;p=freeside.git diff --git a/httemplate/view/cust_main/payment_history/voided_invoice.html b/httemplate/view/cust_main/payment_history/voided_invoice.html index 15393cbf5..ff4d12f58 100644 --- a/httemplate/view/cust_main/payment_history/voided_invoice.html +++ b/httemplate/view/cust_main/payment_history/voided_invoice.html @@ -1,27 +1,29 @@ <% $link %><% $invoice %><% $link ? '' : '' %> -<% mt("voided [_1]", time2str($date_format, $cust_bill_void->void_date) ) |h %> +voided % my $void_user = $cust_bill_void->void_access_user; % if ($void_user) { - by <% $void_user->username %> + by <% $void_user->username %> % } -<% "$unvoid$delete$under" %> +% my $reason = $cust_bill_void->reason; +% if ($reason) { + (<% $reason |h %>) +% } +<% mt("on [_1]", time2str($date_format, $cust_bill_void->void_date) ) |h %> + +<% "$unvoid$under" %> <%init> my( $cust_bill_void, %opt ) = @_; my $date_format = $opt{'date_format'} || '%m/%d/%Y'; -my $conf = new FS::Conf; - -my $curuser = $FS::CurrentUser::CurrentUser; - my $invoice = emt("Invoice #[_1] (Balance [_2])",$cust_bill_void->display_invnum, $cust_bill_void->charged); my $under = ''; my $invnum = $cust_bill_void->invnum; -my $link = $curuser->access_right('View invoices') +my $link = $opt{'View invoices'} ? qq!! : ''; @@ -31,23 +33,13 @@ $unvoid = areyousure_link("${p}misc/unvoid-cust_bill_void.html?invnum=". $cust_b emt('Unvoid this invoice'), emt('unvoid') ) - if $cust_bill_void->closed !~ /^Y/ && $curuser->access_right('Unvoid invoices'); - -my $delete = ''; -$delete = areyousure_link("${p}misc/delete-cust_bill.html?$invnum", - emt('Are you sure you want to delete this invoice?'), - emt('Delete this invoice from the database completely'), - emt('delete') - ) - if ( $opt{'deleteinvoices'} && $curuser->access_right('Delete invoices') ); + if $cust_bill_void->closed !~ /^Y/ && $opt{'Unvoid invoices'}; my $events = ''; -#1.9 if ( $cust_bill_void->num_cust_event - && ( $curuser->access_right('Billing event reports') - || $curuser->access_right('View customer billing events') - ) - ) { + && ($opt{'Billing event reports'} || $opt{'View customer billing events'}) + ) +{ $under .= qq!
( !. emt('View invoice events').' )';