- my $cust_location = FS::cust_location->new({
- 'custnum' => $cust_pkg->custnum,
- %location_hash,
- });
- $changeopt{'cust_location'} = $cust_location;
+ foreach my $field ('locationnum',FS::cust_location::API::API_editable_fields()) {
+ $changeopt{$field} = $opt{$field} if $opt{$field};
+ }