diff options
author | Rob Van Dam <rvandam00@gmail.com> | 2013-10-17 11:43:27 -0600 |
---|---|---|
committer | Rob Van Dam <rvandam00@gmail.com> | 2013-10-17 11:43:27 -0600 |
commit | 4ad88e4863417a9004b991ffbaffa05d520bf1e9 (patch) | |
tree | 2e10210ee1a4d5d81a37e19727e0cd3f4eb63994 | |
parent | 428faf84539f398a088ce16aa16c8e77ed30343f (diff) |
Allow passing of 'allow_pkgpart' and 'import' flags up the chain to FS::cust_pkg->insert
-rw-r--r-- | FS/FS/cust_main/Packages.pm | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/FS/FS/cust_main/Packages.pm b/FS/FS/cust_main/Packages.pm index 152c496d1..a7418f7f0 100644 --- a/FS/FS/cust_main/Packages.pm +++ b/FS/FS/cust_main/Packages.pm @@ -1,7 +1,6 @@ package FS::cust_main::Packages; use strict; -use vars qw( $DEBUG $me ); use List::Util qw( min ); use FS::UID qw( dbh ); use FS::Record qw( qsearch qsearchs ); @@ -10,8 +9,7 @@ use FS::cust_svc; use FS::contact; # for attach_pkgs use FS::cust_location; # -$DEBUG = 0; -$me = '[FS::cust_main::Packages]'; +our ($DEBUG, $me) = (0, '[FS::cust_main::Packages]'); =head1 NAME @@ -89,7 +87,7 @@ sub order_pkg { if exists($opt->{'depend_jobnum'}) && $opt->{'depend_jobnum'}; my %insert_params = map { $opt->{$_} ? ( $_ => $opt->{$_} ) : () } - qw( ticket_subject ticket_queue allow_pkgpart ); + qw( ticket_subject ticket_queue allow_pkgpart import ); local $SIG{HUP} = 'IGNORE'; local $SIG{INT} = 'IGNORE'; @@ -228,7 +226,8 @@ Services can be new, in which case they are inserted, or existing unaudited services, in which case they are linked to the newly-created package. Currently available options are: I<depend_jobnum>, I<noexport>, I<seconds_ref>, -I<upbytes_ref>, I<downbytes_ref>, and I<totalbytes_ref>. +I<upbytes_ref>, I<downbytes_ref>, I<totalbytes_ref>, I<allow_pkgpart>, and +I<import>. If I<depend_jobnum> is set, all provisioning jobs will have a dependancy on the supplied jobnum (they will not run until the specific job completes). @@ -245,6 +244,8 @@ If I<seconds_ref>, I<upbytes_ref>, I<downbytes_ref>, or I<totalbytes_ref> is provided, the scalars (provided by references) will be incremented by the values of the prepaid card.` +I<allow_pkgpart> and I<import> are flags passed to L<FS::cust_pkg>->insert. + =cut sub order_pkgs { @@ -277,7 +278,7 @@ sub order_pkgs { 'cust_pkg' => $cust_pkg, 'svcs' => $cust_pkgs->{$cust_pkg}, map { $_ => $options{$_} } - qw( seconds_ref upbytes_ref downbytes_ref totalbytes_ref depend_jobnum ) + qw( seconds_ref upbytes_ref downbytes_ref totalbytes_ref depend_jobnum allow_pkgpart import ) ); if ( $error ) { $dbh->rollback if $oldAutoCommit; |