[freeside-commits] freeside/FS/FS/part_pkg sesmon_hour.pm, 1.7, 1.8 sesmon_minute.pm, 1.8, 1.9 sql_external.pm, 1.7, 1.8 sql_generic.pm, 1.7, 1.8 sqlradacct_hour.pm, 1.8, 1.9 voip_cdr.pm, 1.10, 1.11 voip_sqlradacct.pm, 1.19, 1.20

Ivan,,, ivan at wavetail.420.am
Tue Apr 15 12:43:56 PDT 2008


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

Modified Files:
	sesmon_hour.pm sesmon_minute.pm sql_external.pm sql_generic.pm 
	sqlradacct_hour.pm voip_cdr.pm voip_sqlradacct.pm 
Log Message:
s/recur_flat/recur_fee/

Index: sesmon_hour.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/sesmon_hour.pm,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- sesmon_hour.pm	13 Apr 2008 07:41:28 -0000	1.7
+++ sesmon_hour.pm	15 Apr 2008 19:43:53 -0000	1.8
@@ -14,9 +14,9 @@
     'setup_fee' => { 'name' => 'Setup fee for this package',
                      'default' => 0,
                    },
-    'recur_flat' => { 'name' => 'Base recurring fee for this package',
-                      'default' => 0,
-                    },
+    'recur_fee' => { 'name' => 'Base recurring fee for this package',
+                     'default' => 0,
+                   },
     'unused_credit' => { 'name' => 'Credit the customer for the unused portion'.
                                    ' of service at cancellation',
                          'type' => 'checkbox',
@@ -28,9 +28,9 @@
                                'default' => 0,
                              },
   },
-  'fieldorder' => [ 'setup_fee', 'recur_flat', 'unused_credit', 'recur_included_hours', 'recur_hourly_charge' ],
+  'fieldorder' => [ 'setup_fee', 'recur_fee', 'unused_credit', 'recur_included_hours', 'recur_hourly_charge' ],
   #'setup' => 'what.setup_fee.value',
-  #'recur' => '\'my $hours = $cust_pkg->seconds_since($cust_pkg->bill || 0) / 3600 - \' + what.recur_included_hours.value + \'; $hours = 0 if $hours < 0; \' + what.recur_flat.value + \' + \' + what.recur_hourly_charge.value + \' * $hours;\'',
+  #'recur' => '\'my $hours = $cust_pkg->seconds_since($cust_pkg->bill || 0) / 3600 - \' + what.recur_included_hours.value + \'; $hours = 0 if $hours < 0; \' + what.recur_fee.value + \' + \' + what.recur_hourly_charge.value + \' * $hours;\'',
   'weight' => 80,
 );
 
@@ -41,7 +41,7 @@
   $hours -= $self->option('recur_included_hours');
   $hours = 0 if $hours < 0;
 
-  $self->option('recur_flat') + $hours * $self->option('recur_hourly_charge');
+  $self->option('recur_fee') + $hours * $self->option('recur_hourly_charge');
 
 }
 
@@ -51,7 +51,7 @@
 
 sub base_recur {
   my($self, $cust_pkg) = @_;
-  $self->option('recur_flat');
+  $self->option('recur_fee');
 }
 
 1;

Index: sql_external.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/sql_external.pm,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- sql_external.pm	13 Apr 2008 07:41:28 -0000	1.7
+++ sql_external.pm	15 Apr 2008 19:43:53 -0000	1.8
@@ -15,9 +15,9 @@
     'setup_fee' => { 'name' => 'Setup fee for this package',
                      'default' => 0,
                    },
-    'recur_flat' => { 'name' => 'Base recurring fee for this package',
-                      'default' => 0,
-                    },
+    'recur_fee' => { 'name' => 'Base recurring fee for this package',
+                     'default' => 0,
+                   },
     'unused_credit' => { 'name' => 'Credit the customer for the unused portion'.
                                    ' of service at cancellation',
                          'type' => 'checkbox',
@@ -35,9 +35,9 @@
                  'default' => '',
                },
   },
-  'fieldorder' => [qw( setup_fee recur_flat unused_credit datasrc db_username db_password query )],
+  'fieldorder' => [qw( setup_fee recur_fee unused_credit datasrc db_username db_password query )],
   #'setup' => 'what.setup_fee.value',
-  #'recur' => q!'my $dbh = DBI->connect("' + what.datasrc.value + '", "' + what.db_username.value + '", "' + what.db_password.value + '" ) or die $DBI::errstr; my $sth = $dbh->prepare("' + what.query.value + '") or die $dbh->errstr; my $price = ' + what.recur_flat.value + '; foreach my $cust_svc ( grep { $_->part_svc->svcdb eq "svc_external" } $cust_pkg->cust_svc ){ my $id = $cust_svc->svc_x->id; $sth->execute($id) or die $sth->errstr; $price += $sth->fetchrow_arrayref->[0]; } $price;'!,
+  #'recur' => q!'my $dbh = DBI->connect("' + what.datasrc.value + '", "' + what.db_username.value + '", "' + what.db_password.value + '" ) or die $DBI::errstr; my $sth = $dbh->prepare("' + what.query.value + '") or die $dbh->errstr; my $price = ' + what.recur_fee.value + '; foreach my $cust_svc ( grep { $_->part_svc->svcdb eq "svc_external" } $cust_pkg->cust_svc ){ my $id = $cust_svc->svc_x->id; $sth->execute($id) or die $sth->errstr; $price += $sth->fetchrow_arrayref->[0]; } $price;'!,
   'weight' => '58',
 );
 
@@ -52,7 +52,7 @@
   my $sth = $dbh->prepare( $self->option('query') )
     or die $dbh->errstr;
 
-  my $price = $self->option('recur_flat');
+  my $price = $self->option('recur_fee');
 
   foreach my $cust_svc (
     grep { $_->part_svc->svcdb eq "svc_external" } $cust_pkg->cust_svc
@@ -71,7 +71,7 @@
 
 sub base_recur {
   my($self, $cust_pkg) = @_;
-  $self->option('recur_flat');
+  $self->option('recur_fee');
 }
 
 1;

Index: sqlradacct_hour.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/sqlradacct_hour.pm,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- sqlradacct_hour.pm	13 Apr 2008 07:41:28 -0000	1.8
+++ sqlradacct_hour.pm	15 Apr 2008 19:43:54 -0000	1.9
@@ -14,9 +14,9 @@
     'setup_fee' => { 'name' => 'Setup fee for this package',
                      'default' => 0,
                    },
-    'recur_flat' => { 'name' => 'Base recurring fee for this package',
-                      'default' => 0,
-                    },
+    'recur_fee' => { 'name' => 'Base recurring fee for this package',
+                     'default' => 0,
+                   },
     'unused_credit' => { 'name' => 'Credit the customer for the unused portion'.
                                    ' of service at cancellation',
                          'type' => 'checkbox',
@@ -77,9 +77,9 @@
                             },
 
   },
-  'fieldorder' => [qw( setup_fee recur_flat unused_credit recur_included_hours recur_hourly_charge recur_hourly_cap recur_included_input recur_input_charge recur_input_cap recur_included_output recur_output_charge recur_output_cap recur_included_total recur_total_charge recur_total_cap global_cap )],
+  'fieldorder' => [qw( setup_fee recur_fee unused_credit recur_included_hours recur_hourly_charge recur_hourly_cap recur_included_input recur_input_charge recur_input_cap recur_included_output recur_output_charge recur_output_cap recur_included_total recur_total_charge recur_total_cap global_cap )],
   #'setup' => 'what.setup_fee.value',
-  #'recur' => '\'my $last_bill = $cust_pkg->last_bill; my $hours = $cust_pkg->seconds_since_sqlradacct($last_bill, $sdate ) / 3600 - \' + what.recur_included_hours.value + \'; $hours = 0 if $hours < 0; my $input = $cust_pkg->attribute_since_sqlradacct($last_bill, $sdate, \"AcctInputOctets\" ) / 1048576; my $output = $cust_pkg->attribute_since_sqlradacct($last_bill, $sdate, \"AcctOutputOctets\" ) / 1048576; my $total = $input + $output - \' + what.recur_included_total.value + \'; $total = 0 if $total < 0; my $input = $input - \' + what.recur_included_input.value + \'; $input = 0 if $input < 0; my $output = $output - \' + what.recur_included_output.value + \'; $output = 0 if $output < 0; my $totalcharge = sprintf(\"%.2f\", \' + what.recur_total_charge.value + \' * $total); my $inputcharge = sprintf(\"%.2f\", \' + what.recur_input_charge.value + \' * $input); my $outputcharge = sprintf(\"%.2f\", \' + what.recur_output_charge.value + \' * $output); my $hourscharge = sprintf(\"%.2f\", \' + what.recur_hourly_charge.value + \' * $hours); if ( \' + what.recur_total_charge.value + \' > 0 ) { push @details, \"Last month\\\'s data \". sprintf(\"%.1f\", $total). \" megs: \\\$$totalcharge\" } if ( \' + what.recur_input_charge.value + \' > 0 ) { push @details, \"Last month\\\'s download \". sprintf(\"%.1f\", $input). \" megs: \\\$$inputcharge\" } if ( \' + what.recur_output_charge.value + \' > 0 ) { push @details, \"Last month\\\'s upload \". sprintf(\"%.1f\", $output). \" megs: \\\$$outputcharge\" } if ( \' + what.recur_hourly_charge.value + \' > 0 ) { push @details, \"Last month\\\'s time \". sprintf(\"%.1f\", $hours). \" hours: \\\$$hourscharge\"; } \' + what.recur_flat.value + \' + $hourscharge + $inputcharge + $outputcharge + $totalcharge ;\'',
+  #'recur' => '\'my $last_bill = $cust_pkg->last_bill; my $hours = $cust_pkg->seconds_since_sqlradacct($last_bill, $sdate ) / 3600 - \' + what.recur_included_hours.value + \'; $hours = 0 if $hours < 0; my $input = $cust_pkg->attribute_since_sqlradacct($last_bill, $sdate, \"AcctInputOctets\" ) / 1048576; my $output = $cust_pkg->attribute_since_sqlradacct($last_bill, $sdate, \"AcctOutputOctets\" ) / 1048576; my $total = $input + $output - \' + what.recur_included_total.value + \'; $total = 0 if $total < 0; my $input = $input - \' + what.recur_included_input.value + \'; $input = 0 if $input < 0; my $output = $output - \' + what.recur_included_output.value + \'; $output = 0 if $output < 0; my $totalcharge = sprintf(\"%.2f\", \' + what.recur_total_charge.value + \' * $total); my $inputcharge = sprintf(\"%.2f\", \' + what.recur_input_charge.value + \' * $input); my $outputcharge = sprintf(\"%.2f\", \' + what.recur_output_charge.value + \' * $output); my $hourscharge = sprintf(\"%.2f\", \' + what.recur_hourly_charge.value + \' * $hours); if ( \' + what.recur_total_charge.value + \' > 0 ) { push @details, \"Last month\\\'s data \". sprintf(\"%.1f\", $total). \" megs: \\\$$totalcharge\" } if ( \' + what.recur_input_charge.value + \' > 0 ) { push @details, \"Last month\\\'s download \". sprintf(\"%.1f\", $input). \" megs: \\\$$inputcharge\" } if ( \' + what.recur_output_charge.value + \' > 0 ) { push @details, \"Last month\\\'s upload \". sprintf(\"%.1f\", $output). \" megs: \\\$$outputcharge\" } if ( \' + what.recur_hourly_charge.value + \' > 0 ) { push @details, \"Last month\\\'s time \". sprintf(\"%.1f\", $hours). \" hours: \\\$$hourscharge\"; } \' + what.recur_fee.value + \' + $hourscharge + $inputcharge + $outputcharge + $totalcharge ;\'',
   'weight' => 40,
 );
 
@@ -155,17 +155,17 @@
     push @$details, "Usage charges capped at: $charges";
   }
 
-  $self->option('recur_flat') + $charges;
+  $self->option('recur_fee') + $charges;
 }
 
 sub is_free_options {
-  qw( setup_fee recur_flat recur_hourly_charge
+  qw( setup_fee recur_fee recur_hourly_charge
       recur_input_charge recur_output_charge recur_total_charge );
 }
 
 sub base_recur {
   my($self, $cust_pkg) = @_;
-  $self->option('recur_flat');
+  $self->option('recur_fee');
 }
 
 1;

Index: voip_sqlradacct.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/voip_sqlradacct.pm,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- voip_sqlradacct.pm	13 Apr 2008 07:41:29 -0000	1.19
+++ voip_sqlradacct.pm	15 Apr 2008 19:43:54 -0000	1.20
@@ -19,9 +19,9 @@
     'setup_fee'     => { 'name' => 'Setup fee for this package',
                          'default' => 0,
                        },
-    'recur_flat'     => { 'name' => 'Base recurring fee for this package',
-                          'default' => 0,
-                        },
+    'recur_fee'     => { 'name' => 'Base recurring fee for this package',
+                         'default' => 0,
+                       },
     'unused_credit' => { 'name' => 'Credit the customer for the unused portion'.
                                    ' of service at cancellation',
                          'type' => 'checkbox',
@@ -33,7 +33,7 @@
                      'select_label' => 'ratename',
                    },
   },
-  'fieldorder' => [qw( setup_fee recur_flat unused_credit ratenum ignore_unrateable )],
+  'fieldorder' => [qw( setup_fee recur_fee unused_credit ratenum ignore_unrateable )],
   'weight' => 40,
 );
 
@@ -176,7 +176,7 @@
 
   } # $cust_svc
 
-  $self->option('recur_flat') + $charges;
+  $self->option('recur_fee') + $charges;
 
 }
 
@@ -186,7 +186,7 @@
 
 sub base_recur {
   my($self, $cust_pkg) = @_;
-  $self->option('recur_flat');
+  $self->option('recur_fee');
 }
 
 1;

Index: voip_cdr.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/voip_cdr.pm,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- voip_cdr.pm	13 Apr 2008 07:41:28 -0000	1.10
+++ voip_cdr.pm	15 Apr 2008 19:43:54 -0000	1.11
@@ -32,9 +32,9 @@
     'setup_fee'     => { 'name' => 'Setup fee for this package',
                          'default' => 0,
                        },
-    'recur_flat'     => { 'name' => 'Base recurring fee for this package',
-                          'default' => 0,
-                        },
+    'recur_fee'     => { 'name' => 'Base recurring fee for this package',
+                         'default' => 0,
+                       },
     'unused_credit' => { 'name' => 'Credit the customer for the unused portion'.
                                    ' of service at cancellation',
                          'type' => 'checkbox',
@@ -94,7 +94,7 @@
 #                  },
 
   },
-  'fieldorder' => [qw( setup_fee recur_flat unused_credit ratenum rating_method default_prefix disable_src domestic_prefix international_prefix )],
+  'fieldorder' => [qw( setup_fee recur_fee unused_credit ratenum rating_method default_prefix disable_src domestic_prefix international_prefix )],
   'weight' => 40,
 );
 
@@ -360,7 +360,7 @@
 
   } #if ( $spool_cdr && length($downstream_cdr) )
 
-  $self->option('recur_flat') + $charges;
+  $self->option('recur_fee') + $charges;
 
 }
 
@@ -370,7 +370,7 @@
 
 sub base_recur {
   my($self, $cust_pkg) = @_;
-  $self->option('recur_flat');
+  $self->option('recur_fee');
 }
 
 1;

Index: sql_generic.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/sql_generic.pm,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- sql_generic.pm	13 Apr 2008 07:41:28 -0000	1.7
+++ sql_generic.pm	15 Apr 2008 19:43:53 -0000	1.8
@@ -15,9 +15,9 @@
     'setup_fee' => { 'name' => 'Setup fee for this package',
                      'default' => 0,
                    },
-    'recur_flat' => { 'name' => 'Base recurring fee for this package',
-                      'default' => 0,
-                    },
+    'recur_fee' => { 'name' => 'Base recurring fee for this package',
+                     'default' => 0,
+                   },
     'unused_credit' => { 'name' => 'Credit the customer for the unused portion'.
                                    ' of service at cancellation',
                          'type' => 'checkbox',
@@ -41,11 +41,11 @@
                  'default' => '',
                },
   },
-  'fieldorder' => [qw( setup_fee recur_flat unused_credit recur_included recur_unit_charge datasrc db_username db_password query )],
+  'fieldorder' => [qw( setup_fee recur_fee unused_credit recur_included recur_unit_charge datasrc db_username db_password query )],
  # 'setup' => 'what.setup_fee.value',
  # 'recur' => '\'my $dbh = DBI->connect(\"\' + what.datasrc.value + \'\", \"\' + what.db_username.value + \'\") or die $DBI::errstr; \'',
- #'recur' => '\'my $dbh = DBI->connect(\"\' + what.datasrc.value + \'\", \"\' + what.db_username.value + \'\", \"\' + what.db_password.value + \'\" ) or die $DBI::errstr; my $sth = $dbh->prepare(\"\' + what.query.value + \'\") or die $dbh->errstr; my $units = 0; foreach my $cust_svc ( grep { $_->part_svc->svcdb eq \"svc_domain\" } $cust_pkg->cust_svc ) { my $domain = $cust_svc->svc_x->domain; $sth->execute($domain) or die $sth->errstr; $units += $sth->fetchrow_arrayref->[0]; } $units -= \' + what.recur_included.value + \'; $units = 0 if $units < 0; \' + what.recur_flat.value + \' + $units * \' + what.recur_unit_charge.value + \';\'',
-  #'recur' => '\'my $dbh = DBI->connect("\' + what.datasrc.value + \'", "\' + what.db_username.value + \'", "\' what.db_password.value + \'" ) or die $DBI::errstr; my $sth = $dbh->prepare("\' + what.query.value + \'") or die $dbh->errstr; my $units = 0; foreach my $cust_svc ( grep { $_->part_svc->svcdb eq "svc_domain" } $cust_pkg->cust_svc ) { my $domain = $cust_svc->svc_x->domain; $sth->execute($domain) or die $sth->errstr; $units += $sth->fetchrow_arrayref->[0]; } $units -= \' + what.recur_included.value + \'; $units = 0 if $units < 0; \' + what.recur_flat.value + \' + $units * \' + what.recur_unit_charge + \';\'',
+ #'recur' => '\'my $dbh = DBI->connect(\"\' + what.datasrc.value + \'\", \"\' + what.db_username.value + \'\", \"\' + what.db_password.value + \'\" ) or die $DBI::errstr; my $sth = $dbh->prepare(\"\' + what.query.value + \'\") or die $dbh->errstr; my $units = 0; foreach my $cust_svc ( grep { $_->part_svc->svcdb eq \"svc_domain\" } $cust_pkg->cust_svc ) { my $domain = $cust_svc->svc_x->domain; $sth->execute($domain) or die $sth->errstr; $units += $sth->fetchrow_arrayref->[0]; } $units -= \' + what.recur_included.value + \'; $units = 0 if $units < 0; \' + what.recur_fee.value + \' + $units * \' + what.recur_unit_charge.value + \';\'',
+  #'recur' => '\'my $dbh = DBI->connect("\' + what.datasrc.value + \'", "\' + what.db_username.value + \'", "\' what.db_password.value + \'" ) or die $DBI::errstr; my $sth = $dbh->prepare("\' + what.query.value + \'") or die $dbh->errstr; my $units = 0; foreach my $cust_svc ( grep { $_->part_svc->svcdb eq "svc_domain" } $cust_pkg->cust_svc ) { my $domain = $cust_svc->svc_x->domain; $sth->execute($domain) or die $sth->errstr; $units += $sth->fetchrow_arrayref->[0]; } $units -= \' + what.recur_included.value + \'; $units = 0 if $units < 0; \' + what.recur_fee.value + \' + $units * \' + what.recur_unit_charge + \';\'',
   'weight' => '56',
 );
 
@@ -73,16 +73,16 @@
   $units -= $self->option('recur_included');
   $units = 0 if $units < 0;
 
-  $self->option('recur_flat') + $units * $self->option('recur_unit_charge');
+  $self->option('recur_fee') + $units * $self->option('recur_unit_charge');
 }
 
 sub is_free_options {
-  qw( setup_fee recur_flat recur_unit_charge );
+  qw( setup_fee recur_fee recur_unit_charge );
 }
 
 sub base_recur {
   my($self, $cust_pkg) = @_;
-  $self->option('recur_flat');
+  $self->option('recur_fee');
 }
 
 1;

Index: sesmon_minute.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/sesmon_minute.pm,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- sesmon_minute.pm	13 Apr 2008 07:41:28 -0000	1.8
+++ sesmon_minute.pm	15 Apr 2008 19:43:53 -0000	1.9
@@ -14,9 +14,9 @@
     'setup_fee' => { 'name' => 'Setup fee for this package',
                      'default' => 0,
                    },
-    'recur_flat' => { 'name' => 'Base recurring fee for this package',
-                      'default' => 0,
-                    },
+    'recur_fee' => { 'name' => 'Base recurring fee for this package',
+                     'default' => 0,
+                   },
     'unused_credit' => { 'name' => 'Credit the customer for the unused portion'.
                                    ' of service at cancellation',
                          'type' => 'checkbox',
@@ -28,9 +28,9 @@
                               'default' => 0,
                             },
   },
-  'fieldorder' => [ 'setup_fee', 'recur_flat', 'unused_credit', 'recur_included_min', 'recur_minly_charge' ],
+  'fieldorder' => [ 'setup_fee', 'recur_fee', 'unused_credit', 'recur_included_min', 'recur_minly_charge' ],
   #'setup' => 'what.setup_fee.value',
-  #'recur' => '\'my $min = $cust_pkg->seconds_since($cust_pkg->bill || 0) / 60 - \' + what.recur_included_min.value + \'; $min = 0 if $min < 0; \' + what.recur_flat.value + \' + \' + what.recur_minly_charge.value + \' * $min;\'',
+  #'recur' => '\'my $min = $cust_pkg->seconds_since($cust_pkg->bill || 0) / 60 - \' + what.recur_included_min.value + \'; $min = 0 if $min < 0; \' + what.recur_fee.value + \' + \' + what.recur_minly_charge.value + \' * $min;\'',
   'weight' => 80,
 );
 
@@ -41,7 +41,7 @@
   $min -= $self->option('recur_included_min');
   $min = 0 if $min < 0;
 
-  $self->option('recur_flat') + $min * $self->option('recur_minly_charge');
+  $self->option('recur_fee') + $min * $self->option('recur_minly_charge');
 }
 
 sub is_free_options {
@@ -50,7 +50,7 @@
 
 sub base_recur {
   my($self, $cust_pkg) = @_;
-  $self->option('recur_flat');
+  $self->option('recur_fee');
 }
 
 1;



More information about the freeside-commits mailing list