projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
34c3b60
)
transfer invoice notes when changing packages, #23552
author
Mark Wells
<mark@freeside.biz>
Thu, 13 Jun 2013 01:01:01 +0000
(18:01 -0700)
committer
Mark Wells
<mark@freeside.biz>
Thu, 13 Jun 2013 01:01:01 +0000
(18:01 -0700)
FS/FS/cust_pkg.pm
patch
|
blob
|
history
diff --git
a/FS/FS/cust_pkg.pm
b/FS/FS/cust_pkg.pm
index
a1d6556
..
ce07bee
100644
(file)
--- a/
FS/FS/cust_pkg.pm
+++ b/
FS/FS/cust_pkg.pm
@@
-1925,6
+1925,18
@@
sub change {
}
}
}
}
+ # transfer (copy) invoice details
+ foreach my $detail ($self->cust_pkg_detail) {
+ my $new_detail = FS::cust_pkg_detail->new({ $detail->hash });
+ $new_detail->set('pkgdetailnum', '');
+ $new_detail->set('pkgnum', $cust_pkg->pkgnum);
+ $error = $new_detail->insert;
+ if ( $error ) {
+ $dbh->rollback if $oldAutoCommit;
+ return "Error transferring package notes: $error";
+ }
+ }
+
# Order any supplemental packages.
my $part_pkg = $cust_pkg->part_pkg;
my @old_supp_pkgs = $self->supplemental_pkgs;
# Order any supplemental packages.
my $part_pkg = $cust_pkg->part_pkg;
my @old_supp_pkgs = $self->supplemental_pkgs;