[freeside-commits] freeside/FS/FS/part_pkg base_rate.pm, 1.4.6.1, 1.4.6.2 bulk.pm, 1.10.2.2, 1.10.2.3 flat.pm, 1.53.2.4, 1.53.2.5 flat_comission.pm, 1.8.4.1, 1.8.4.2 rt_time.pm, 1.3.4.1, 1.3.4.2 sesmon_hour.pm, 1.9.4.2, 1.9.4.3 sesmon_minute.pm, 1.10.4.2, 1.10.4.3 sql_external.pm, 1.11.2.2, 1.11.2.3 sql_generic.pm, 1.9.4.1, 1.9.4.2 sqlradacct_hour.pm, 1.10.4.1, 1.10.4.2 voip_cdr.pm, 1.108.2.3, 1.108.2.4 voip_inbound.pm, 1.4.2.1, 1.4.2.2 voip_sqlradacct.pm, 1.22.4.1, 1.22.4.2
Erik Levinson
levinse at wavetail.420.am
Fri Feb 11 20:56:30 PST 2011
Update of /home/cvs/cvsroot/freeside/FS/FS/part_pkg
In directory wavetail.420.am:/tmp/cvs-serv21471/FS/FS/part_pkg
Modified Files:
Tag: FREESIDE_2_1_BRANCH
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.4.6.1
retrieving revision 1.4.6.2
diff -u -w -d -r1.4.6.1 -r1.4.6.2
--- base_rate.pm 24 Dec 2010 09:49:48 -0000 1.4.6.1
+++ base_rate.pm 12 Feb 2011 04:56:27 -0000 1.4.6.2
@@ -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.3.4.1
retrieving revision 1.3.4.2
diff -u -w -d -r1.3.4.1 -r1.3.4.2
--- rt_time.pm 24 Dec 2010 09:49:49 -0000 1.3.4.1
+++ rt_time.pm 12 Feb 2011 04:56:27 -0000 1.3.4.2
@@ -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.9.4.2
retrieving revision 1.9.4.3
diff -u -w -d -r1.9.4.2 -r1.9.4.3
--- sesmon_hour.pm 16 Jan 2011 20:20:24 -0000 1.9.4.2
+++ sesmon_hour.pm 12 Feb 2011 04:56:28 -0000 1.9.4.3
@@ -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.8.4.1
retrieving revision 1.8.4.2
diff -u -w -d -r1.8.4.1 -r1.8.4.2
--- flat_comission.pm 24 Dec 2010 09:49:49 -0000 1.8.4.1
+++ flat_comission.pm 12 Feb 2011 04:56:27 -0000 1.8.4.2
@@ -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.11.2.2
retrieving revision 1.11.2.3
diff -u -w -d -r1.11.2.2 -r1.11.2.3
--- sql_external.pm 18 Jan 2011 05:21:09 -0000 1.11.2.2
+++ sql_external.pm 12 Feb 2011 04:56:28 -0000 1.11.2.3
@@ -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.10.4.1
retrieving revision 1.10.4.2
diff -u -w -d -r1.10.4.1 -r1.10.4.2
--- sqlradacct_hour.pm 24 Dec 2010 09:49:49 -0000 1.10.4.1
+++ sqlradacct_hour.pm 12 Feb 2011 04:56:28 -0000 1.10.4.2
@@ -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.22.4.1
retrieving revision 1.22.4.2
diff -u -w -d -r1.22.4.1 -r1.22.4.2
--- voip_sqlradacct.pm 24 Dec 2010 09:49:50 -0000 1.22.4.1
+++ voip_sqlradacct.pm 12 Feb 2011 04:56:28 -0000 1.22.4.2
@@ -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.108.2.3
retrieving revision 1.108.2.4
diff -u -w -d -r1.108.2.3 -r1.108.2.4
--- voip_cdr.pm 12 Feb 2011 00:19:32 -0000 1.108.2.3
+++ voip_cdr.pm 12 Feb 2011 04:56:28 -0000 1.108.2.4
@@ -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.53.2.4
retrieving revision 1.53.2.5
diff -u -w -d -r1.53.2.4 -r1.53.2.5
--- flat.pm 19 Jan 2011 00:30:41 -0000 1.53.2.4
+++ flat.pm 12 Feb 2011 04:56:27 -0000 1.53.2.5
@@ -77,6 +77,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.4.2.1
retrieving revision 1.4.2.2
diff -u -w -d -r1.4.2.1 -r1.4.2.2
--- voip_inbound.pm 24 Dec 2010 09:49:50 -0000 1.4.2.1
+++ voip_inbound.pm 12 Feb 2011 04:56:28 -0000 1.4.2.2
@@ -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.10.2.2
retrieving revision 1.10.2.3
diff -u -w -d -r1.10.2.2 -r1.10.2.3
--- bulk.pm 19 Jan 2011 00:30:41 -0000 1.10.2.2
+++ bulk.pm 12 Feb 2011 04:56:27 -0000 1.10.2.3
@@ -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.9.4.1
retrieving revision 1.9.4.2
diff -u -w -d -r1.9.4.1 -r1.9.4.2
--- sql_generic.pm 24 Dec 2010 09:49:49 -0000 1.9.4.1
+++ sql_generic.pm 12 Feb 2011 04:56:28 -0000 1.9.4.2
@@ -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.10.4.2
retrieving revision 1.10.4.3
diff -u -w -d -r1.10.4.2 -r1.10.4.3
--- sesmon_minute.pm 16 Jan 2011 20:20:24 -0000 1.10.4.2
+++ sesmon_minute.pm 12 Feb 2011 04:56:28 -0000 1.10.4.3
@@ -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