diff options
| author | mark <mark> | 2012-01-13 10:15:41 +0000 | 
|---|---|---|
| committer | mark <mark> | 2012-01-13 10:15:41 +0000 | 
| commit | eb0c2344279127d3ea49aa090e096594e0556359 (patch) | |
| tree | ad6360c81ddce8b8b8d833ed4c84195836724c2d /FS | |
| parent | 68c776b1b81217be620c9a4212d6652cc44452e5 (diff) | |
package location change bugfix
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,    }; | 
