projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
qualification address handling changes, RT#7111
[freeside.git]
/
FS
/
FS
/
qual.pm
diff --git
a/FS/FS/qual.pm
b/FS/FS/qual.pm
index
e748382
..
d0b3fbd
100644
(file)
--- 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'};
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;
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',
my $self = shift;
if ( $self->locationnum ) {
my $l = qsearchs( 'cust_location',
@@
-206,9
+207,9
@@
sub location {
return %loc_hash;
}
}
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 {
}
sub cust_or_prospect {