diff options
author | Mark Wells <mark@freeside.biz> | 2013-03-29 23:15:21 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2013-03-29 23:15:21 -0700 |
commit | a59da6000c99b8fa3f391122900c44735593f544 (patch) | |
tree | c6619bd01455cbe57df9b4b9fc532c1f8112c89e /FS/FS/cust_bill_pkg.pm | |
parent | 75ddd5240b233dd45f1d748f628e01238be0e751 (diff) |
better detection of new locations that are the same as existing locations, #940, #13763, #14717
Diffstat (limited to 'FS/FS/cust_bill_pkg.pm')
-rw-r--r-- | FS/FS/cust_bill_pkg.pm | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/FS/FS/cust_bill_pkg.pm b/FS/FS/cust_bill_pkg.pm index 716c098..d8cbf59 100644 --- a/FS/FS/cust_bill_pkg.pm +++ b/FS/FS/cust_bill_pkg.pm @@ -1104,8 +1104,7 @@ sub upgrade_tax_location { delete @hash{qw(censustract censusyear latitude longitude coord_auto)}; $hash{custnum} = $h_cust_main->custnum; - my $tax_loc = qsearchs('cust_location', \%hash) # unlikely - || FS::cust_location->new({ %hash }); + my $tax_loc = FS::cust_location->new_or_existing(\%hash); if ( !$tax_loc->locationnum ) { $tax_loc->disabled('Y'); my $error = $tax_loc->insert; |