X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_main%2Fbilling.html;h=fa7abd2c04ebed7dd3f7d69a67f6e66f72e0b8d2;hb=381992561d7b1a88e05d49d3e474a2fad25873c7;hp=6f716c1bef944bec0ff5d446dde769d8ee1a02a9;hpb=d928d26f1d623720d2f0c854a9d0b38210d66d2d;p=freeside.git diff --git a/httemplate/edit/cust_main/billing.html b/httemplate/edit/cust_main/billing.html index 6f716c1be..fa7abd2c0 100644 --- a/httemplate/edit/cust_main/billing.html +++ b/httemplate/edit/cust_main/billing.html @@ -25,9 +25,13 @@ % if ( $curuser->access_right('Complimentary customer') ) { - - complimentary eq "Y" ? 'CHECKED' : '' %>>Complimentary customer - + <& /elements/tr-checkbox.html, + field => 'complimentary', + label => emt('Complimentary customer'), + value => 'Y', + curr_value => $cust_main->complimentary, + box_first => 1, + &> % } else { @@ -51,9 +55,13 @@ % } else { - - tax eq "Y" ? 'CHECKED' : '' %>> Tax Exempt<% @exempt_groups ? ' (all taxes)' : '' %> - + <& /elements/tr-checkbox.html, + field => 'tax', + label => emt('Tax Exempt' . (scalar(@exempt_groups) ? '(all taxes)' : '') ), + value => 'Y', + curr_value => $cust_main->tax, + box_first => 1, + &> % } @@ -66,7 +74,7 @@    onChange="tax_changed(this)"> Tax Exempt (<% $exempt_group %> taxes) - Exemption number exempt_number : '' ) |h %>" <% $checked ? '' : 'DISABLED' %>> -% } +% } #" % } % ### @@ -75,18 +83,13 @@ % unless ( $conf->exists('emailinvoiceonly') ) { - - > <% mt('Postal mail invoices') |h %> - - - + <& /elements/tr-checkbox.html, + field => 'postal_invoice', + label => emt('Postal mail invoices'), + value => 'Y', + curr_value => $cust_main->postal_invoice, + box_first => 1, + &> % } @@ -94,33 +97,21 @@ % # email invoices % ### - - invoice_noemail eq 'Y' ) - ? '' - : 'CHECKED' - - %>> <% mt('Email invoices') |h %> - - - + <& /elements/tr-checkbox.html, + field => 'invoice_noemail', + label => emt('Do not send email invoices'), + value => 'Y', + curr_value => $cust_main->invoice_noemail, + box_first => 1, + &> -% unless ( $conf->exists('cust-email-high-visibility')) { - - - <% $conf->exists('cust_main-require_invoicing_list_email', $agentnum) - ? $r : '' %>Email address(es) - - - message_noemail eq 'Y' ) - ? 'CHECKED' - : '' - %>> <% emt('Do not send notices') %> - - -% } + <& /elements/tr-checkbox.html, + field => 'message_noemail', + label => emt('Do not send other email notices'), + value => 'Y', + curr_value => $cust_main->message_noemail, + box_first => 1, + &> % ### % # prorate_day @@ -133,6 +124,12 @@ + <& /elements/checkbox.html, + field => 'force_prorate_day', + value => 'Y', + curr_value => $cust_main->force_prorate_day + &> + @@ -182,10 +179,27 @@ <% mt('Invoice terms') |h %> - <& /elements/select-terms.html, - 'curr_value' => $cust_main->invoice_terms, - 'agentnum' => $cust_main->agentnum, - &> +% if ( $curuser->access_right('Edit customer invoice terms') ) { + <& /elements/select-terms.html, + 'curr_value' => $cust_main->invoice_terms, + 'agentnum' => $cust_main->agentnum, + &> +% } else { +% +% my $terms = +% $cust_main->invoice_terms +% || emt('Default').' ('. +% ( $conf->config('invoice_default_terms', $cust_main->agentnum) +% || emt('Payable upon receipt') +% ). +% ')'; + <% $terms |h %> + + <& /elements/hidden.html, + 'field' => 'invoice_terms', + 'curr_value' => $cust_main->invoice_terms, + &> +% } @@ -227,14 +241,6 @@ function toggle(obj) { % # CDR flags / options % ### -% if ( $conf->exists('voip-cust_cdr_spools') ) { - - spool_cdr eq "Y" ? 'CHECKED' : '' %>> <% mt('Spool CDRs') |h %> - -% } else { - -% } - % if ( $conf->exists('voip-cust_cdr_squelch') ) { squelch_cdr eq "Y" ? 'CHECKED' : '' %>> <% mt($conf->exists('voip-cdr_email') ? 'Omit CDRs from printed invoices' : 'Omit CDRs from invoices') |h %> @@ -243,9 +249,9 @@ function toggle(obj) { % } -% if ( $conf->exists('voip-cust_email_csv_cdr') ) { +% if ( my $attach = $conf->config('voip-cdr_email_attach') ) { - email_csv_cdr eq "Y" ? 'CHECKED' : '' %>> <% mt('Attach CDRs as CSV to emailed invoices') |h %> + email_csv_cdr eq "Y" ? 'CHECKED' : '' %>> <% mt('Attach CDRs as '. uc($attach). ' to emailed invoices') |h %> % } else { @@ -335,7 +341,6 @@ function toggle(obj) { my( $cust_main, %options ) = @_; my @invoicing_list = @{ $options{'invoicing_list'} }; -my $payinfo = $options{'payinfo'}; my $conf = new FS::Conf; my $money_char = $conf->config('money_char') || '$';