From 0186436eb38e70da0a015e49dab67cec5f1a3467 Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 21 Sep 2005 12:49:51 +0000 Subject: add prepaid support which sets RADIUS Expiration attribute, update customer view package UI --- httemplate/edit/REAL_cust_pkg.cgi | 162 ++++++++++++++++++++++++-------------- 1 file changed, 101 insertions(+), 61 deletions(-) (limited to 'httemplate/edit/REAL_cust_pkg.cgi') diff --git a/httemplate/edit/REAL_cust_pkg.cgi b/httemplate/edit/REAL_cust_pkg.cgi index 2f6be7cad..78dd0fafa 100755 --- a/httemplate/edit/REAL_cust_pkg.cgi +++ b/httemplate/edit/REAL_cust_pkg.cgi @@ -1,6 +1,4 @@ - <% -# my $error =''; my $pkgnum = ''; @@ -33,17 +31,20 @@ if ( $error ) { } #my $custnum = $cust_pkg->getfield('custnum'); -print header('Package Edit'); #, menubar( +%> + +<%= header('Customer package - Edit dates') %> +<% +#, menubar( # "View this customer (#$custnum)" => popurl(2). "view/cust_main.cgi?$custnum", # 'Main Menu' => popurl(2) #)); - %> - - - - + + + + <% @@ -57,67 +58,106 @@ my($pkg,$comment)=($part_pkg->getfield('pkg'),$part_pkg->getfield('comment')); my($setup,$bill)=($cust_pkg->getfield('setup'),$cust_pkg->getfield('bill')); my $otaker = $cust_pkg->getfield('otaker'); -print '
', qq!!; +%> + + + + +<% if ( $error ) { %> + Error: <%= $error %> +<% } %> -print qq!Error: $error! - if $error; +<% #my $format = "%c %z (%Z)"; my $format = "%m/%d/%Y %T %z (%Z)"; -print ntable("#cccccc",2), - 'Package number', - $pkgnum, '', - 'Package', - $pkg, '', - 'Comment', - $comment, '', - 'Order taker', - $otaker, '', - 'Setup date'. - ''. - ' '. - ''; - -print 'Last bill date', - ''. - ' '. - '' - if $cust_pkg->dbdef_table->column('last_bill'); - -print 'Next bill date', - ''. - ' '. - ''; - -print 'Suspension date', - time2str($format, $susp), '' - if $susp; - -#print 'Expiration date', -# time2str("%D",$expire), '' -# if $expire; -print 'Expiration date'. - '', - ''. - ' '. - '
(will cancel this package'. - ' when the date is reached)'. - ''; - -print 'Cancellation date', - time2str($format, $cancel), '' - if $cancel; +#false laziness w/view/cust_main/packages.html +#my( $billed_or_prepaid, +my( $last_bill_or_renewed, $next_bill_or_prepaid_until ); +unless ( $part_pkg->is_prepaid ) { + #$billed_or_prepaid = 'billed'; + $last_bill_or_renewed = 'Last bill'; + $next_bill_or_prepaid_until = 'Next bill'; +} else { + #$billed_or_prepaid = 'prepaid'; + $last_bill_or_renewed = 'Renewed'; + $next_bill_or_prepaid_until = 'Prepaid until'; +} %> + +<%= ntable("#cccccc",2) %> + + + Package number + <%= $pkgnum %> + + + + Package + <%= $pkg %> + + + + Comment + <%= $comment %> + + + + Order taker + <%= $otaker %> + + + + Setup date + + "> + + + + + + <%= $last_bill_or_renewed %> date + + "> + + + + + + <%= $next_bill_or_prepaid_until %> date + + "> + + + + + <% if ( $susp ) { %> + + Suspension date + <%= time2str($format, $susp) %> + + <% } %> + + + Expiration date + + "> + +
(will cancel this package when the date is reached) + + + + <% if ( $cancel ) { %> + + Cancellation date + <%= time2str($format, $cancel) %> + + <% } %> + +