X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fqual.pm;h=d0b3fbdfe8624c79ff4219d4ea1111339bea2026;hb=528e7e1cb1a6d05f87847bf9fd9b7e0e9fc33f6f;hp=e7483825f51f4f099d7d244144f15683d818f27f;hpb=4e76632c66f001a4f4d97aadc308038172eaeaa7;p=freeside.git diff --git a/FS/FS/qual.pm b/FS/FS/qual.pm index e7483825f..d0b3fbdfe 100644 --- a/FS/FS/qual.pm +++ b/FS/FS/qual.pm @@ -91,7 +91,8 @@ sub insert { if ( $options{'cust_location'} ) { my $cust_location = $options{'cust_location'}; - my $error = $cust_location->insert; + my $method = $cust_location->locationnum ? 'replace' : 'insert'; + my $error = $cust_location->$method(); if ( $error ) { $dbh->rollback if $oldAutoCommit; return $error; @@ -184,7 +185,7 @@ sub part_export { ''; } -sub location { +sub location_hash { my $self = shift; if ( $self->locationnum ) { my $l = qsearchs( 'cust_location', @@ -206,9 +207,9 @@ sub location { return %loc_hash; } } - # prospectnum does not imply any particular address! must specify locationnum - ''; + warn "prospectnum does not imply any particular address! must specify locationnum"; + return (); } sub cust_or_prospect {