projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
61bd7e3
)
better diagnostics for un-pre-rate-able CDRs
author
Ivan Kohler
<ivan@freeside.biz>
Wed, 25 Jan 2017 21:04:29 +0000
(13:04 -0800)
committer
Ivan Kohler
<ivan@freeside.biz>
Wed, 25 Jan 2017 21:04:29 +0000
(13:04 -0800)
FS/bin/freeside-cdrrated
patch
|
blob
|
history
diff --git
a/FS/bin/freeside-cdrrated
b/FS/bin/freeside-cdrrated
index
2966b2e
..
a8fcf51
100644
(file)
--- a/
FS/bin/freeside-cdrrated
+++ b/
FS/bin/freeside-cdrrated
@@
-82,6
+82,7
@@
while (1) {
my $svc_phone = qsearchs('svc_phone', { 'phonenum' => $number } );
unless ( $svc_phone ) {
#XXX set freesideratestatus or something so we don't keep retrying?
my $svc_phone = qsearchs('svc_phone', { 'phonenum' => $number } );
unless ( $svc_phone ) {
#XXX set freesideratestatus or something so we don't keep retrying?
+ warn "no phone number found for CDR ". $cdr->acctid. "\n";
next;
}
next;
}
@@
-94,7
+95,8
@@
while (1) {
my $cust_pkg = $svc_phone{$number}->cust_svc->cust_pkg;
unless ( $cust_pkg ) {
#XXX unlinked svc_phone?
my $cust_pkg = $svc_phone{$number}->cust_svc->cust_pkg;
unless ( $cust_pkg ) {
#XXX unlinked svc_phone?
- # warn and also set freesideratestatus or somesuch?
+ # also set freesideratestatus or somesuch?
+ warn "no package found (unlinked phone number?) for CDR ". $cdr->acctid. "\n";
next;
}
next;
}
@@
-124,6
+126,7
@@
while (1) {
#XXX no package for this CDR
# warn and also set freesideratestatus or somesuch?
# or at least warn
#XXX no package for this CDR
# warn and also set freesideratestatus or somesuch?
# or at least warn
+ warn "no CDR rating package for CDR ". $cdr->acctid. "\n";
next;
} elsif ( scalar(@part_pkg) > 1 ) {
warn "multiple package could rate CDR ". $cdr->acctid. "\n";
next;
} elsif ( scalar(@part_pkg) > 1 ) {
warn "multiple package could rate CDR ". $cdr->acctid. "\n";
@@
-140,6
+143,7
@@
while (1) {
#then we can't prerate this CDR
#some sort of warning?
# (sucks if you're depending on credit limit fraud warnings)
#then we can't prerate this CDR
#some sort of warning?
# (sucks if you're depending on credit limit fraud warnings)
+ warn "package has min_included; can't prerate CDR ". $cdr->acctid. "\n";
next;
}
next;
}
@@
-184,7
+188,7
@@
sub _shouldrun {
}
sub usage {
}
sub usage {
- die "Usage:\n\n freeside-cdrr
ewri
ted user\n";
+ die "Usage:\n\n freeside-cdrr
a
ted user\n";
}
=head1 NAME
}
=head1 NAME