projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
adding prepaid self-service hooks, RT#4100
[freeside.git]
/
FS
/
FS
/
part_pkg
/
voip_sqlradacct.pm
diff --git
a/FS/FS/part_pkg/voip_sqlradacct.pm
b/FS/FS/part_pkg/voip_sqlradacct.pm
index
a2f998a
..
b4f0cf9
100644
(file)
--- a/
FS/FS/part_pkg/voip_sqlradacct.pm
+++ b/
FS/FS/part_pkg/voip_sqlradacct.pm
@@
-4,7
+4,7
@@
use strict;
use vars qw(@ISA $DEBUG %info);
use Date::Format;
use FS::Record qw(qsearchs qsearch);
use vars qw(@ISA $DEBUG %info);
use Date::Format;
use FS::Record qw(qsearchs qsearch);
-use FS::part_pkg;
+use FS::part_pkg
::flat
;
#use FS::rate;
use FS::rate_prefix;
#use FS::rate;
use FS::rate_prefix;
@@
-13,14
+13,16
@@
use FS::rate_prefix;
$DEBUG = 1;
%info = (
$DEBUG = 1;
%info = (
+ 'disabled' => 1, #they're sucked into our CDR table now instead
'name' => 'VoIP rating by plan of CDR records in an SQL RADIUS radacct table',
'name' => 'VoIP rating by plan of CDR records in an SQL RADIUS radacct table',
+ 'shortname' => 'VoIP/telco CDR rating (external RADIUS)',
'fields' => {
'setup_fee' => { 'name' => 'Setup fee for this package',
'default' => 0,
},
'fields' => {
'setup_fee' => { 'name' => 'Setup fee for this package',
'default' => 0,
},
- 'recur_f
lat' => { 'name' => 'Base monthly charg
e for this package',
-
'default' => 0,
-
},
+ 'recur_f
ee' => { 'name' => 'Base recurring fe
e for this package',
+ 'default' => 0,
+ },
'unused_credit' => { 'name' => 'Credit the customer for the unused portion'.
' of service at cancellation',
'type' => 'checkbox',
'unused_credit' => { 'name' => 'Credit the customer for the unused portion'.
' of service at cancellation',
'type' => 'checkbox',
@@
-32,7
+34,7
@@
$DEBUG = 1;
'select_label' => 'ratename',
},
},
'select_label' => 'ratename',
},
},
- 'fieldorder' => [qw( setup_fee recur_f
lat
unused_credit ratenum ignore_unrateable )],
+ 'fieldorder' => [qw( setup_fee recur_f
ee
unused_credit ratenum ignore_unrateable )],
'weight' => 40,
);
'weight' => 40,
);
@@
-41,6
+43,7
@@
sub calc_setup {
$self->option('setup_fee');
}
$self->option('setup_fee');
}
+#false laziness w/voip_cdr... resolve it if this one ever gets used again
sub calc_recur {
my($self, $cust_pkg, $sdate, $details ) = @_;
sub calc_recur {
my($self, $cust_pkg, $sdate, $details ) = @_;
@@
-153,14
+156,15
@@
sub calc_recur {
}
my $rate_region = $rate_prefix->rate_region;
}
my $rate_region = $rate_prefix->rate_region;
- warn " (rate region $rate_region)" if $DEBUG;
+ warn " (rate region $rate_region)
\n
" if $DEBUG;
my @call_details = (
my @call_details = (
- time2str("%Y %b %d - %r", $session->{'acctstarttime'}),
- "+$countrycode $dest",
- $rate_region->regionname,
+ #time2str("%Y %b %d - %r", $session->{'acctstarttime'}),
+ time2str("%c", $session->{'acctstarttime'}),
$minutes.'m',
'$'.$charge,
$minutes.'m',
'$'.$charge,
+ "+$countrycode $dest",
+ $rate_region->regionname,
);
warn " adding details on charge to invoice: ".
);
warn " adding details on charge to invoice: ".
@@
-173,7
+177,7
@@
sub calc_recur {
} # $cust_svc
} # $cust_svc
- $self->option('recur_f
lat
') + $charges;
+ $self->option('recur_f
ee
') + $charges;
}
}
@@
-183,7
+187,7
@@
sub is_free {
sub base_recur {
my($self, $cust_pkg) = @_;
sub base_recur {
my($self, $cust_pkg) = @_;
- $self->option('recur_f
lat
');
+ $self->option('recur_f
ee
');
}
1;
}
1;