[freeside-commits] branch FREESIDE_3_BRANCH updated. 43b1f73646063b4614ce8701f7e4755920c7eff2
Ivan
ivan at 420.am
Tue May 6 06:44:24 PDT 2014
The branch, FREESIDE_3_BRANCH has been updated
via 43b1f73646063b4614ce8701f7e4755920c7eff2 (commit)
from 46ea5d28eeb304f0fbdcf78143a5a425de56f653 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 43b1f73646063b4614ce8701f7e4755920c7eff2
Author: Ivan Kohler <ivan at freeside.biz>
Date: Tue May 6 06:44:22 2014 -0700
optimize package list with lots of packages, RT#28526
diff --git a/httemplate/view/cust_main/packages/package.html b/httemplate/view/cust_main/packages/package.html
index ac559bf..078402b 100644
--- a/httemplate/view/cust_main/packages/package.html
+++ b/httemplate/view/cust_main/packages/package.html
@@ -11,7 +11,32 @@
<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();
+%
+% my $custom_comment;
+% if ( FS::part_pkg::flat->can('price_info') eq $part_pkg->can('price_info') ) {
+%
+% $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();
+% }
<% $custom_comment ? ' - ' : '' %>
<% $custom_comment |h %>
</TD>
-----------------------------------------------------------------------
Summary of changes:
httemplate/view/cust_main/packages/package.html | 27 ++++++++++++++++++++++-
1 files changed, 26 insertions(+), 1 deletions(-)
More information about the freeside-commits
mailing list