[freeside-commits] freeside/FS/FS cust_credit.pm, 1.24.2.3, 1.24.2.4

Ivan,,, ivan at wavetail.420.am
Thu Dec 6 17:08:49 PST 2007


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail:/tmp/cvs-serv17274/FS/FS

Modified Files:
      Tag: FREESIDE_1_7_BRANCH
	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.24.2.3
retrieving revision 1.24.2.4
diff -u -d -r1.24.2.3 -r1.24.2.4
--- cust_credit.pm	7 Dec 2007 01:05:00 -0000	1.24.2.3
+++ cust_credit.pm	7 Dec 2007 01:08:47 -0000	1.24.2.4
@@ -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