X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fbrowse%2Fpart_pkg.cgi;h=48b0ab2b3c80a6ed6f1e76d4d4005586c03ecb5a;hp=be67338e19d4058a6e2c1967e1f202e29d411688;hb=6fe8172b11d0369d0b1274d6825ec0c57afe8001;hpb=f55e1a91f7b9b0238791cdbf873f91a8c5a584a7 diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index be67338e1..48b0ab2b3 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -89,60 +89,59 @@ my $taxclasses = $conf->exists('enable_taxclasses'); <% foreach my $part_pkg ( sort $sortby @part_pkg ) { - my($hashref)=$part_pkg->hashref; my(@pkg_svc)=grep $_->getfield('quantity'), - qsearch('pkg_svc',{'pkgpart'=> $hashref->{pkgpart} }); + qsearch( 'pkg_svc', { 'pkgpart' => $part_pkg->pkgpart } ); my($rowspan)=scalar(@pkg_svc); my $plandata; - if ( $hashref->{plan} ) { - $plandata = $hashref->{plandata}; + if ( $part_pkg->plan ) { + $plandata = $part_pkg->plandata; $plandata =~ s/^(\w+)=/$1 /mg; $plandata =~ s/\n/
/g; } else { - $hashref->{plan} = "(legacy)"; - $plandata = "Setup ". $hashref->{setup}. - "
Recur ". $hashref->{recur}; + $part_pkg->plan('(legacy)'); + $plandata = "Setup ". $part_pkg->setup. + "
Recur ". $part_pkg->recur; } %> - ><%= $hashref->{pkgpart} %> + ><%= $part_pkg->pkgpart %> <% unless ( $cgi->param('showdisabled') ) { %> > - <% if ( $hashref->{disabled} ) { %> + <% if ( $part_pkg->disabled ) { %> DISABLED <% } %> <% } %> - ><%= $hashref->{pkg} %> - ><%= $hashref->{comment} %> + ><%= $part_pkg->pkg %> + ><%= $part_pkg->comment %> <% if ( $cgi->param('active') ) { %> > - <%= $num_active_cust_pkg{$hashref->{'pkgpart'}} %> active
+ <%= $num_active_cust_pkg{$part_pkg->pkgpart} %> active
<% $suspended_sth->execute( $part_pkg->pkgpart ) or die $suspended_sth->errstr; my $num_suspended = $suspended_sth->fetchrow_arrayref->[0]; %> - <%= $num_suspended %> suspended
+ <%= $num_suspended %> suspended
<% $canceled_sth->execute( $part_pkg->pkgpart ) or die $canceled_sth->errstr; my $num_canceled = $canceled_sth->fetchrow_arrayref->[0]; %> - <%= $num_canceled %> canceled + <%= $num_canceled %> canceled <% } %> - ><%= $hashref->{freq} %> + ><%= $part_pkg->freq_pretty %> <% if ( $taxclasses ) { %> - ><%= $hashref->{taxclass} || ' ' %> + ><%= $part_pkg->taxclass || ' ' %> <% } %> - ><%= $hashref->{plan} %> + ><%= $part_pkg->plan %> ><%= $plandata %> <%