diff options
| author | jeff <jeff> | 2010-09-22 19:16:20 +0000 | 
|---|---|---|
| committer | jeff <jeff> | 2010-09-22 19:16:20 +0000 | 
| commit | 5250c44bd7f282c7d782bf0e8349af12376929df (patch) | |
| tree | b2afcd8e47270c6f5b78cff378849168d17ed765 /httemplate/browse/part_pkg.cgi | |
| parent | 60ee9af0e885def0dd61f4a5506ac0e55d779e89 (diff) | |
prepayment discounts rt#5318
Diffstat (limited to 'httemplate/browse/part_pkg.cgi')
| -rwxr-xr-x | httemplate/browse/part_pkg.cgi | 25 | 
1 files changed, 25 insertions, 0 deletions
| 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 => '<b>Discounts</b>', +                align=>'center', #? +                colspan=>2, +              } +            ] +        : ()   +    ), +    ( scalar(@discounts) +        ? map {  +            [  +              { data  => $_->months. ':', +                align => 'right', +              }, +              { data => $_->amount ? '$'. $_->amount : $_->percent. '%' +              } +            ] +          } +          @discounts +        : () +    ),    ];  #  $plan_labels{$part_pkg->plan}.'<BR>'. | 
