X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_main%2Fbilling.html;h=1f44905f8d3364d4e3fcfd201d59925980942cad;hb=933897259d1e64fdc12c612f924db3b039a9ffdf;hp=78fac6c228d9c9918b308bcab5c4c4917199a152;hpb=fa33561ed20c57b0f63221d6a0f9c0cf5ebbef14;p=freeside.git
diff --git a/httemplate/edit/cust_main/billing.html b/httemplate/edit/cust_main/billing.html
index 78fac6c22..1f44905f8 100644
--- a/httemplate/edit/cust_main/billing.html
+++ b/httemplate/edit/cust_main/billing.html
@@ -34,7 +34,7 @@
%
% my $r = qq!* !;
-
<% mt('Billing information') |h %>
+
<% mt('Billing information') |h %>
<% &ntable("#cccccc") %>
@@ -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,17 +444,35 @@
|
+% 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')
+% )
+% {
-
- tax eq "Y" ? 'CHECKED' : '' %>> Tax Exempt<% @exempt_groups ? ' (all taxes)' : '' %> |
-
+
+
+% } else {
-% foreach my $exempt_group ( @exempt_groups ) {
-% #escape $exempt_group for NAME
- tax_exemption($exempt_group) ? 'CHECKED' : '' %>> Tax Exempt (<% $exempt_group %> taxes) |
+ | tax eq "Y" ? 'CHECKED' : '' %>> Tax Exempt<% @exempt_groups ? ' (all 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') ) {
@@ -458,7 +485,7 @@
? 'CHECKED'
: ''
- %>> <% mt('Postal mail invoice') |h %>
+ %>> <% mt('Postal mail invoices') |h %>
@@ -470,22 +497,52 @@
? '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') ? $r : '' %>Email address(es)
+ <% $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 {
+
+% }
+
<% mt('Invoice terms') |h %> |
@@ -503,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
+ %>
|
@@ -559,27 +631,49 @@ function toggle(obj) {
% }
+%my @currencies = $conf->config('currencies');
+%if ( scalar(@currencies) ) {
+% unshift @currencies, ''; #default
+% my %currency_labels = map { $_ => "$_: ". code2currency($_) } @currencies;
+% $currency_labels{''} =
+% 'Default: '. code2currency( $conf->config('currency') || 'USD' );
+
+ <& /elements/tr-select.html,
+ 'label' => emt('Invoicing currency'),
+ 'field' => 'currency',
+ 'options' => \@currencies,
+ 'labels' => \%currency_labels,
+ 'curr_value' => $cust_main->currency,
+ &>
+% }
+
+
%my @available_locales = $conf->config('available-locales');
%if ( scalar(@available_locales) ) {
-% push @available_locales, '';
-% my %locale_labels = map {
-% my %ll;
-% my %info = FS::Locales->locale_info($_);
-% $ll{$_} = $info{name} . " (" . $info{country} . ")";
-% %ll;
-% } FS::Locales->locales;
- <& /elements/tr-select.html,
- 'label' => emt('Invoicing locale'),
- 'field' => 'locale',
- 'options' => \@available_locales,
- 'labels' => \%locale_labels,
- 'curr_value' => $cust_main->locale,
- &>
+% push @available_locales, ''
+% unless $cust_main->locale && $conf->exists('cust_main-require_locale');
+% my %locale_labels = map {
+% my %ll;
+% my %info = FS::Locales->locale_info($_);
+% $ll{$_} = $info{name} . " (" . $info{country} . ")";
+% %ll;
+% } FS::Locales->locales;
+%
+% my $label = ( $conf->exists('cust_main-require_locale') ? $r : '' ).
+% emt('Invoicing locale');
+
+ <& /elements/tr-select.html,
+ 'label' => $label,
+ 'field' => 'locale',
+ 'options' => \@available_locales,
+ 'labels' => \%locale_labels,
+ 'curr_value' => $cust_main->locale,
+ &>
% }
- <% $r %> <% mt('required fields') |h %>
+ <% $r %><% mt('required fields') |h %>
% }