diff options
Diffstat (limited to 'FS')
| -rw-r--r-- | FS/FS/cust_pkg.pm | 6 | 
1 files changed, 5 insertions, 1 deletions
| 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,    }; | 
