freeside/FS/FS/part_pkg flat.pm,1.1,1.2 flat_comission.pm,1.1,1.2 flat_comission_cust.pm,1.1,1.2 flat_comission_pkg.pm,1.1,1.2 flat_delayed.pm,1.1,1.2 prorate.pm,1.1,1.2 sesmon_hour.pm,1.1,1.2 sesmon_minute.pm,1.1,1.2 sql_external.pm,1.1,1.2 sql_generic.pm,1.1,1.2 sqlradacct_hour.pm,1.1,1.2 subscription.pm,1.1,1.2 voip_sqlradacct.pm,1.1,1.2

ivan ivan at pouncequick.420.am
Tue Nov 30 19:35:10 PST 2004


Update of /home/cvs/cvsroot/freeside/FS/FS/part_pkg
In directory pouncequick:/tmp/cvs-serv24250/FS/FS/part_pkg

Modified Files:
	flat.pm flat_comission.pm flat_comission_cust.pm 
	flat_comission_pkg.pm flat_delayed.pm prorate.pm 
	sesmon_hour.pm sesmon_minute.pm sql_external.pm sql_generic.pm 
	sqlradacct_hour.pm subscription.pm voip_sqlradacct.pm 
Log Message:
creditcard-less promo code signup

Index: subscription.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/subscription.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- subscription.pm	26 Oct 2004 11:26:35 -0000	1.1
+++ subscription.pm	1 Dec 2004 03:35:05 -0000	1.2
@@ -6,7 +6,7 @@
 #use FS::Record qw(qsearch qsearchs);
 use FS::part_pkg;
 
- at ISA = qw(FS::part_pkg);
+ at ISA = qw(FS::part_pkg::flat);
 
 %info = (
     'name' => 'First partial month full charge, then flat-rate (1st of month billing)',
@@ -24,11 +24,6 @@
     'freq' => 'm',
     'weight' => 30,
 );
-
-sub calc_setup {
-  my($self, $cust_pkg ) = @_;
-  $self->option('setup_fee');
-}
 
 sub calc_recur {
   my($self, $cust_pkg, $sdate ) = @_;

Index: sql_generic.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/sql_generic.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- sql_generic.pm	26 Oct 2004 11:26:35 -0000	1.1
+++ sql_generic.pm	1 Dec 2004 03:35:05 -0000	1.2
@@ -6,7 +6,7 @@
 #use FS::Record qw(qsearch qsearchs);
 use FS::part_pkg;
 
- at ISA = qw(FS::part_pkg);
+ at ISA = qw(FS::part_pkg::flat);
 
 %info = (
     'name' => 'Base charge plus a per-domain metered rate from a configurable SQL query',
@@ -44,11 +44,6 @@
     'weight' => '70',
 );
 
-sub calc_setup {
-  my($self, $cust_pkg ) = @_;
-  $self->option('setup_fee');
-}
-
 sub calc_recur {
   my($self, $cust_pkg ) = @_;
 
@@ -74,6 +69,10 @@
   $units = 0 if $units < 0;
 
   $self->option('recur_flat') + $units * $self->option('recur_unit_charge');
+}
+
+sub is_free_options {
+  qw( setup_fee recur_flat recur_unit_charge );
 }
 
 1;

Index: flat.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/flat.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- flat.pm	26 Oct 2004 11:26:35 -0000	1.1
+++ flat.pm	1 Dec 2004 03:35:05 -0000	1.2
@@ -33,4 +33,8 @@
   $self->option('recur_fee');
 }
 
+sub is_free_options {
+  qw( setup_fee recur_fee );
+}
+
 1;

Index: flat_comission_cust.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/flat_comission_cust.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- flat_comission_cust.pm	26 Oct 2004 11:26:35 -0000	1.1
+++ flat_comission_cust.pm	1 Dec 2004 03:35:05 -0000	1.2
@@ -5,7 +5,7 @@
 #use FS::Record qw(qsearch qsearchs);
 use FS::part_pkg;
 
- at ISA = qw(FS::part_pkg);
+ at ISA = qw(FS::part_pkg::flat);
 
 %info = (
     'name' => 'Flat rate with recurring commission per active customer',
@@ -28,11 +28,6 @@
     #'recur' => '\'my $error = $cust_pkg->cust_main->credit( \' + what.comission_amount.value + \' * scalar($cust_pkg->cust_main->referral_cust_main_ncancelled(\' + what.comission_depth.value+ \')), "commission" ); die $error if $error; \' + what.recur_fee.value + \';\'',
     'weight' => '60',
 );
-
-sub calc_setup {
-  my($self, $cust_pkg ) = @_;
-  $self->option('setup_fee');
-}
 
 sub calc_recur {
   my($self, $cust_pkg ) = @_;

Index: flat_comission_pkg.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/flat_comission_pkg.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- flat_comission_pkg.pm	26 Oct 2004 11:26:35 -0000	1.1
+++ flat_comission_pkg.pm	1 Dec 2004 03:35:05 -0000	1.2
@@ -5,7 +5,7 @@
 #use FS::Record qw(qsearch qsearchs);
 use FS::part_pkg;
 
- at ISA = qw(FS::part_pkg);
+ at ISA = qw(FS::part_pkg::flat);
 
 %info = (
     'name' => 'Flat rate with recurring commission per (selected) active package',
@@ -37,11 +37,7 @@
     'weight' => '64',
 );
 
-sub calc_setup {
-  my($self, $cust_pkg ) = @_;
-  $self->option('setup_fee');
-}
-
+# XXX this needs to be fixed!!!
 sub calc_recur {
   my($self, $cust_pkg ) = @_;
   $self->option('recur_fee');

Index: flat_delayed.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/flat_delayed.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- flat_delayed.pm	26 Oct 2004 11:26:35 -0000	1.1
+++ flat_delayed.pm	1 Dec 2004 03:35:05 -0000	1.2
@@ -5,7 +5,7 @@
 #use FS::Record qw(qsearch qsearchs);
 use FS::part_pkg;
 
- at ISA = qw(FS::part_pkg);
+ at ISA = qw(FS::part_pkg::flat);
 
 %info = (
     'name' => 'Free (or setup fee) for X days, then flat rate'.
@@ -35,11 +35,6 @@
   $cust_pkg->bill($d);
   
   $self->option('setup_fee');
-}
-
-sub calc_recur {
-  my($self, $cust_pkg ) = @_;
-  $self->option('recur_fee');
 }
 
 1;

Index: prorate.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/prorate.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- prorate.pm	26 Oct 2004 11:26:35 -0000	1.1
+++ prorate.pm	1 Dec 2004 03:35:05 -0000	1.2
@@ -6,7 +6,7 @@
 #use FS::Record qw(qsearch qsearchs);
 use FS::part_pkg;
 
- at ISA = qw(FS::part_pkg);
+ at ISA = qw(FS::part_pkg::flat);
 
 %info = (
     'name' => 'First partial month pro-rated, then flat-rate (1st of month billing)',
@@ -24,11 +24,6 @@
     'freq' => 'm',
     'weight' => 20,
 );
-
-sub calc_setup {
-  my($self, $cust_pkg ) = @_;
-  $self->option('setup_fee');
-}
 
 sub calc_recur {
   my($self, $cust_pkg, $sdate ) = @_;

Index: voip_sqlradacct.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/voip_sqlradacct.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- voip_sqlradacct.pm	20 Nov 2004 17:26:54 -0000	1.1
+++ voip_sqlradacct.pm	1 Dec 2004 03:35:05 -0000	1.2
@@ -149,5 +149,9 @@
 
 }
 
+sub is_free {
+  0;
+}
+
 1;
 

Index: sql_external.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/sql_external.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- sql_external.pm	26 Oct 2004 11:26:35 -0000	1.1
+++ sql_external.pm	1 Dec 2004 03:35:05 -0000	1.2
@@ -6,7 +6,7 @@
 #use FS::Record qw(qsearch qsearchs);
 use FS::part_pkg;
 
- at ISA = qw(FS::part_pkg);
+ at ISA = qw(FS::part_pkg::flat);
 
 %info = (
     'name' => 'Base charge plus additional fees for external services from a configurable SQL query',
@@ -36,11 +36,6 @@
     'weight' => '72',
 );
 
-sub calc_setup {
-  my($self, $cust_pkg ) = @_;
-  $self->option('setup_fee');
-}
-
 sub calc_recur {
   my($self, $cust_pkg ) = @_;
 
@@ -63,6 +58,10 @@
   }
 
   $price;
+}
+
+sub is_free {
+  0;
 }
 
 1;

Index: sesmon_minute.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/sesmon_minute.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- sesmon_minute.pm	26 Oct 2004 11:26:35 -0000	1.1
+++ sesmon_minute.pm	1 Dec 2004 03:35:05 -0000	1.2
@@ -5,7 +5,7 @@
 #use FS::Record qw(qsearch qsearchs);
 use FS::part_pkg;
 
- at ISA = qw(FS::part_pkg);
+ at ISA = qw(FS::part_pkg::flat);
 
 %info = (
     'name' => 'Base charge plus charge per-minute from the session monitor',
@@ -29,10 +29,6 @@
     'weight' => 80,
 );
 
-sub calc_setup {
-  my( $self, $cust_pkg ) = @_;
-  $self->option('setup_fee');
-}
 
 sub cakc_recur {
   my( $self, $cust_pkg ) = @);
@@ -41,6 +37,10 @@
   $min = 0 if $min < 0;
 
   $self->option('recur_flat') + $min * $self->option('recur_minly_charge');
+}
+
+sub is_free_options {
+  qw( setup_fee recur_fee recur_minly_charge );
 }
 
 1;

Index: flat_comission.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/flat_comission.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- flat_comission.pm	26 Oct 2004 11:26:35 -0000	1.1
+++ flat_comission.pm	1 Dec 2004 03:35:05 -0000	1.2
@@ -5,7 +5,7 @@
 #use FS::Record qw(qsearch qsearchs);
 use FS::part_pkg;
 
- at ISA = qw(FS::part_pkg);
+ at ISA = qw(FS::part_pkg::flat);
 
 %info = (
     'name' => 'Flat rate with recurring commission per (any) active package',
@@ -28,11 +28,6 @@
     #'recur' => '\'my $error = $cust_pkg->cust_main->credit( \' + what.comission_amount.value + \' * scalar($cust_pkg->cust_main->referral_cust_pkg(\' + what.comission_depth.value+ \')), "commission" ); die $error if $error; \' + what.recur_fee.value + \';\'',
     'weight' => 62,
 );
-
-sub calc_setup {
-  my($self, $cust_pkg ) = @_;
-  $self->option('setup_fee');
-}
 
 sub calc_recur {
   my($self, $cust_pkg ) = @_;

Index: sesmon_hour.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/sesmon_hour.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- sesmon_hour.pm	26 Oct 2004 11:26:35 -0000	1.1
+++ sesmon_hour.pm	1 Dec 2004 03:35:05 -0000	1.2
@@ -5,7 +5,7 @@
 #use FS::Record qw(qsearch qsearchs);
 use FS::part_pkg;
 
- at ISA = qw(FS::part_pkg);
+ at ISA = qw(FS::part_pkg::flat);
 
 %info = (
     'name' => 'Base charge plus charge per-hour from the session monitor',
@@ -29,11 +29,6 @@
     'weight' => 80,
 );
 
-sub calc_setup {
-  my($self, $cust_pkg ) = @_;
-  $self->option('setup_fee');
-}
-
 sub calc_recur {
   my($self, $cust_pkg ) = @_;
 
@@ -43,6 +38,10 @@
 
   $self->option('recur_flat') + $hours * $self->option('recur_hourly_charge');
 
+}
+
+sub is_free_options {
+  qw( setup_fee recur_fee recur_hourly_charge );
 }
 
 1;

Index: sqlradacct_hour.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/sqlradacct_hour.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- sqlradacct_hour.pm	26 Oct 2004 11:26:35 -0000	1.1
+++ sqlradacct_hour.pm	1 Dec 2004 03:35:05 -0000	1.2
@@ -5,7 +5,7 @@
 #use FS::Record qw(qsearch qsearchs);
 use FS::part_pkg;
 
- at ISA = qw(FS::part_pkg);
+ at ISA = qw(FS::part_pkg::flat);
 
 %info = (
     'name' => 'Base charge plus per-hour (and for data) from an SQL RADIUS radacct table',
@@ -51,11 +51,6 @@
     'weight' => 40,
 );
 
-sub calc_setup {
-  my($self, $cust_pkg ) = @_;
-  $self->option('setup_fee');
-}
-
 sub calc_recur {
   my($self, $cust_pkg, $sdate, $details ) = @_;
 
@@ -110,6 +105,11 @@
 
   $self->option('recur_flat')
     + $hourscharge + $inputcharge + $outputcharge + $totalcharge;
+}
+
+sub is_free_options {
+  qw( setup_fee recur_flat recur_hourly_charge
+      recur_input_charge recur_output_charge recur_total_charge );
 }
 
 1;




More information about the freeside-commits mailing list