package FS::part_pkg;
use strict;
-use vars qw( @ISA %plans $DEBUG );
+use vars qw( @ISA %plans $DEBUG $setup_hack );
use Carp qw(carp cluck confess);
use Scalar::Util qw( blessed );
use Time::Local qw( timelocal_nocheck );
@ISA = qw( FS::m2m_Common FS::option_Common );
$DEBUG = 0;
+$setup_hack = 0;
=head1 NAME
'part_pkg_taxproduct',
'taxproductnum'
)
- || $self->ut_agentnum_acl('agentnum', \@null_agentnum_right)
+ || ( $setup_hack
+ ? $self->ut_foreign_keyn('agentnum', 'agent', 'agentnum' )
+ : $self->ut_agentnum_acl('agentnum', \@null_agentnum_right)
+ )
|| $self->SUPER::check
;
return $error if $error;
#to delay loading dbdef until we're ready
BEGIN { $FS::Schema::setup_hack = 1; }
+#to allow initial insert
+$FS::part_pkg::setup_hack = 1;
+$FS::part_pkg::setup_hack = 1;
+
use strict;
use vars qw($opt_u $opt_d $opt_v);
use Getopt::Std;
#!/usr/bin/perl -Tw
+#to allow initial insert
+$FS::part_pkg::setup_hack = 1;
+$FS::part_pkg::setup_hack = 1;
+
use strict;
use vars qw($opt_d $opt_v);
use Getopt::Std;