diff options
author | Ivan Kohler <ivan@freeside.biz> | 2013-05-08 13:38:38 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2013-05-08 13:38:38 -0700 |
commit | d2714607b1002c73a7e5c624de985c7b60d20338 (patch) | |
tree | bc61c30a8dd820ab8aa1a6a381f6421e6f77ddca /FS | |
parent | 66720bf1f5bae4b1d4022eabff456c247447fbc1 (diff) |
fix cch update removal of PLUS4/ZIP and TXMATRIX, RT#21687
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/cust_tax_location.pm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/FS/FS/cust_tax_location.pm b/FS/FS/cust_tax_location.pm index aec941045..4293b2c90 100644 --- a/FS/FS/cust_tax_location.pm +++ b/FS/FS/cust_tax_location.pm @@ -199,13 +199,15 @@ sub batch_import { if (exists($hash->{actionflag}) && $hash->{actionflag} eq 'D') { delete($hash->{actionflag}); - my $cust_tax_location = qsearchs('cust_tax_location', $hash); + my @cust_tax_location = qsearch('cust_tax_location', $hash); return "Can't find cust_tax_location to delete: ". join(" ", map { "$_ => ". $hash->{$_} } @fields) - unless $cust_tax_location; + unless scalar(@cust_tax_location) || $param->{'delete_only'} ; - my $error = $cust_tax_location->delete; - return $error if $error; + foreach my $cust_tax_location (@cust_tax_location) { + my $error = $cust_tax_location->delete; + return $error if $error; + } delete($hash->{$_}) foreach (keys %$hash); } |