diff options
author | Mitch Jackson <mitch@freeside.biz> | 2018-11-27 15:39:01 -0500 |
---|---|---|
committer | Mitch Jackson <mitch@freeside.biz> | 2018-11-27 22:05:34 -0500 |
commit | a93ae1b61766bcfedc2a01b964d08dd28e5c84da (patch) | |
tree | ef00522484bb199a94fae8f0e92591bd9d137b03 /FS/FS/cust_pkg.pm | |
parent | eef059d5ac83912bf16e5647bd7af1a462ea32b1 (diff) |
RT# 32243 Package Bulk Edit UI Update
Diffstat (limited to 'FS/FS/cust_pkg.pm')
-rw-r--r-- | FS/FS/cust_pkg.pm | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm index 63fc663..5ea4c40 100644 --- a/FS/FS/cust_pkg.pm +++ b/FS/FS/cust_pkg.pm @@ -5615,6 +5615,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) @@ -5639,10 +5641,25 @@ setting I<refnum> to an array reference of refnums or a hash reference with refnums as keys. If no I<refnum> 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; @@ -5686,6 +5703,8 @@ sub order { } + $hash{locationnum} = $locationnum if $locationnum; + # Create the new packages. foreach my $pkgpart (@$pkgparts) { |