X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_pkg.pm;h=d39dbbbcd1a1202e7613b5e5ca8de99ccf3b936e;hb=121510b6337b7f75f25d583730a65f3fc63bbfbe;hp=f29ab9fc0ccfb664387f45444b569a8a7dac800c;hpb=d5988a9f7a3617de33da3058f2e9f1151b24420e;p=freeside.git diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm index f29ab9fc0..d39dbbbcd 100644 --- a/FS/FS/cust_pkg.pm +++ b/FS/FS/cust_pkg.pm @@ -5614,6 +5614,8 @@ sub _X_show_zero { =item order CUSTNUM, PKGPARTS_ARYREF, [ REMOVE_PKGNUMS_ARYREF [ RETURN_CUST_PKG_ARRAYREF [ REFNUM ] ] ] +=item order \%PARAMS + Bulk cancel + order subroutine. Perhaps slightly deprecated, only used by the bulk cancel+order in the web UI and nowhere else (edit/process/cust_pkg.cgi) @@ -5638,10 +5640,25 @@ setting I to an array reference of refnums or a hash reference with refnums as keys. If no I is defined, a default FS::pkg_referral record will be created corresponding to cust_main.refnum. +LOCATIONNUM, if specified, will be set on newly created cust_pkg records + =cut sub order { - my ($custnum, $pkgparts, $remove_pkgnum, $return_cust_pkg, $refnum) = @_; + my ($custnum, $pkgparts, $remove_pkgnum, $return_cust_pkg, $refnum, + $locationnum); + + if ( ref $_[0] ) { + my $args = $_[0]; + $custnum = $args->{custnum}; + $pkgparts = $args->{pkgparts}; + $remove_pkgnum = $args->{remove_pkgnum}; + $return_cust_pkg = $args->{return_cust_pkg}; + $refnum = $args->{refnum}; + $locationnum = $args->{locationnum}; + } else { + ($custnum, $pkgparts, $remove_pkgnum, $return_cust_pkg, $refnum) = @_; + } my $conf = new FS::Conf; @@ -5685,6 +5702,8 @@ sub order { } + $hash{locationnum} = $locationnum if $locationnum; + # Create the new packages. foreach my $pkgpart (@$pkgparts) {