summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2017-06-02 14:22:06 -0700
committerIvan Kohler <ivan@freeside.biz>2017-06-02 14:22:06 -0700
commit67438dccad6bd9a800f6ab6a179aaad1598eae3a (patch)
tree93c983e49a517b3742020ddefdaccfdd41f39e02
parent4a846ddc1bd5f16c905aa3c272d1a452070e39b5 (diff)
separate ACL for editing customer invoice terms, RT#75759
-rw-r--r--httemplate/edit/cust_main/billing.html25
1 files changed, 21 insertions, 4 deletions
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 @@
<TR>
<TH 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>