diff options
author | ivan <ivan> | 2007-04-05 02:04:21 +0000 |
---|---|---|
committer | ivan <ivan> | 2007-04-05 02:04:21 +0000 |
commit | f3c4bc88460be7576d81b9ca234b421950f48c01 (patch) | |
tree | 350d09578975ad8a4be06aec2a2792c0ba38c377 /httemplate | |
parent | 16527189e68b0636f4b39849f45063422ac47ba5 (diff) |
per-customer invoice terms override
Diffstat (limited to 'httemplate')
-rwxr-xr-x | httemplate/edit/cust_main.cgi | 2 | ||||
-rw-r--r-- | httemplate/edit/cust_main/billing.html | 17 | ||||
-rw-r--r-- | httemplate/view/cust_main/billing.html | 24 |
3 files changed, 31 insertions, 12 deletions
diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index a843772d2..2c3123ccb 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -313,6 +313,7 @@ function bottomfixup(what) { var billing_bottomvars = new Array( 'tax', 'invoicing_list', 'invoicing_list_POST', 'invoicing_list_FAX', + 'invoice_terms', 'spool_cdr' ); @@ -392,6 +393,7 @@ function copyelement(from, to) { % % 'tax', % 'invoicing_list', 'invoicing_list_POST', 'invoicing_list_FAX', +% 'invoice_terms', % 'spool_cdr' % ) { % diff --git a/httemplate/edit/cust_main/billing.html b/httemplate/edit/cust_main/billing.html index ba10929ed..65b4400a4 100644 --- a/httemplate/edit/cust_main/billing.html +++ b/httemplate/edit/cust_main/billing.html @@ -408,8 +408,22 @@ <TD ALIGN="right" WIDTH="200">Email invoice </TD> <TD WIDTH="408"><INPUT TYPE="text" NAME="invoicing_list" VALUE="<% join(', ', grep { $_ !~ /^(POST|FAX)$/ } @invoicing_list ) %>"></TD> </TR> -% if ( $conf->exists('voip-cust_cdr_spools') ) { + <TR> + <TD ALIGN="right" WIDTH="200">Invoice terms </TD> + <TD WIDTH="408"> + <SELECT NAME="invoice_terms"> + <OPTION VALUE="">Default (<% $conf->config('invoice_default_terms') || 'Payable upon receipt' %>) +% foreach my $term ( 'Payable upon receipt', +% ( map "Net $_", 0, 10, 15, 30, 45, 60 ), +% ) { + <OPTION VALUE="<% $term %>" <% $cust_main->invoice_terms eq $term ? ' SELECTED' : '' %>><% $term %> +% } + </SELECT> + </TD> + </TR> + +% if ( $conf->exists('voip-cust_cdr_spools') ) { <TR> <TD COLSPAN="2"><INPUT TYPE="checkbox" NAME="spool_cdr" VALUE="Y" <% $cust_main->spool_cdr eq "Y" ? 'CHECKED' : '' %>> Spool CDRs</TD> </TR> @@ -418,7 +432,6 @@ <INPUT TYPE="hidden" NAME="spool_cdr" VALUE="<% $cust_main->spool_cdr %>"> % } - </TABLE> </FORM> diff --git a/httemplate/view/cust_main/billing.html b/httemplate/view/cust_main/billing.html index 1f80dc5bc..b73270c6c 100644 --- a/httemplate/view/cust_main/billing.html +++ b/httemplate/view/cust_main/billing.html @@ -1,11 +1,3 @@ -% -% my( $cust_main ) = @_; -% my @invoicing_list = $cust_main->invoicing_list; -% my $conf = new FS::Conf; -% my $money_char = $conf->config('money_char') || '$'; -% - - Billing information % # If we can't see the unencrypted card, then bill now is an exercise in frustration %if ( ! $cust_main->is_encrypted($cust_main->payinfo) ) { @@ -179,14 +171,26 @@ Billing information <% join(', ', grep { $_ !~ /^(POST|FAX)$/ } @invoicing_list ) || 'no' %> </TD> </TR> -% if ( $conf->exists('voip-cust_cdr_spools') ) { +<TR> + <TD ALIGN="right">Invoice terms</TD> + <TD BGCOLOR="#ffffff"> + <% $cust_main->invoice_terms || 'Default ('. ( $conf->config('invoice_default_terms') || 'Payable upon receipt' ). ')' %> + </TD> +</TR> +% if ( $conf->exists('voip-cust_cdr_spools') ) { <TR> <TD ALIGN="right">Spool CDRs</TD> <TD BGCOLOR="#ffffff"><% $cust_main->spool_cdr ? 'yes' : 'no' %></TD> </TR> % } - </TABLE></TD></TR></TABLE> +<%init> + +my( $cust_main ) = @_; +my @invoicing_list = $cust_main->invoicing_list; +my $conf = new FS::Conf; +my $money_char = $conf->config('money_char') || '$'; +</%init> |