[freeside-commits] branch FREESIDE_3_BRANCH updated. 7826d94a99cc23f5cf857c802cb7e1351a85881d
Mark Wells
mark at 420.am
Wed Jun 12 18:01:42 PDT 2013
The branch, FREESIDE_3_BRANCH has been updated
via 7826d94a99cc23f5cf857c802cb7e1351a85881d (commit)
from 34c3b60c76f0ade9d4f7507732666ac8b9f81b67 (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 7826d94a99cc23f5cf857c802cb7e1351a85881d
Author: Mark Wells <mark at freeside.biz>
Date: Wed Jun 12 18:01:01 2013 -0700
transfer invoice notes when changing packages, #23552
diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm
index a1d6556..ce07bee 100644
--- 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;
-----------------------------------------------------------------------
Summary of changes:
FS/FS/cust_pkg.pm | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
More information about the freeside-commits
mailing list