From 300ff26285e8de055a71d11df5d2954d5837a6b2 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Fri, 2 Jun 2017 14:22:04 -0700 Subject: [PATCH] separate ACL for editing customer invoice terms, RT#75759 --- httemplate/edit/cust_main/billing.html | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/httemplate/edit/cust_main/billing.html b/httemplate/edit/cust_main/billing.html index 5714f9a2b..fa7abd2c0 100644 --- a/httemplate/edit/cust_main/billing.html +++ b/httemplate/edit/cust_main/billing.html @@ -179,10 +179,27 @@ <% mt('Invoice terms') |h %> - <& /elements/select-terms.html, - 'curr_value' => $cust_main->invoice_terms, - 'agentnum' => $cust_main->agentnum, - &> +% if ( $curuser->access_right('Edit customer invoice terms') ) { + <& /elements/select-terms.html, + 'curr_value' => $cust_main->invoice_terms, + 'agentnum' => $cust_main->agentnum, + &> +% } else { +% +% my $terms = +% $cust_main->invoice_terms +% || emt('Default').' ('. +% ( $conf->config('invoice_default_terms', $cust_main->agentnum) +% || emt('Payable upon receipt') +% ). +% ')'; + <% $terms |h %> + + <& /elements/hidden.html, + 'field' => 'invoice_terms', + 'curr_value' => $cust_main->invoice_terms, + &> +% } -- 2.11.0