[freeside-commits] freeside/FS/FS/part_pkg base_rate.pm, 1.5, 1.6 bulk.pm, 1.12, 1.13 flat.pm, 1.57, 1.58 flat_comission.pm, 1.9, 1.10 rt_time.pm, 1.4, 1.5 sesmon_hour.pm, 1.11, 1.12 sesmon_minute.pm, 1.12, 1.13 sql_external.pm, 1.13, 1.14 sql_generic.pm, 1.10, 1.11 sqlradacct_hour.pm, 1.11, 1.12 voip_cdr.pm, 1.113, 1.114 voip_inbound.pm, 1.5, 1.6 voip_sqlradacct.pm, 1.23, 1.24

Erik Levinson levinse at wavetail.420.am
Fri Feb 11 20:56:59 PST 2011


Update of /home/cvs/cvsroot/freeside/FS/FS/part_pkg
In directory wavetail.420.am:/tmp/cvs-serv21466/FS/FS/part_pkg

Modified Files:
	base_rate.pm bulk.pm flat.pm flat_comission.pm rt_time.pm 
	sesmon_hour.pm sesmon_minute.pm sql_external.pm sql_generic.pm 
	sqlradacct_hour.pm voip_cdr.pm voip_inbound.pm 
	voip_sqlradacct.pm 
Log Message:
show package pricing details on customer view, RT11372

Index: base_rate.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/base_rate.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -w -d -r1.5 -r1.6
--- base_rate.pm	24 Dec 2010 09:49:31 -0000	1.5
+++ base_rate.pm	12 Feb 2011 04:56:56 -0000	1.6
@@ -22,6 +22,20 @@
   'weight' => 52,
 );
 
+sub price_info {
+    my $self = shift;
+    my $conf = new FS::Conf;
+    my $money_char = $conf->config('money_char') || '$';
+    my $setup = $self->option('setup_fee') || 0;
+    my $recur = $self->option('recur_fee', 1) || 0;
+    my $str = '';
+    $str = $money_char . $setup . ' one-time' if $setup;
+    $str .= ', ' if ($setup && $recur);
+    $str .= $money_char . $recur . ' recurring per unit ' if $recur;
+    $str;
+}
+
+
 sub calc_setup {
   my($self, $cust_pkg, $sdate, $details ) = @_;
 

Index: rt_time.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/rt_time.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -w -d -r1.4 -r1.5
--- rt_time.pm	24 Dec 2010 09:49:32 -0000	1.4
+++ rt_time.pm	12 Feb 2011 04:56:57 -0000	1.5
@@ -24,6 +24,14 @@
   'fieldorder' => [ 'base_rate' ],
 );
 
+sub price_info {
+    my $self = shift;
+    my $str = $self->SUPER::price_info;
+    my $rate = $self->option('base_rate');
+    $str .= " plus $rate/min" if $rate;
+    $str;
+}
+
 sub calc_setup {
   my($self, $cust_pkg ) = @_;
   $self->option('setup_fee');

Index: sesmon_hour.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/sesmon_hour.pm,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -w -d -r1.11 -r1.12
--- sesmon_hour.pm	16 Jan 2011 20:20:23 -0000	1.11
+++ sesmon_hour.pm	12 Feb 2011 04:56:57 -0000	1.12
@@ -26,6 +26,13 @@
   'weight' => 80,
 );
 
+sub price_info {
+    my $self = shift;
+    my $str = $self->SUPER::price_info;
+    $str .= " plus usage" if $str;
+    $str;
+}
+
 sub calc_recur {
   my($self, $cust_pkg ) = @_;
 

Index: flat_comission.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/flat_comission.pm,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -w -d -r1.9 -r1.10
--- flat_comission.pm	24 Dec 2010 09:49:32 -0000	1.9
+++ flat_comission.pm	12 Feb 2011 04:56:57 -0000	1.10
@@ -32,6 +32,14 @@
   'weight' => 62,
 );
 
+sub price_info {
+    my $self = shift;
+    my $str = $self->SUPER::price_info;
+    my $com = $self->option('comission_amount');
+    $str .= ", $com commission" if $com;
+    $str;
+}
+
 sub calc_recur {
   my($self, $cust_pkg ) = @_;
 

Index: sql_external.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/sql_external.pm,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -w -d -r1.13 -r1.14
--- sql_external.pm	18 Jan 2011 05:21:08 -0000	1.13
+++ sql_external.pm	12 Feb 2011 04:56:57 -0000	1.14
@@ -45,6 +45,13 @@
   'weight' => '58',
 );
 
+sub price_info {
+    my $self = shift;
+    my $str = $self->SUPER::price_info;
+    $str .= " plus per-service charges" if $str;
+    $str;
+}
+
 sub calc_recur {
   my $self = shift;
   my($cust_pkg, $sdate, $details, $param ) = @_;

Index: sqlradacct_hour.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/sqlradacct_hour.pm,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -w -d -r1.11 -r1.12
--- sqlradacct_hour.pm	24 Dec 2010 09:49:32 -0000	1.11
+++ sqlradacct_hour.pm	12 Feb 2011 04:56:57 -0000	1.12
@@ -73,6 +73,13 @@
   'weight' => 40,
 );
 
+sub price_info {
+    my $self = shift;
+    my $str = $self->SUPER::price_info;
+    $str .= " plus usage" if $str;
+    $str;
+}
+
 sub calc_recur {
   my($self, $cust_pkg, $sdate, $details ) = @_;
 

Index: voip_sqlradacct.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/voip_sqlradacct.pm,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -w -d -r1.23 -r1.24
--- voip_sqlradacct.pm	24 Dec 2010 09:49:32 -0000	1.23
+++ voip_sqlradacct.pm	12 Feb 2011 04:56:57 -0000	1.24
@@ -29,6 +29,13 @@
   'weight' => 40,
 );
 
+sub price_info {
+    my $self = shift;
+    my $str = $self->SUPER::price_info;
+    $str .= " plus usage" if $str;
+    $str;
+}
+
 sub calc_setup {
   my($self, $cust_pkg ) = @_;
   $self->option('setup_fee');

Index: voip_cdr.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/voip_cdr.pm,v
retrieving revision 1.113
retrieving revision 1.114
diff -u -w -d -r1.113 -r1.114
--- voip_cdr.pm	12 Feb 2011 00:21:58 -0000	1.113
+++ voip_cdr.pm	12 Feb 2011 04:56:57 -0000	1.114
@@ -278,6 +278,13 @@
   'weight' => 40,
 );
 
+sub price_info {
+    my $self = shift;
+    my $str = $self->SUPER::price_info;
+    $str .= " plus usage" if $str;
+    $str;
+}
+
 sub calc_setup {
   my($self, $cust_pkg ) = @_;
   $self->option('setup_fee');

Index: flat.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/flat.pm,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -w -d -r1.57 -r1.58
--- flat.pm	19 Jan 2011 00:41:00 -0000	1.57
+++ flat.pm	12 Feb 2011 04:56:57 -0000	1.58
@@ -82,6 +82,19 @@
   'weight' => 10,
 );
 
+sub price_info {
+    my $self = shift;
+    my $conf = new FS::Conf;
+    my $money_char = $conf->config('money_char') || '$';
+    my $setup = $self->option('setup_fee') || 0;
+    my $recur = $self->option('recur_fee', 1) || 0;
+    my $str = '';
+    $str = $money_char . $setup . ' one-time' if $setup;
+    $str .= ', ' if ($setup && $recur);
+    $str .= $money_char . $recur . ' recurring ' if $recur;
+    $str;
+}
+
 sub calc_setup {
   my($self, $cust_pkg, $sdate, $details ) = @_;
 

Index: voip_inbound.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/voip_inbound.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -w -d -r1.5 -r1.6
--- voip_inbound.pm	24 Dec 2010 09:49:32 -0000	1.5
+++ voip_inbound.pm	12 Feb 2011 04:56:57 -0000	1.6
@@ -160,6 +160,13 @@
   'weight' => 40,
 );
 
+sub price_info {
+    my $self = shift;
+    my $str = $self->SUPER::price_info;
+    $str .= " plus usage" if $str;
+    $str;
+}
+
 sub calc_setup {
   my($self, $cust_pkg ) = @_;
   $self->option('setup_fee');

Index: bulk.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/bulk.pm,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -w -d -r1.12 -r1.13
--- bulk.pm	20 Jan 2011 00:38:14 -0000	1.12
+++ bulk.pm	12 Feb 2011 04:56:56 -0000	1.13
@@ -4,6 +4,7 @@
 use vars qw(@ISA $DEBUG $me %info);
 use Date::Format;
 use FS::part_pkg::flat;
+use FS::Conf;
 
 @ISA = qw(FS::part_pkg::flat);
 
@@ -34,6 +35,22 @@
   'weight' => 50,
 );
 
+sub price_info {
+    my $self = shift;
+    my $str = $self->SUPER::price_info;
+    my $svc_setup_fee = $self->option('svc_setup_fee');
+    my $svc_recur_fee = $self->option('svc_recur_fee');
+    my $conf = new FS::Conf;
+    my $money_char = $conf->config('money_char') || '$';
+    $str .= " , bulk" if $str;
+    $str .= ": $money_char" . $svc_setup_fee . " one-time per service" 
+	if $svc_setup_fee;
+    $str .= ", " if ($svc_setup_fee && $svc_recur_fee);
+    $str .= $money_char . $svc_recur_fee . " recurring per service"
+	if $svc_recur_fee;
+    $str;
+}
+
 #some false laziness-ish w/agent.pm...  not a lot
 sub calc_recur {
   my($self, $cust_pkg, $sdate, $details ) = @_;

Index: sql_generic.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/sql_generic.pm,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -w -d -r1.10 -r1.11
--- sql_generic.pm	24 Dec 2010 09:49:32 -0000	1.10
+++ sql_generic.pm	12 Feb 2011 04:56:57 -0000	1.11
@@ -40,6 +40,13 @@
   'weight' => '56',
 );
 
+sub price_info {
+    my $self = shift;
+    my $str = $self->SUPER::price_info;
+    $str .= " plus per-service charges" if $str;
+    $str;
+}
+
 sub calc_recur {
   my($self, $cust_pkg ) = @_;
 

Index: sesmon_minute.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/sesmon_minute.pm,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -w -d -r1.12 -r1.13
--- sesmon_minute.pm	16 Jan 2011 20:20:23 -0000	1.12
+++ sesmon_minute.pm	12 Feb 2011 04:56:57 -0000	1.13
@@ -26,6 +26,12 @@
   'weight' => 80,
 );
 
+sub price_info {
+    my $self = shift;
+    my $str = $self->SUPER::price_info;
+    $str .= " plus usage" if $str;
+    $str;
+}
 
 sub calc_recur {
   my( $self, $cust_pkg ) = @);



More information about the freeside-commits mailing list