X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_pkg%2FAPI.pm;h=837cf40cc717f8bc9b48fc08420819800b71ae64;hb=d7dd43d69c648433cd34f26a339465452082a097;hp=6e03b8e75175fde5ac57ef008146e56ff5354977;hpb=b7f8a7cfd566881a6d89117d17e391ceb58097d4;p=freeside.git diff --git a/FS/FS/cust_pkg/API.pm b/FS/FS/cust_pkg/API.pm index 6e03b8e75..837cf40cc 100644 --- a/FS/FS/cust_pkg/API.pm +++ b/FS/FS/cust_pkg/API.pm @@ -2,8 +2,6 @@ package FS::cust_pkg::API; use strict; -use FS::cust_location::API; - sub API_getinfo { my $self = shift; @@ -19,13 +17,29 @@ sub API_change { my %opt = @_; return { 'error' => 'Cannot change canceled package' } - if $self->cancel; + if $self->get('cancel'); my %changeopt; # update location--accepts raw fields OR location my %location_hash; - foreach my $field (FS::cust_location::API::API_editable_fields()) { + foreach my $field ( qw( + locationname + address1 + address2 + city + county + state + zip + addr_clean + country + censustract + censusyear + location_type + location_number + location_kind + incorporated + ) ) { $location_hash{$field} = $opt{$field} if $opt{$field}; } return { 'error' => 'Cannot pass both locationnum and location fields' }