X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fcust_pkg.pm;h=54119b50efbd721274cd44e71999d9e595d03f26;hp=d67c02c0d0166e2b0d607bd6b80b9896e84d2627;hb=eb0c2344279127d3ea49aa090e096594e0556359;hpb=68c776b1b81217be620c9a4212d6652cc44452e5 diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm index d67c02c0d..54119b50e 100644 --- a/FS/FS/cust_pkg.pm +++ b/FS/FS/cust_pkg.pm @@ -1350,12 +1350,16 @@ sub change { $hash{$_} = '' foreach qw(setup bill last_bill); } + # allow $opt->{'locationnum'} = '' to specifically set it to null + # (i.e. customer default location) + $opt->{'locationnum'} = $self->locationnum if !exists($opt->{'locationnum'}); + # Create the new package. my $cust_pkg = new FS::cust_pkg { custnum => $self->custnum, pkgpart => ( $opt->{'pkgpart'} || $self->pkgpart ), refnum => ( $opt->{'refnum'} || $self->refnum ), - locationnum => ( $opt->{'locationnum'} || $self->locationnum ), + locationnum => ( $opt->{'locationnum'} ), %hash, };