[freeside-commits] freeside/FS/FS cust_pkg.pm, 1.174, 1.175 part_pkg_option.pm, 1.3, 1.4

Mark Wells mark at wavetail.420.am
Sat Oct 23 01:33:32 PDT 2010


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv24014

Modified Files:
	cust_pkg.pm part_pkg_option.pm 
Log Message:
fix contract_end bug, RT#10319

Index: part_pkg_option.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg_option.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -d -r1.3 -r1.4
--- part_pkg_option.pm	23 Apr 2009 20:34:13 -0000	1.3
+++ part_pkg_option.pm	23 Oct 2010 08:33:30 -0000	1.4
@@ -137,6 +137,10 @@
   $sth = dbh->prepare($sql) or die dbh->errstr;
   $sth->execute or die $sth->errstr;
 
+  $sql = "UPDATE part_pkg_option SET optionvalue = NULL WHERE ".
+            "optionname = 'contract_end_months' AND optionvalue = '(none)'";
+  $sth = dbh->prepare($sql) or die dbh->errstr;
+  $sth->execute or die $sth->errstr;
   '';
 
 }

Index: cust_pkg.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_pkg.pm,v
retrieving revision 1.174
retrieving revision 1.175
diff -u -w -d -r1.174 -r1.175
--- cust_pkg.pm	22 Oct 2010 09:03:46 -0000	1.174
+++ cust_pkg.pm	23 Oct 2010 08:33:30 -0000	1.175
@@ -3251,6 +3251,9 @@
 sub _upgrade_data {  # class method
   my ($class, %opts) = @_;
   $class->_upgrade_otaker(%opts);
+  my $sql =('UPDATE cust_pkg SET contract_end = NULL WHERE contract_end = -1');
+  my $sth = dbh->prepare($sql);
+  $sth->execute or die $sth->errstr;
 }
 
 =back



More information about the freeside-commits mailing list