projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
701d8f3
)
fix contract_end bug, RT#10319
author
mark
<mark>
Sat, 23 Oct 2010 08:33:30 +0000
(08:33 +0000)
committer
mark
<mark>
Sat, 23 Oct 2010 08:33:30 +0000
(08:33 +0000)
FS/FS/cust_pkg.pm
patch
|
blob
|
history
FS/FS/part_pkg_option.pm
patch
|
blob
|
history
diff --git
a/FS/FS/cust_pkg.pm
b/FS/FS/cust_pkg.pm
index
cad18b6
..
c810f13
100644
(file)
--- a/
FS/FS/cust_pkg.pm
+++ b/
FS/FS/cust_pkg.pm
@@
-3251,6
+3251,9
@@
sub bulk_change {
sub _upgrade_data { # class method
my ($class, %opts) = @_;
$class->_upgrade_otaker(%opts);
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
}
=back
diff --git
a/FS/FS/part_pkg_option.pm
b/FS/FS/part_pkg_option.pm
index
3cb330b
..
142622b
100644
(file)
--- a/
FS/FS/part_pkg_option.pm
+++ b/
FS/FS/part_pkg_option.pm
@@
-137,6
+137,10
@@
sub _upgrade_data { # class method
$sth = dbh->prepare($sql) or die dbh->errstr;
$sth->execute or die $sth->errstr;
$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;
'';
}
'';
}