X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_main%2Fbilling.html;h=f1daebe90d85cacfac84c5e96652d7991a31058c;hb=b05ecb709b4ff5cd10a4df93af3e1ca9b79732e2;hp=0194d31a624b5459a4e157c9d3f0860490ac8651;hpb=5e8073ffe5707504751b8df36f645b325a895f87;p=freeside.git diff --git a/httemplate/edit/cust_main/billing.html b/httemplate/edit/cust_main/billing.html index 0194d31a6..f1daebe90 100644 --- a/httemplate/edit/cust_main/billing.html +++ b/httemplate/edit/cust_main/billing.html @@ -117,6 +117,15 @@ //why? select.selectedIndex = 0; } } + + function tax_changed(what) { + var num = document.getElementById(what.id + '_num'); + if ( what.checked ) { + num.disabled = false; + } else { + num.disabled = true; + } + } @@ -435,9 +444,14 @@   +% my $curuser = $FS::CurrentUser::CurrentUser; % my @exempt_groups = grep /\S/, $conf->config('tax-cust_exempt-groups'); - -% if ( $conf->exists('cust_class-tax_exempt') ) { +% 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') +% ) +% { @@ -449,11 +463,16 @@ % } -% foreach my $exempt_group ( @exempt_groups ) { -% #escape $exempt_group for NAME - -   tax_exemption($exempt_group) ? 'CHECKED' : '' %>> Tax Exempt (<% $exempt_group %> taxes) - +% 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') ) { @@ -466,7 +485,7 @@ ? 'CHECKED' : '' - %>> <% mt('Postal mail invoice') |h %> + %>> <% mt('Postal mail invoices') |h %> @@ -478,21 +497,50 @@ ? 'CHECKED' : '' - %>> <% mt('Fax invoice') |h %> + %>> <% mt('Fax invoices') |h %> % } -% unless ( $conf->exists('cust-email-high-visibility')) { + invoice_noemail eq 'Y' ) + ? '' + : 'CHECKED' + + %>> <% mt('Email invoices') |h %> + + + + +% unless ( $conf->exists('cust-email-high-visibility')) { + <% $conf->exists('cust_main-require_invoicing_list_email', $agentnum) ? $r : '' %>Email address(es) - + + message_noemail eq 'Y' ) + ? 'CHECKED' + : '' + %>> <% emt('Do not send notices') %> + + +% } + +% if ( $conf->exists('cust_main-select-prorate_day') ) { + + <% mt('Prorate day (1-28)') |h %> + + + +% } else { + % } @@ -512,8 +560,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 + %> @@ -614,6 +677,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 ))