X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_main%2Fbilling.html;h=da5f0f27f06ee557a559c385892903c759928a4e;hp=ad83778ca1dbfad2f58a23bb186984ebd0097e28;hb=b7a2175dd9b386441f4ab66869d73083e5e8beb1;hpb=63a268637b2d51a8766412617724b9436439deb6 diff --git a/httemplate/edit/cust_main/billing.html b/httemplate/edit/cust_main/billing.html index ad83778ca..da5f0f27f 100644 --- a/httemplate/edit/cust_main/billing.html +++ b/httemplate/edit/cust_main/billing.html @@ -1,5 +1,4 @@ %if ( $payby_default eq 'HIDE' ) { -% % $cust_main->payby('BILL') unless $cust_main->payby; % my $payby = $cust_main->payby; @@ -7,7 +6,7 @@ -% foreach my $field (qw( payname paycvv paystart_month paystart_year payissue payip paytype paystate )) { +% foreach my $field (qw( payname paycvv paystart_month paystart_year payissue payip paytype paystate billday )) { @@ -35,11 +34,11 @@ % % my $r = qq!* !; -
Billing information +
<% mt('Billing information') |h %> <% &ntable("#cccccc") %> - <%$r%>Billing type + <%$r%><% mt('Billing type') |h %> - <% include('/elements/init_overlib.html') %> + <& /elements/init_overlib.html &> % my $payby = $cust_main->payby; % my $paytype = $cust_main->paytype; % my( $account, $aba ) = split('@', $payinfo); +% my $branch = ''; +% ($branch,$aba) = split('\.',$aba) +% if $conf->config('echeck-country') eq 'CA'; % % my $disabled = 'DISABLED style="background-color: #dddddd"'; % my $text_disabled = 'style="color: #999999"'; @@ -112,16 +146,48 @@ % $text_disabled = 'style="color: #000000";' % } % +% my $disable_payauto = $conf->exists('disable_payauto_default'); +% my $CARD_payauto_checked = $payby eq 'DCRD' ? '' +% : $payby eq 'CARD' ? 'CHECKED' +% : $disable_payauto ? '' : 'CHECKED'; +% my $CHEK_payauto_checked = $payby eq 'DCHK' ? '' +% : $payby eq 'CHEK' ? 'CHECKED' +% : $disable_payauto ? '' : 'CHECKED'; +% +% sub billday_options { +% my $curr_value = shift; +% my $ret = ''; +% for my $billday ( 1 .. 28 ) { +% my $sel = ''; +% $sel = "SELECTED='SELECTED'" if $curr_value == $billday; +% $ret .= ""; +% } +% $ret; +% } +% +% my $card_billday_style = $payby eq 'CARD' ? '' : 'style="color: #999999"'; +% my $chek_billday_style = $payby eq 'CHEK' ? '' : 'style="color: #999999"'; +% my $card_billday_select_disabled = $payby eq 'CARD' ? '' : 'DISABLED'; +% my $chek_billday_select_disabled = $payby eq 'CHEK' ? '' : 'DISABLED'; +% +% #false laziness w/view/cust_main/billing.html and misc/payment.cgi +% my $routing_label = $conf->config('echeck-country') eq 'US' +% ? 'ABA/Routing number' +% : 'Routing number'; +% my $routing_size = $conf->config('echeck-country') eq 'CA' ? 4 : 10; +% my $routing_maxlength = $conf->config('echeck-country') eq 'CA' ? 3 : 9; +% +% % my %payby = ( % % 'CARD' => % % ''. % -% qq!!. +% qq!!. % qq!!. % -% qq!!. +% qq!!. % ''. % -% qq!!. % '!. +% qq!!. % '!. % -% qq!!. +% qq!!. % qq!!. % -% qq!'. +% qq!'. +% +% ( $conf->exists('cust_main-select-billday') ? +% qq!! +% : '' +% ). % % '
${r}Card number
${r}!.emt('Card number').qq!
${r}Expiration
${r}!.emt('Expiration').qq! '. % % include('/elements/select-month_year.html', @@ -132,14 +198,13 @@ % % '
CVV2 !. +% qq!
!.emt('CVV2').qq! !. % -% qq!(help)!. +% qq!(!.emt('help').qq!)!. % qq!'. % -% -% qq!
Start date
!.emt('Start date').qq! '. % % include('/elements/select-month_year.html', @@ -157,13 +222,23 @@ % ) % ). % -% qq! or Issue number !. +% qq!!.emt('or Issue number').qq! !. % '
${r}Exact name on card
${r}!.emt('Exact name on card').qq!
Charge future payments to this card automatically
!. +% qq! !. +% emt('Charge future payments to this [_1] automatically','credit card').'
+% Charge on this day of each month   +%
', % @@ -171,27 +246,31 @@ % % ''. % -% qq!!. +% qq!!. % qq!'. -% qq!!. % -% qq!!. -% qq!!. +% qq!!. % % qq!!. % qq!!. % -% qq!!. +% ( $conf->config('echeck-country') eq 'CA' ? +% qq!! : '' ). +% +% qq!!. % qq!!. % ( $conf->exists('show_bankstate') ? % qq!!. % qq!'. +% qq!'. % -% ''. -% ''. -% ''. +% ( $conf->exists('cust_main-select-billday') ? +% qq!! +% : '' +% ). % % '
${r}Account number
${r}!.emt('Account number').qq! Type!.emt('Type').qq!
${r}ABA/Routing number !. -% qq!(help)!. +% qq!
${r}!.emt($routing_label).qq! !. +% qq!(!.emt('help').qq!)!. % qq!
${r}Bank name
$r !.emt('Branch number').qq! +%
${r}!.emt('Bank name').qq!
$paystate_label!. % include('/elements/select-state.html', -% 'empty' => '(choose)', +% 'empty' => emt('(choose)'), % 'state' => $cust_main->paystate, % 'country' => $cust_main->country, % 'prefix' => 'CHEK_pay', @@ -201,11 +280,17 @@ % ). % % -% qq!
Charge future payments to this electronic check automatically
!. +% qq! !. +% emt('Charge future payments to this [_1] automatically','electronic check').'
 
 
 
+% Charge on this day of each month   +%
', % @@ -213,7 +298,7 @@ % % ''. % -% qq!!. +% qq!!. % qq!!. % % qq!!. @@ -233,14 +318,14 @@ % % '
${r}Phone number
${r}!.emt('Phone number').qq!
'. % -% qq!!. +% qq!!. % qq!!. % % qq!!. % qq!!. % -% qq!!. -% qq!!. +% qq!!. +% qq!!. % % ''. % ''. @@ -254,10 +339,10 @@ % % '
P.O.
!.emt('P.O.').qq!
Attention
!.emt('Attention').qq!
 
 
'. % -% qq!!. +% qq!!. % qq!!. % -% qq!!. +% qq!!. % ' +% 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 { -% foreach my $exempt_group ( @exempt_groups ) { -% #escape $exempt_group for NAME - + +% } + +% 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")); + + + + +% } % } % unless ( $conf->exists('emailinvoiceonly') ) { @@ -382,7 +484,7 @@ ? 'CHECKED' : '' - %>> Postal mail invoice + %>> <% mt('Postal mail invoices') |h %> @@ -394,7 +496,7 @@ ? 'CHECKED' : '' - %>> Fax invoice + %>> <% mt('Fax invoices') |h %> @@ -402,25 +504,69 @@ % } + + + +% unless ( $conf->exists('cust-email-high-visibility')) { + + + +% } + +% if ( $conf->exists('cust_main-select-prorate_day') ) { + + + - +% } else { + +% } - + + + + + + % if ( $conf->exists('voip-cust_cdr_spools') ) { - + % } else { @@ -428,7 +574,7 @@ % if ( $conf->exists('voip-cust_cdr_squelch') ) { - + % } else { @@ -436,15 +582,28 @@ % if ( $conf->exists('voip-cust_email_csv_cdr') ) { - + % } else { % } +% if ( $conf->exists('voip-cust_accountcode_cdr') ) { + + + +% } else { + +% } + % if ( $show_term || $cust_main->cdr_termination_percentage ) { - +
${r}Approved by
${r}!.emt('Approved by').qq!
${r}Expiration
${r}!.emt('Expiration').qq! '. % % include('/elements/select-month_year.html', @@ -280,7 +365,7 @@ % % ''. % -% qq!!. +% qq!!. % qq!!. % % ''. @@ -296,7 +381,7 @@ % % '
${r}Amount
${r}!.emt('Amount').qq!
 
'. % -% qq!!. +% qq!!. % qq!!. % % ''. @@ -312,7 +397,7 @@ % % '
${r}Amount
${r}!.emt('Amount').qq!
 
'. % -% qq!!. +% qq!!. % qq!!. % % ''. @@ -345,31 +430,48 @@ % );
${r}Amount
${r}!.emt('Amount').qq!
 
- <% include( '/elements/selectlayers.html', + <& /elements/selectlayers.html, 'field' => 'payby', 'curr_value' => $payby2option{$payby || $payby_default || $payby[0] }, 'options' => \@options, 'labels' => \%allopt, 'html_between' => '
', 'layer_callback' => sub { my $layer = shift; $payby{$layer}; }, - ) - %> + 'onchange' => 'init_payauto_changed();', + &> <% &ntable("#cccccc") %>
 
tax eq "Y" ? 'CHECKED' : '' %>> Tax Exempt<% @exempt_groups ? ' (all taxes)' : '' %>
  tax_exemption($exempt_group) ? 'CHECKED' : '' %>> Tax Exempt (<% $exempt_group %> taxes) + tax eq "Y" ? 'CHECKED' : '' %>> Tax Exempt<% @exempt_groups ? ' (all taxes)' : '' %>
   onChange="tax_changed(this)"> Tax Exempt (<% $exempt_group %> taxes) - Exemption number exempt_number : '' ) |h %>" <% $checked ? '' : 'DISABLED' %>>
invoice_noemail eq 'Y' ) + ? '' + : 'CHECKED' + + %>> <% mt('Email invoices') |h %> + +
- <% $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') %> +
<% mt('Prorate day (1-28)') |h %> +
Invoice terms <% mt('Invoice terms') |h %> - <% include('/elements/select-terms.html', + <& /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 %>
spool_cdr eq "Y" ? 'CHECKED' : '' %>> Spool CDRsspool_cdr eq "Y" ? 'CHECKED' : '' %>> <% mt('Spool CDRs') |h %>
squelch_cdr eq "Y" ? 'CHECKED' : '' %>> Omit CDRs from invoicessquelch_cdr eq "Y" ? 'CHECKED' : '' %>> <% mt($conf->exists('voip-cdr_email') ? 'Omit CDRs from printed invoices' : 'Omit CDRs from invoices') |h %>
email_csv_cdr eq "Y" ? 'CHECKED' : '' %>> Attach CDRs as CSV to emailed invoicesemail_csv_cdr eq "Y" ? 'CHECKED' : '' %>> <% mt('Attach CDRs as CSV to emailed invoices') |h %>
+ accountcode_cdr eq "Y" ? 'CHECKED' : '' %> + > <% mt('Breakdown CDRs by accountcode') |h %>
CDR termination settlement<% mt('CDR termination settlement') |h %> % } +%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 + <% $r %><% mt('required fields') |h %> % } + + <%once> my $paystate_label = FS::Msgcat::_gettext('paystate'); @@ -489,4 +692,6 @@ if ( $cust_main->custnum ) { $show_term = $term_sth->fetchrow_arrayref->[0]; } +my $agentnum = $cust_main->agentnum if $cust_main->custnum; +