X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fbilling.html;h=8d3925a08220df59199bc2e645979de014df13c8;hp=a16e8a5643842caf7762275d5105a96d4d2cd1b5;hb=fbfd9445bb00c2a1c7f4386878edead9b50c482f;hpb=1cde870268b03197da75f089669d60a7ba3c5617 diff --git a/httemplate/view/cust_main/billing.html b/httemplate/view/cust_main/billing.html index a16e8a564..8d3925a08 100644 --- a/httemplate/view/cust_main/billing.html +++ b/httemplate/view/cust_main/billing.html @@ -1,6 +1,8 @@ <% mt('Billing information') |h %> % my $yes = emt('yes'); % my $no = emt('no'); +% my $allowed = emt('allowed'); +% my $refused = emt('refused'); @@ -19,10 +21,69 @@ + + + + + +<& '/elements/xmlhttp.html', + 'url' => $fsurl.'misc/xmlhttp-cust_main-display_recurring.html', + 'subs' => [ 'get_display_recurring'] &> + + + +% # 10 is an arbitrary number, use ajax for customers with many packages +% if ( $cust_main->num_billing_pkgs > 10 ) { +<& '/elements/xmlhttp.html', + 'url' => $fsurl.'misc/xmlhttp-cust_main-display_recurring.html', + 'subs' => [ 'get_display_recurring'] &> + +% } else { + +% } + % if ( $conf->exists('cust_main-select-prorate_day') ) { % } @@ -71,7 +132,7 @@ % } -% if ( $conf->exists('enable_taxproducts') ) { +% if ( $conf->config('tax_data_vendor') eq 'cch' ) { % my $tax_location = $conf->exists('tax-ship_address') @@ -82,34 +143,36 @@ % } - +% } elsif ( $cust_main->invoice_noemail +% or scalar(@invoicing_list) == 0 ) { +% # alert the user that this customer has no way to receive an invoice + +% } else { + +% } - +% if ( $cust_main->invoice_noemail and ! $cust_main->postal_invoice ) { +% # as above, warn if the customer refuses both email and postal invoices + +% } else { + +% } -% unless ( $conf->exists('cust-email-high-visibility')) { - + -% } % } -% if ( $conf->exists('voip-cust_email_csv_cdr') ) { +% if ( my $attach = $conf->config('voip-cdr_email_attach') ) { - + % } @@ -192,7 +255,7 @@ <%init> my( $cust_main ) = @_; -my @invoicing_list = $cust_main->invoicing_list; +my @invoicing_list = $cust_main->invoicing_list_emailonly; my $conf = new FS::Conf; my $money_char = $conf->config('money_char') || '$';
<% $balance %>
<% emt( 'Recurring' ) %>
<% mt('Prorate day of month') |h %> <% $cust_main->prorate_day %> + <% $cust_main->force_prorate_day && (''.emt('(applies to all packages)').'') %>
<% mt('Tax location') |h %>
<% mt('Postal mail invoices') |h %> - <% ( grep { $_ eq 'POST' } @invoicing_list ) - ? $yes. ( $cust_main->invoice_attn +% if ( $cust_main->postal_invoice ) { + <% $yes . ( $cust_main->invoice_attn ? ', attn: '. $cust_main->invoice_attn : '' - ) - : $no - %> + ) %> + <% $no %><% $no %>
<% mt('Email invoices') |h %> - <% $cust_main->invoice_noemail ? $no : $yes %> - <% $refused %><% $cust_main->invoice_noemail ? $refused : $allowed %>
<% mt('Email address(es)') |h %><% mt('Other email notices') |h %> - <% join(', ', grep { $_ !~ /^(POST|FAX)$/ } @invoicing_list ) || $no %> -% if ( $cust_main->message_noemail ) { -
- <% emt('(do not send notices)') %> -% } + <% $cust_main->message_noemail ? $refused : $allowed %>
<% mt('Invoice terms') |h %> @@ -158,9 +221,9 @@
<% mt('Email CDRs as CSV') |h %><% mt('Email CDRs as '.uc($attach)) |h %> <% $cust_main->email_csv_cdr ? $yes : $no %>