use FS::part_export;
use FS::cdr;
use FS::UI::Web;
+use FS::export_cust_svc;
#most FS::svc_ classes are autoloaded in svc_x emthod
use FS::svc_acct; #this one is used in the cache stuff
local $FS::UID::AutoCommit = 0;
my $dbh = dbh;
+ # delete associated export_cust_svc
+ foreach my $export_cust_svc (
+ qsearch('export_cust_svc',{ 'svcnum' => $self->svcnum })
+ ) {
+ my $error = $export_cust_svc->delete;
+ if ( $error ) {
+ $dbh->rollback if $oldAutoCommit;
+ return $error;
+ }
+ }
+
my $error = $self->SUPER::delete;
if ( $error ) {
$dbh->rollback if $oldAutoCommit;
=item seconds_since_sqlradacct TIMESTAMP_START TIMESTAMP_END
-See L<FS::svc_acct/seconds_since_sqlradacct>. Equivalent to
-$cust_svc->svc_x->seconds_since_sqlradacct, but more efficient. Meaningless
-for records where B<svcdb> is not "svc_acct".
+Equivalent to $cust_svc->svc_x->seconds_since_sqlradacct, but
+more efficient. Meaningless for records where B<svcdb> is not
+svc_acct or svc_broadband.
=cut
-#note: implementation here, POD in FS::svc_acct
sub seconds_since_sqlradacct {
my($self, $start, $end) = @_;
=item attribute_since_sqlradacct TIMESTAMP_START TIMESTAMP_END ATTRIBUTE
See L<FS::svc_acct/attribute_since_sqlradacct>. Equivalent to
-$cust_svc->svc_x->attribute_since_sqlradacct, but more efficient. Meaningless
-for records where B<svcdb> is not "svc_acct".
+$cust_svc->svc_x->attribute_since_sqlradacct, but more efficient.
+Meaningless for records where B<svcdb> is not svc_acct or svc_broadband.
=cut
-#note: implementation here, POD in FS::svc_acct
#(false laziness w/seconds_since_sqlradacct above)
sub attribute_since_sqlradacct {
my($self, $start, $end, $attrib) = @_;