[freeside-commits] branch master updated. cc7638ffbd4dea4dfd4acc7c020541af710c7cf1
Mark Wells
mark at 420.am
Mon Jan 27 13:27:06 PST 2014
The branch, master has been updated
via cc7638ffbd4dea4dfd4acc7c020541af710c7cf1 (commit)
from d7b759d8d95114f5bc9acc3cf9666eaccbd4bfd8 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit cc7638ffbd4dea4dfd4acc7c020541af710c7cf1
Author: Mark Wells <mark at freeside.biz>
Date: Mon Jan 27 13:27:00 2014 -0800
even better error messages, #27194
diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm
index 088eee9..1e4cc9b 100644
--- a/FS/FS/cust_pkg.pm
+++ b/FS/FS/cust_pkg.pm
@@ -3541,6 +3541,7 @@ sub transfer {
}
}
+ my $error;
foreach my $cust_svc ($self->cust_svc) {
my $svcnum = $cust_svc->svcnum;
if($target{$cust_svc->svcpart} > 0
@@ -3548,8 +3549,7 @@ sub transfer {
$target{$cust_svc->svcpart}--;
my $new = new FS::cust_svc { $cust_svc->hash };
$new->pkgnum($dest_pkgnum);
- my $error = $new->replace($cust_svc);
- return "svcnum $svcnum: $error" if $error;
+ $error = $new->replace($cust_svc);
} elsif ( exists $opt{'change_svcpart'} && $opt{'change_svcpart'} ) {
if ( $DEBUG ) {
warn "looking for alternates for svcpart ". $cust_svc->svcpart. "\n";
@@ -3569,14 +3569,17 @@ sub transfer {
my $new = new FS::cust_svc { $cust_svc->hash };
$new->svcpart($change_svcpart);
$new->pkgnum($dest_pkgnum);
- my $error = $new->replace($cust_svc);
- return "svcnum $svcnum: $error" if $error;
+ $error = $new->replace($cust_svc);
} else {
$remaining++;
}
} else {
$remaining++
}
+ if ( $error ) {
+ my @label = $cust_svc->label;
+ return "service $label[1]: $error";
+ }
}
return $remaining;
}
-----------------------------------------------------------------------
Summary of changes:
FS/FS/cust_pkg.pm | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
More information about the freeside-commits
mailing list