${r}!.emt('Expiration').qq! | !.
% ''.
%
% include('/elements/select-month_year.html',
-% 'prefix' => 'exp',
+% 'prefix' => 'COMP_exp',
% 'selected_date' =>
% ( $payby eq 'COMP' ? $cust_main->paydate : '' ),
% ).
@@ -289,8 +365,8 @@
%
% ''.
%
-% qq!${r}Amount | !.
-% qq! | !.
+% qq!${r}!.emt('Amount').qq! | !.
+% qq! | !.
%
% ' | '.
% ' | '.
@@ -305,8 +381,8 @@
%
% ''.
%
-% qq!${r}Amount | !.
-% qq! | !.
+% qq!${r}!.emt('Amount').qq! | !.
+% qq! | !.
%
% ' | '.
% ' | '.
@@ -321,8 +397,8 @@
%
% ''.
%
-% qq!${r}Amount | !.
-% qq! | !.
+% qq!${r}!.emt('Amount').qq! | !.
+% qq! | !.
%
% ' | '.
% ' | '.
@@ -336,56 +412,67 @@
% );
%
% #this should use FS::payby
-% my %allopt = (
-% 'CARD' => 'Credit card',
-% 'CHEK' => 'Electronic check',
-% 'LECB' => 'Phone bill billing',
-% 'BILL' => 'Billing',
-% 'CASH' => 'Cash', # initial payment, then billing',
-% 'WEST' => 'Western Union', # initial payment, then billing',
-% 'MCRD' => 'Manual credit card', # initial payment, then billing',
-% 'COMP' => 'Complimentary',
-% );
-% if ( $cust_main->custnum ) { #don't offer CASH/WEST/MCRD initial payment types
-% # when editing customer
+% my @allopt = qw( CARD CHEK LECB BILL CASH WEST MCRD COMP );
+%
+% my %allopt = map { $_ => FS::payby->shortname($_) } @allopt;
+%
+% if ( $cust_main->custnum ) {
+% #don't offer CASH/WEST/MCRD initial payment types when editing customer
% delete $allopt{$_} for qw(CASH WEST MCRD);
% }
%
-% tie my %options, 'Tie::IxHash',
-% map { $_ => $allopt{$_} }
-% grep { exists $allopt{$_} }
-% @payby;
+% my @options = grep exists( $allopt{$_} ), @payby;
%
% my %payby2option = (
-% ( map { $_ => $_ } keys %options ),
+% ( map { $_ => $_ } @options ),
% 'DCRD' => 'CARD',
% 'DCHK' => 'CHEK',
% );
-%
-% my $widget = new HTML::Widgets::SelectLayers(
-% 'options' => \%options,
-% #'form_name' => 'dummy',
-% #'form_action' => 'nothingyet',
-% #chops bottom of page in IE# 'under_position' => 'absolute',
-% 'html_between' => ' ',
-% 'selected_layer' => $payby2option{$payby || $payby_default || $payby[0] },
-% 'layer_callback' => sub { my $layer = shift; $payby{$layer}; },
-% );
-%
-%
-
- <% $widget->html %>
-
- | ',
+ 'layer_callback' => sub { my $layer = shift; $payby{$layer}; },
+ 'onchange' => 'init_payauto_changed();',
+ &>
<% &ntable("#cccccc") %>
|
-
- tax eq "Y" ? 'CHECKED' : '' %>> Tax Exempt |
-
+% 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')
+% || ! $curuser->access_right('Edit customer tax exemptions')
+% )
+% {
+
+
+
+% } else {
+
+
+ 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') ) {
@@ -397,7 +484,7 @@
? 'CHECKED'
: ''
- %>> Postal mail invoice
+ %>> <% mt('Postal mail invoices') |h %>
@@ -409,7 +496,7 @@
? 'CHECKED'
: ''
- %>> Fax invoice
+ %>> <% mt('Fax invoices') |h %>
@@ -417,51 +504,166 @@
% }
+ 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 {
+
+% }
- Invoice terms |
+ <% mt('Invoice terms') |h %> |
-
+ <& /elements/select-terms.html,
+ 'curr_value' => $cust_main->invoice_terms,
+ &>
+ |
+
+
+
+ <% mt('Credit limit') |h %> |
+
+
+ credit_limit) %><% length($cust_main->credit_limit) ? '' : ' DISABLED' %>>
+ credit_limit) ? '' : ' CHECKED'%>> <% mt('Unlimited') |h %>
|
% if ( $conf->exists('voip-cust_cdr_spools') ) {
- spool_cdr eq "Y" ? 'CHECKED' : '' %>> Spool CDRs |
+ spool_cdr eq "Y" ? 'CHECKED' : '' %>> <% mt('Spool CDRs') |h %> |
% } else {
-
-% }
+% }
% if ( $conf->exists('voip-cust_cdr_squelch') ) {
- squelch_cdr eq "Y" ? 'CHECKED' : '' %>> Omit CDRs from invoices |
+ squelch_cdr eq "Y" ? 'CHECKED' : '' %>> <% mt($conf->exists('voip-cdr_email') ? 'Omit CDRs from printed invoices' : 'Omit CDRs from invoices') |h %> |
% } else {
-
-% }
+% }
+
+% if ( $conf->exists('voip-cust_email_csv_cdr') ) {
+
+ email_csv_cdr eq "Y" ? 'CHECKED' : '' %>> <% mt('Attach CDRs as CSV to emailed invoices') |h %> |
+
+% } else {
+
+% }
+
+% if ( $conf->exists('voip-cust_accountcode_cdr') ) {
+
+
+ accountcode_cdr eq "Y" ? 'CHECKED' : '' %>
+ > <% mt('Breakdown CDRs by accountcode') |h %> |
+
+% } else {
+
+% }
+
+% if ( $show_term || $cust_main->cdr_termination_percentage ) {
+
+ <% mt('CDR termination settlement') |h %> |
+ % |
+
+% } else {
+
+% }
+
+%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, ''
+% 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 %> required fields
+ |