X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_main%2Fbilling.html;h=0194d31a624b5459a4e157c9d3f0860490ac8651;hb=5e8073ffe5707504751b8df36f645b325a895f87;hp=8a90204ddd49cd3703a01051724256dd259a90ed;hpb=a0dd6f2c04a3f22aa741d1d639f8985a81c6e81b;p=freeside.git
diff --git a/httemplate/edit/cust_main/billing.html b/httemplate/edit/cust_main/billing.html
index 8a90204dd..0194d31a6 100644
--- a/httemplate/edit/cust_main/billing.html
+++ b/httemplate/edit/cust_main/billing.html
@@ -6,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 )) {
@@ -34,7 +34,7 @@
%
% my $r = qq!* !;
-
<% mt('Billing information') |h %>
+
<% mt('Billing information') |h %>
<% &ntable("#cccccc") %>
@@ -103,9 +103,9 @@
}
function payauto_changed(payauto_field){
- var span = (payauto_field.name == 'CARD_payauto') ? 'card_billday' : 'chek_billday';
- var select = document.getElementById('select_'+span);
- span = document.getElementById(span);
+ var select = (payauto_field.name == 'CARD_payauto') ? 'CARD_billday' : 'CHEK_billday';
+ var span = document.getElementById('td_'+select);
+ select = document.getElementById(select);
if (span == null || select == null) return;
if(payauto_field.checked) {
span.style.color = '#000000';
@@ -114,7 +114,7 @@
else {
span.style.color = '#999999';
select.disabled = true;
- select.selectedIndex = 0;
+ //why? select.selectedIndex = 0;
}
}
@@ -126,7 +126,8 @@
% my $paytype = $cust_main->paytype;
% my( $account, $aba ) = split('@', $payinfo);
% my $branch = '';
-% ($branch,$aba) = split('\.',$aba) if $conf->exists('cust_main-require-bank-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"';
@@ -160,6 +161,14 @@
% 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' =>
@@ -215,9 +224,9 @@
% emt('Charge future payments to this [_1] automatically','credit card').'
'.
%
% ( $conf->exists('cust_main-select-billday') ?
-% qq!
+% qq! |
% Charge on this day of each month |
-% |
!
% : ''
% ).
@@ -234,17 +243,17 @@
% join('', map { qq!" } @FS::cust_main::paytypes).
% qq!!.
%
-% qq!${r}!.emt('ABA/Routing number').qq! | !.
-% qq! !.
+% qq! |
${r}!.emt($routing_label).qq! | !.
+% qq! !.
% qq!(!.emt('help').qq!)!.
% qq! |
!.
%
% qq!!.
% qq!!.
%
-% ( $conf->exists('cust_main-require-bank-branch') ?
-% qq!$r Branch number |
-% |
! : '' ).
+% ( $conf->config('echeck-country') eq 'CA' ?
+% qq!$r !.emt('Branch number').qq! |
+% |
! : '' ).
%
% qq!${r}!.emt('Bank name').qq! | !.
% qq! |
!.
@@ -267,9 +276,9 @@
% emt('Charge future payments to this [_1] automatically','electronic check').''.
%
% ( $conf->exists('cust_main-select-billday') ?
-% qq!
+% qq! |
% Charge on this day of each month |
-% !
+% !
% . billday_options($cust_main->billday) . qq! |
!
% : ''
% ).
@@ -428,9 +437,17 @@
% my @exempt_groups = grep /\S/, $conf->config('tax-cust_exempt-groups');
-
- tax eq "Y" ? 'CHECKED' : '' %>> Tax Exempt<% @exempt_groups ? ' (all taxes)' : '' %> |
-
+% if ( $conf->exists('cust_class-tax_exempt') ) {
+
+
+
+% } else {
+
+
+ tax eq "Y" ? 'CHECKED' : '' %>> Tax Exempt<% @exempt_groups ? ' (all taxes)' : '' %> |
+
+
+% }
% foreach my $exempt_group ( @exempt_groups ) {
% #escape $exempt_group for NAME
@@ -471,7 +488,8 @@
% 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)
|
|
@@ -509,7 +527,7 @@ function toggle(obj) {
% if ( $conf->exists('voip-cust_cdr_squelch') ) {
- squelch_cdr eq "Y" ? 'CHECKED' : '' %>> <% mt('Omit CDRs from printed invoices') |h %> |
+ squelch_cdr eq "Y" ? 'CHECKED' : '' %>> <% mt($conf->exists('voip-cdr_email') ? 'Omit CDRs from printed invoices' : 'Omit CDRs from invoices') |h %> |
% } else {
@@ -550,9 +568,32 @@ function toggle(obj) {
% }
+%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 %> <% mt('required fields') |h %>
+ <% $r %><% mt('required fields') |h %>
% }