diff options
author | Ivan Kohler <ivan@freeside.biz> | 2017-06-02 14:22:07 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2017-06-02 14:22:07 -0700 |
commit | 1f551554a6237be1e70573d04ee333f3ccc93c96 (patch) | |
tree | a4d8a18d301aac90181b707d40b9ea1a9a6821dc | |
parent | 5bd014b7107ad6ff06e0b43f65d23768608814c0 (diff) |
separate ACL for editing customer invoice terms, RT#75759
-rw-r--r-- | httemplate/edit/cust_main/billing.html | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/httemplate/edit/cust_main/billing.html b/httemplate/edit/cust_main/billing.html index 9836810ae..135f636cd 100644 --- a/httemplate/edit/cust_main/billing.html +++ b/httemplate/edit/cust_main/billing.html @@ -552,10 +552,27 @@ <TR> <TD ALIGN="right" WIDTH="200"><% mt('Invoice terms') |h %> </TD> <TD WIDTH="408"> - <& /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, + &> +% } </TD> </TR> |