diff options
author | Irina Todeva <itodeva@hostgator.com> | 2015-10-08 15:45:09 -0600 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2015-11-03 12:28:14 -0800 |
commit | b5d5f7680d0736ff0150b337cd29026135fb2e34 (patch) | |
tree | 9b1f5b78b47e7ff5d94015378930be23debe91d9 /httemplate/view/cust_bill.cgi | |
parent | 1ef811033e1ea791388c7c8d15a3a5a720b1f37f (diff) |
Changes for being consistent in the payment history GUI on void credit /
payment / invoice links
renamed httemplate/misc/void-cust_credit.html to .cgi
renamed httemplate/misc/void-cust_bill.html to .cgi
Diffstat (limited to 'httemplate/view/cust_bill.cgi')
-rwxr-xr-x | httemplate/view/cust_bill.cgi | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi index 8884ddea4..6d139747a 100755 --- a/httemplate/view/cust_bill.cgi +++ b/httemplate/view/cust_bill.cgi @@ -9,13 +9,30 @@ function areyousure(href, message) { } </SCRIPT> -% if ( !$cust_bill->closed && $curuser->access_right('Void invoices') ) { +% if ( !$cust_bill->closed ) { # otherwise allow no changes +% my $can_delete = $conf->exists('deleteinvoices') +% && $curuser->access_right('Delete invoices'); +% my $can_void = $curuser->access_right('Void invoices'); +% if ( $can_void ) { <& /elements/popup_link.html, 'label' => emt('Void this invoice'), 'actionlabel' => emt('Void this invoice'), - 'action' => $p.'misc/void-cust_bill.html?invnum='.$invnum, + 'action' => $p.'misc/void-cust_bill.cgi?invnum='.$invnum, &> - <BR><BR> +% } +% if ( $can_void and $can_delete ) { + | +% } +% if ( $can_delete ) { + <A href="" onclick="areyousure(\ + '<%$p%>misc/delete-cust_bill.html?<% $invnum %>',\ + <% mt('Are you sure you want to delete this invoice?') |js_string %>)"\ + TITLE = "<% mt('Delete this invoice from the database completely') |h %>">\ + <% emt('Delete this invoice') |h %></A> +% } +% if ( $can_void or $can_delete ) { + <BR><BR> +% } % } % if ( $cust_bill->owed > 0 |