projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RT#39638 [selective v3 backport of commit 7516e3da0f17eeecba27219ef96a8b5f46af2083...
[freeside.git]
/
FS
/
FS
/
cdr.pm
diff --git
a/FS/FS/cdr.pm
b/FS/FS/cdr.pm
index
5a1d8ea
..
8ccf7af
100644
(file)
--- a/
FS/FS/cdr.pm
+++ b/
FS/FS/cdr.pm
@@
-161,6
+161,8
@@
following fields are currently supported:
=item cdrbatch
=item cdrbatch
+=item detailnum - Link to invoice detail (L<FS::cust_bill_pkg_detail>)
+
=back
=head1 METHODS
=back
=head1 METHODS
@@
-227,6
+229,7
@@
sub table_info {
'freesiderewritestatus' => 'Freeside rewrite status',
'cdrbatch' => 'Legacy batch',
'cdrbatchnum' => 'Batch',
'freesiderewritestatus' => 'Freeside rewrite status',
'cdrbatch' => 'Legacy batch',
'cdrbatchnum' => 'Batch',
+ 'detailnum' => 'Freeside invoice detail line',
},
};
},
};
@@
-338,8
+341,12
@@
sub check {
#check the foreign keys even?
#do we want to outright *reject* the CDR?
#check the foreign keys even?
#do we want to outright *reject* the CDR?
- my $error =
- $self->ut_numbern('acctid');
+ my $error = $self->ut_numbern('acctid');
+ return $error if $error;
+
+ if ( $self->freesidestatus ne 'done' ) {
+ $self->set('detailnum', ''); # can't have this on an unbilled call
+ }
#add a config option to turn these back on if someone needs 'em
#
#add a config option to turn these back on if someone needs 'em
#
@@
-352,8
+359,6
@@
sub check {
# # Telstra =1, Optus = 2, RSL COM = 3
# || $self->ut_foreign_keyn('carrierid', 'cdr_carrier', 'carrierid' )
# # Telstra =1, Optus = 2, RSL COM = 3
# || $self->ut_foreign_keyn('carrierid', 'cdr_carrier', 'carrierid' )
- return $error if $error;
-
$self->SUPER::check;
}
$self->SUPER::check;
}