[freeside-commits] freeside/FS/FS cust_credit.pm, 1.24.2.4, 1.24.2.5 h_cust_credit.pm, NONE, 1.1.2.1

Jeff Finucane,420,, jeff at wavetail.420.am
Tue Dec 11 21:42:51 PST 2007


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

Modified Files:
      Tag: FREESIDE_1_7_BRANCH
	cust_credit.pm 
Added Files:
      Tag: FREESIDE_1_7_BRANCH
	h_cust_credit.pm 
Log Message:
cust_credit reason improvement, bugfix, and tool

Index: cust_credit.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_credit.pm,v
retrieving revision 1.24.2.4
retrieving revision 1.24.2.5
diff -u -d -r1.24.2.4 -r1.24.2.5
--- cust_credit.pm	7 Dec 2007 01:08:47 -0000	1.24.2.4
+++ cust_credit.pm	12 Dec 2007 05:42:48 -0000	1.24.2.5
@@ -280,7 +280,7 @@
 
   $self->_date(time) unless $self->_date;
 
-  $self->otaker(getotaker);
+  $self->otaker(getotaker) unless ($self->otaker);
 
   $self->SUPER::check;
 }
@@ -388,6 +388,7 @@
     if (!$reason && $typenum) {
       $reason = new FS::reason( { 'reason_type' => $typenum,
                                   'reason' => $value,
+                                  'disabled' => 'Y', 
                               } );
       $reason->insert and $reason = undef;
     }
@@ -439,6 +440,7 @@
                  };
       my $noreason = qsearchs( 'reason', $hashref );
       unless ($noreason) {
+        $hashref->{'disabled'} = 'Y';
         $noreason = new FS::reason( $hashref );
         my $error  = $noreason->insert();
         die "can't insert legacy reason '(none)' into database: $error\n"

--- NEW FILE: h_cust_credit.pm ---
package FS::h_cust_credit;

use strict;
use vars qw( @ISA );
use FS::h_Common;
use FS::cust_credit;

@ISA = qw( FS::h_Common FS::cust_credit );

sub table { 'h_cust_credit' };

=head1 NAME

FS::h_cust_credit - Historical record of customer credit changes

=head1 SYNOPSIS

=head1 DESCRIPTION

An FS::h_cust_credit object represents historical changes to credits.
FS::h_cust_credit inherits from FS::h_Common and FS::cust_credit.

=head1 BUGS

=head1 SEE ALSO

L<FS::cust_credit>,  L<FS::h_Common>, L<FS::Record>, schema.html from the base
documentation.

=cut

1;




More information about the freeside-commits mailing list