From: Rob Van Dam Date: Thu, 17 Oct 2013 17:43:27 +0000 (-0600) Subject: Allow passing of 'allow_pkgpart' and 'import' flags up the chain to FS::cust_pkg... X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=4ad88e4863417a9004b991ffbaffa05d520bf1e9 Allow passing of 'allow_pkgpart' and 'import' flags up the chain to FS::cust_pkg->insert --- 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, I, I, -I, I, and I. +I, I, I, I, and +I. If I 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, I, I, or I is provided, the scalars (provided by references) will be incremented by the values of the prepaid card.` +I and I are flags passed to L->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;