From 5bd39b3a93605d45b74b3cfcc447a1f64633ba7d Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 12 Jan 2011 06:26:42 +0000 Subject: fix otaker getting inserted and messing up discount reports; upgrade fixes db, RT#10876 --- FS/FS/cust_pkg_discount.pm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'FS/FS/cust_pkg_discount.pm') diff --git a/FS/FS/cust_pkg_discount.pm b/FS/FS/cust_pkg_discount.pm index 3770a2b..7b6b203 100644 --- a/FS/FS/cust_pkg_discount.pm +++ b/FS/FS/cust_pkg_discount.pm @@ -165,10 +165,13 @@ sub check { || $self->ut_float('months_used') #actually decimal, but this will do || $self->ut_numbern('end_date') || $self->ut_alphan('otaker') + || $self->ut_numbern('usernum') || $self->ut_enum('disabled', [ '', 'Y' ] ) ; return $error if $error; + $self->usernum($FS::CurrentUser::CurrentUser->usernum) unless $self->usernum; + $self->SUPER::check; } -- cgit v1.1