X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fbanned_pay.pm;h=337965324d1849b71e8f91d816d4667a13527e79;hb=f9a181e4c2e505df84de16190ee3b75011326f3f;hp=1ad87f508777f92c0381c050f9c2232f3df6bf27;hpb=c8cccb4a92adceb943c635fe62dad0d034462ce0;p=freeside.git diff --git a/FS/FS/banned_pay.pm b/FS/FS/banned_pay.pm index 1ad87f508..337965324 100644 --- a/FS/FS/banned_pay.pm +++ b/FS/FS/banned_pay.pm @@ -1,11 +1,10 @@ package FS::banned_pay; use strict; -use vars qw( @ISA ); +use base qw( FS::otaker_Mixin FS::Record ); use FS::Record qw( qsearch qsearchs ); use FS::UID qw( getotaker ); - -@ISA = qw(FS::Record); +use FS::CurrentUser; =head1 NAME @@ -43,7 +42,7 @@ supported: =item _date - specified as a UNIX timestamp; see L. Also see L and L for conversion functions. -=item otaker - order taker (assigned automatically, see L) +=item usernum - order taker (assigned automatically, see L) =item reason - reason (text) @@ -117,11 +116,17 @@ sub check { $self->_date(time) unless $self->_date; - $self->otaker(getotaker); + $self->usernum($FS::CurrentUser::CurrentUser->usernum) unless $self->usernum; $self->SUPER::check; } +# Used by FS::Upgrade to migrate to a new database. +sub _upgrade_data { # class method + my ($class, %opts) = @_; + $class->_upgrade_otaker(%opts); +} + =back =head1 BUGS