[freeside-commits] freeside/FS/FS part_pkg.pm,1.115,1.116
Mark Wells
mark at wavetail.420.am
Fri Dec 24 02:45:09 PST 2010
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv25664
Modified Files:
part_pkg.pm
Log Message:
upgrade unused_credit option, RT#10670
Index: part_pkg.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg.pm,v
retrieving revision 1.115
retrieving revision 1.116
diff -u -w -d -r1.115 -r1.116
--- part_pkg.pm 24 Dec 2010 09:49:31 -0000 1.115
+++ part_pkg.pm 24 Dec 2010 10:45:06 -0000 1.116
@@ -1459,6 +1459,25 @@
die $error if $error;
}
+ my @part_pkg_option = qsearch('part_pkg_option',
+ { 'optionname' => 'unused_credit',
+ 'optionvalue' => 1,
+ });
+ foreach my $old_opt (@part_pkg_option) {
+ my $pkgpart = $old_opt->pkgpart;
+ my $error = $old_opt->delete;
+ die $error if $error;
+
+ foreach (qw(unused_credit_cancel unused_credit_change)) {
+ my $new_opt = new FS::part_pkg_option {
+ 'pkgpart' => $pkgpart,
+ 'optionname' => $_,
+ 'optionvalue' => 1,
+ };
+ $error = $new_opt->insert;
+ die $error if $error;
+ }
+ }
}
=item curuser_pkgs_sql
More information about the freeside-commits
mailing list