projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RT#20687: Future package change [comment about bug fix]
[freeside.git]
/
FS
/
FS
/
cust_pkg.pm
diff --git
a/FS/FS/cust_pkg.pm
b/FS/FS/cust_pkg.pm
index
7845ea8
..
dcbcfeb
100644
(file)
--- a/
FS/FS/cust_pkg.pm
+++ b/
FS/FS/cust_pkg.pm
@@
-2043,7
+2043,7
@@
sub change {
return "modifying package: $error";
} else {
$dbh->commit if $oldAutoCommit;
return "modifying package: $error";
} else {
$dbh->commit if $oldAutoCommit;
- return
''
;
+ return
$self
;
}
}
}
}
@@
-2415,8
+2415,10
@@
sub change_later {
$error = $self->replace ||
$err_or_pkg->replace ||
$error = $self->replace ||
$err_or_pkg->replace ||
- $change_to->cancel('no_delay_cancel' => 1) ||
- $change_to->delete;
+ #because change() might've edited existing scheduled change in place
+ (($err_or_pkg->pkgnum == $change_to->pkgnum) ? '' :
+ $change_to->cancel('no_delay_cancel' => 1) ||
+ $change_to->delete);
} else {
$error = $err_or_pkg;
}
} else {
$error = $err_or_pkg;
}
@@
-3723,6
+3725,7
@@
Returns the parent customer object (see L<FS::cust_main>).
sub cust_main {
my $self = shift;
sub cust_main {
my $self = shift;
+ cluck 'cust_pkg->cust_main called' if $DEBUG;
qsearchs( 'cust_main', { 'custnum' => $self->custnum } );
}
qsearchs( 'cust_main', { 'custnum' => $self->custnum } );
}