X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_main%2Fbilling.html;h=649c4c9453f9edacf028b0bf6ef9d51c2b7af300;hp=c3e89226b762a2f9480c13e50ef1812506d9b41a;hb=6eec422e339e7a7209cac18da71ba598ee18d7d2;hpb=5b507bd1cb845ef44a49f84d4f0ae20ec80118d5
diff --git a/httemplate/edit/cust_main/billing.html b/httemplate/edit/cust_main/billing.html
index c3e89226b..649c4c945 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
@@ -128,11 +119,31 @@
% if ( $conf->exists('cust_main-select-prorate_day') ) {
- <% mt('Prorate day (1-28)') |h %>
+ | <% mt('Prorate day') |h %>
|
-
+
+ <& /elements/checkbox.html,
+ field => 'force_prorate_day',
+ value => 'Y',
+ curr_value => $cust_main->force_prorate_day
+ &>
+
|
+
+% sub prorate_day_options {
+% my $curr_value = shift;
+% my $ret = '';
+% for my $prorate_day ( 1 .. 28 ) {
+% my $sel = '';
+% $sel = "SELECTED='SELECTED'" if $curr_value == $prorate_day;
+% $ret .= "";
+% }
+% $ret;
+% }
+
% } else {
% }
@@ -229,9 +240,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 {
@@ -321,7 +332,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') || '$';