summaryrefslogtreecommitdiff
path: root/httemplate/view
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2014-05-06 06:44:16 -0700
committerIvan Kohler <ivan@freeside.biz>2014-05-06 06:44:16 -0700
commit4bedcbc1559746f5aa2d2bbb9b26d6519ae47829 (patch)
treecd446af6d5aba8d673838d7d57bd3042e383c301 /httemplate/view
parent719acce16404ce63773159842f75cce230f34486 (diff)
optimize package list with lots of packages, RT#28526
Diffstat (limited to 'httemplate/view')
-rw-r--r--httemplate/view/cust_main/packages/package.html28
1 files changed, 27 insertions, 1 deletions
diff --git a/httemplate/view/cust_main/packages/package.html b/httemplate/view/cust_main/packages/package.html
index 6a0c7f7df..d83bab4b4 100644
--- a/httemplate/view/cust_main/packages/package.html
+++ b/httemplate/view/cust_main/packages/package.html
@@ -11,7 +11,33 @@
<A NAME="cust_pkg<% $cust_pkg->pkgnum %>"
ID ="cust_pkg<% $cust_pkg->pkgnum %>"
><% $opt{show_pkgnum} ? $cust_pkg->pkgnum.': ' : '' %><B><% $part_pkg->pkg |h %></B></A>
-% my $custom_comment = $part_pkg->custom_comment('cust_pkg'=>$cust_pkg);
+%
+% my $custom_comment;
+% if ( 0 && FS::part_pkg::flat->can('price_info') eq $part_pkg->can('price_info') ) {
+% #perf hack / disabled in 4.x (feature pricing / cust_pkg_usageprice incompatible, well, harder)
+%
+% $part_pkg->{"_$_"} = $part_pkg->option($_) || 0
+% foreach grep !defined($part_pkg->{"_$_"} ), qw(setup_fee recur_fee);
+%
+% my $str = '';
+% $str = $opt{money_char} . $part_pkg->{_setup_fee}.
+% ($part_pkg->{_recur_fee} ? ' setup' : ' one-time')
+% if $part_pkg->{_setup_fee};
+% $str .= ', ' if $part_pkg->{_setup_fee} && $part_pkg->{_recur_fee};
+% $str .= $opt{money_char}. $part_pkg->{_recur_fee}.
+% '/'. $part_pkg->freq_pretty
+% if $part_pkg->{_recur_fee};
+% $str;
+%
+% $custom_comment =
+% ( $part_pkg->custom ? '(CUSTOM) ' : '' ).
+% $part_pkg->comment.
+% ( ($part_pkg->custom || $part_pkg->comment) ? ' - ' : '' ).
+% ($str || 'No charge');
+%
+% } else {
+% $custom_comment = $part_pkg->custom_comment('cust_pkg'=>$cust_pkg);
+% }
<% $custom_comment ? ' - ' : '' %>
<% $custom_comment |h %>
</TD>