[freeside-commits] branch FREESIDE_3_BRANCH updated. fd438df9710dce77225b9560a887142f123b78ab
Ivan
ivan at 420.am
Sat Aug 9 16:00:34 PDT 2014
The branch, FREESIDE_3_BRANCH has been updated
via fd438df9710dce77225b9560a887142f123b78ab (commit)
from 28b22a121c414477c546a587ccb4b58541a4c973 (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 fd438df9710dce77225b9560a887142f123b78ab
Author: Ivan Kohler <ivan at freeside.biz>
Date: Sat Aug 9 16:00:33 2014 -0700
show costs in package list, RT#28856
diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi
index b84e066..fdda4d5 100755
--- a/httemplate/browse/part_pkg.cgi
+++ b/httemplate/browse/part_pkg.cgi
@@ -10,7 +10,7 @@
'agent_virt' => 1,
'agent_null_right' => [ $edit, $edit_global ],
'agent_null_right_link' => $edit_global,
- 'agent_pos' => 6,
+ 'agent_pos' => 7, #5?
'query' => { 'select' => $select,
'table' => 'part_pkg',
'hashref' => \%hash,
@@ -340,6 +340,51 @@ push @fields, sub {
# $part_pkg->freq_pretty; #.'<BR>'
};
+push @header, 'Cost tracking';
+$align .= 'r'; #?
+push @fields, sub {
+ my $part_pkg = shift;
+ #(my $plan = $plan_labels{$part_pkg->plan} ) =~ s/ / /g;
+ my $is_recur = ( $part_pkg->freq ne '0' );
+
+ [
+ [
+ { data => ' ', # $plan,
+ align=>'center',
+ colspan=>2,
+ },
+ ],
+ [
+ { data =>$money_char.
+ sprintf('%.2f ', $part_pkg->setup_cost ),
+ align=>'right'
+ },
+ { data => ( $is_recur ? ' setup' : ' one-time' ),
+ align=>'left',
+ },
+ ],
+ [
+ { data=>(
+ $is_recur
+ ? $money_char. sprintf('%.2f', $part_pkg->recur_cost)
+ : '(no recurring)' #$part_pkg->freq_pretty
+ ),
+ align=> ( $is_recur ? 'right' : 'center' ),
+ colspan=> ( $is_recur ? 1 : 2 ),
+ },
+ ( $is_recur
+ ? { data => ( $is_recur
+ ? ' '. $part_pkg->freq_pretty
+ : ''
+ ),
+ align=>'left',
+ }
+ : ()
+ ),
+ ],
+ ];
+};
+
###
# Agent goes here if displayed
###
-----------------------------------------------------------------------
Summary of changes:
httemplate/browse/part_pkg.cgi | 47 +++++++++++++++++++++++++++++++++++++++-
1 file changed, 46 insertions(+), 1 deletion(-)
More information about the freeside-commits
mailing list