X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_main%2Fbilling.html;h=135f636cd68f18dbc4fdc80b36a5d4e1fddc993d;hb=1f551554a6237be1e70573d04ee333f3ccc93c96;hp=2925ca87c01d90f1c3adda7e7c90e34fe0fef4b6;hpb=0af38652da3b3be7da2d35b048285ef6f2194e1a;p=freeside.git diff --git a/httemplate/edit/cust_main/billing.html b/httemplate/edit/cust_main/billing.html index 2925ca87c..135f636cd 100644 --- a/httemplate/edit/cust_main/billing.html +++ b/httemplate/edit/cust_main/billing.html @@ -444,10 +444,12 @@   +% my $curuser = $FS::CurrentUser::CurrentUser; % my @exempt_groups = grep /\S/, $conf->config('tax-cust_exempt-groups'); - % if ( $conf->exists('cust_class-tax_exempt') % || $conf->exists('tax-cust_exempt-groups-require_individual_nums') +% || $conf->config('tax-cust_exempt-groups-num_req') =~ /\w/ +% || ! $curuser->access_right('Edit customer tax exemptions') % ) % { @@ -461,14 +463,16 @@ % } -% foreach my $exempt_group ( @exempt_groups ) { -% my $cust_main_exemption = $cust_main->tax_exemption($exempt_group); -% #escape $exempt_group for NAME etc. -% my $checked = ($cust_main_exemption || $cgi->param("tax_$exempt_group")); - -    onChange="tax_changed(this)"> Tax Exempt (<% $exempt_group %> taxes) - - Exemption number exempt_number : '' ) |h %>" <% $checked ? '' : 'DISABLED' %>> - +% if ( $curuser->access_right('Edit customer tax exemptions') ) { +% foreach my $exempt_group ( @exempt_groups ) { +% my $cust_main_exemption = $cust_main->tax_exemption($exempt_group); +% #escape $exempt_group for NAME etc. +% my $checked = ($cust_main_exemption || $cgi->param("tax_$exempt_group")); + +    onChange="tax_changed(this)"> Tax Exempt (<% $exempt_group %> taxes) + - Exemption number exempt_number : '' ) |h %>" <% $checked ? '' : 'DISABLED' %>> + +% } % } % unless ( $conf->exists('emailinvoiceonly') ) { @@ -518,7 +522,13 @@ <% $conf->exists('cust_main-require_invoicing_list_email', $agentnum) ? $r : '' %>Email address(es) - + + message_noemail eq 'Y' ) + ? 'CHECKED' + : '' + %>> <% emt('Do not send notices') %> + % } @@ -527,8 +537,14 @@ <% mt('Prorate day (1-28)') |h %> + <& /elements/checkbox.html, + field => 'force_prorate_day', + value => 'Y', + curr_value => $cust_main->force_prorate_day + &> + - + % } else { % } @@ -536,9 +552,27 @@ <% mt('Invoice terms') |h %> - <& /elements/select-terms.html, - 'curr_value' => $cust_main->invoice_terms, - &> +% 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, + &> +% } @@ -550,8 +584,23 @@ function toggle(obj) { obj.form.credit_limit.disabled = obj.checked; } - credit_limit) %><% length($cust_main->credit_limit) ? '' : ' DISABLED' %>> - credit_limit) ? '' : ' CHECKED'%>> <% mt('Unlimited') |h %> + credit_limit) ? '' : ' DISABLED' %> + > +% my $default_credit_limit = $conf->config('default_credit_limit'); + credit_limit) ? '' : ' CHECKED'%> + > <% $default_credit_limit + ? "Default ($money_char". sprintf("%.2f", $default_credit_limit). + ")" + : mt('Unlimited') + |h + %> @@ -571,9 +620,9 @@ function toggle(obj) { % } -% if ( $conf->exists('voip-cust_email_csv_cdr') ) { +% if ( my $attach = $conf->config('voip-cdr_email_attach') ) { - email_csv_cdr eq "Y" ? 'CHECKED' : '' %>> <% mt('Attach CDRs as CSV to emailed invoices') |h %> + email_csv_cdr eq "Y" ? 'CHECKED' : '' %>> <% mt('Attach CDRs as '. uc($attach). ' to emailed invoices') |h %> % } else { @@ -652,6 +701,8 @@ my $payinfo = $options{'payinfo'}; my $conf = new FS::Conf; my $payby_default = $conf->config('payby-default'); +my $money_char = $conf->config('money_char') || '$'; + my @payby = grep /\w/, $conf->config('payby'); #@payby = (qw( CARD DCRD CHEK DCHK LECB BILL CASH WEST COMP )) @payby = (qw( CARD DCRD CHEK DCHK LECB BILL CASH COMP ))