From: Ivan Kohler Date: Fri, 2 Jun 2017 21:22:06 +0000 (-0700) Subject: separate ACL for editing customer invoice terms, RT#75759 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=67438dccad6bd9a800f6ab6a179aaad1598eae3a;p=freeside.git separate ACL for editing customer invoice terms, RT#75759 --- diff --git a/httemplate/edit/cust_main/billing.html b/httemplate/edit/cust_main/billing.html index 649c4c945..4dddb831a 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, + &> +% }