[freeside-commits] freeside/FS/FS cust_credit.pm,1.28,1.29
Ivan,,,
ivan at wavetail.420.am
Thu Dec 6 17:08:48 PST 2007
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail:/tmp/cvs-serv17270/FS/FS
Modified Files:
cust_credit.pm
Log Message:
doh! is not an object. let's call it , mmkay
Index: cust_credit.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_credit.pm,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- cust_credit.pm 7 Dec 2007 01:04:59 -0000 1.28
+++ cust_credit.pm 7 Dec 2007 01:08:46 -0000 1.29
@@ -410,15 +410,15 @@
#
sub _upgrade_data { # class method
- my ($self, %opts) = @_;
+ my ($class, %opts) = @_;
- warn "$me upgrading $self\n" if $DEBUG;
+ warn "$me upgrading $class\n" if $DEBUG;
- if (defined dbdef->table($self->table)->column('reason')) {
+ if (defined dbdef->table($class->table)->column('reason')) {
warn "$me Checking for unmigrated reasons\n" if $DEBUG;
- my @cust_credits = qsearch({ 'table' => $self->table,
+ my @cust_credits = qsearch({ 'table' => $class->table,
'hashref' => {},
'extrasql' => 'WHERE reason IS NOT NULL',
});
@@ -430,7 +430,7 @@
unless ($reason_type) {
$reason_type = new FS::reason_type( $hashref );
my $error = $reason_type->insert();
- die "$self had error inserting FS::reason_type into database: $error\n"
+ die "$class had error inserting FS::reason_type into database: $error\n"
if $error;
}
@@ -458,8 +458,8 @@
$cust_credit->setfield('reason', '');
my $error = $cust_credit->replace;
- warn "*** WARNING: error replacing reason in $self ".
- $self->crednum. ": $error ***\n"
+ warn "*** WARNING: error replacing reason in $class ".
+ $cust_credit->crednum. ": $error ***\n"
if $error;
}
}
@@ -475,7 +475,7 @@
unless ($reason_type) {
$reason_type = new FS::reason_type( $hashref );
my $error = $reason_type->insert();
- die "$self had error inserting FS::reason_type into database: $error\n"
+ die "$class had error inserting FS::reason_type into database: $error\n"
if $error;
}
# or clause for 1.7.x
@@ -490,7 +490,7 @@
unless ($reason_type) {
$reason_type = new FS::reason_type( $hashref );
my $error = $reason_type->insert();
- die "$self had error inserting FS::reason_type into database: $error\n"
+ die "$class had error inserting FS::reason_type into database: $error\n"
if $error;
}
More information about the freeside-commits
mailing list