From 5250c44bd7f282c7d782bf0e8349af12376929df Mon Sep 17 00:00:00 2001 From: jeff Date: Wed, 22 Sep 2010 19:16:20 +0000 Subject: prepayment discounts rt#5318 --- httemplate/browse/part_pkg.cgi | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'httemplate/browse/part_pkg.cgi') diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index 42eb5dfcb..3c3016ba2 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -195,6 +195,9 @@ push @fields, sub { my $part_pkg = shift; (my $plan = $plan_labels{$part_pkg->plan} ) =~ s/ / /g; my $is_recur = ( $part_pkg->freq ne '0' ); + my @discounts = sort { $a->months <=> $b->months } + map { $_->discount } + $part_pkg->part_pkg_discount; [ [ @@ -238,6 +241,28 @@ push @fields, sub { } $part_pkg->bill_part_pkg_link ), + ( scalar(@discounts) + ? [ + { data => 'Discounts', + align=>'center', #? + colspan=>2, + } + ] + : () + ), + ( scalar(@discounts) + ? map { + [ + { data => $_->months. ':', + align => 'right', + }, + { data => $_->amount ? '$'. $_->amount : $_->percent. '%' + } + ] + } + @discounts + : () + ), ]; # $plan_labels{$part_pkg->plan}.'
'. -- cgit v1.2.1