[freeside-commits] branch master updated. ae35e72d469042f3991d851bf468d4e8b7269c46
Mark Wells
mark at 420.am
Wed Jun 12 18:01:43 PDT 2013
The branch, master has been updated
via ae35e72d469042f3991d851bf468d4e8b7269c46 (commit)
from b1f912afdb22b59e8849cc4db7c6d46a8a49c124 (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 ae35e72d469042f3991d851bf468d4e8b7269c46
Author: Mark Wells <mark at freeside.biz>
Date: Wed Jun 12 18:01:28 2013 -0700
transfer invoice notes when changing packages, #23552
diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm
index 1c9d8e1..ddfab5d 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