[freeside-commits] freeside/FS/FS cust_pkg.pm,1.73.2.28,1.73.2.29
Jeff Finucane,420,,
jeff at wavetail.420.am
Tue Mar 24 06:39:29 PDT 2009
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv26323
Modified Files:
Tag: FREESIDE_1_7_BRANCH
cust_pkg.pm
Log Message:
get 2884 backport in the loop
Index: cust_pkg.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_pkg.pm,v
retrieving revision 1.73.2.28
retrieving revision 1.73.2.29
diff -u -d -r1.73.2.28 -r1.73.2.29
--- cust_pkg.pm 24 Mar 2009 04:36:15 -0000 1.73.2.28
+++ cust_pkg.pm 24 Mar 2009 13:39:27 -0000 1.73.2.29
@@ -2155,17 +2155,19 @@
}
#reset usage if changing pkgpart
- if ($old_pkg->pkgpart != $new_pkg->pkgpart) {
- my $part_pkg = $new_pkg->part_pkg;
- $error = $part_pkg->reset_usage($new_pkg, $part_pkg->is_prepaid
- ? ()
- : ( 'null' => 1 )
- )
- if $part_pkg->can('reset_usage');
+ foreach my $new_pkg (@$return_cust_pkg) {
+ if ($old_pkg->pkgpart != $new_pkg->pkgpart) {
+ my $part_pkg = $new_pkg->part_pkg;
+ $error = $part_pkg->reset_usage($new_pkg, $part_pkg->is_prepaid
+ ? ()
+ : ( 'null' => 1 )
+ )
+ if $part_pkg->can('reset_usage');
- if ($error) {
- $dbh->rollback if $oldAutoCommit;
- return "Error setting usage values: $error";
+ if ($error) {
+ $dbh->rollback if $oldAutoCommit;
+ return "Error setting usage values: $error";
+ }
}
}
More information about the freeside-commits
mailing list