diff options
author | ivan <ivan> | 2011-01-12 06:26:42 +0000 |
---|---|---|
committer | ivan <ivan> | 2011-01-12 06:26:42 +0000 |
commit | 5bd39b3a93605d45b74b3cfcc447a1f64633ba7d (patch) | |
tree | 38c702d003173d9bbd5d4946fa8a623af99697c0 /FS/FS/cust_pkg_discount.pm | |
parent | f09bfd28e16b27d8d62c81abebb8062223ce0114 (diff) |
fix otaker getting inserted and messing up discount reports; upgrade fixes db, RT#10876
Diffstat (limited to 'FS/FS/cust_pkg_discount.pm')
-rw-r--r-- | FS/FS/cust_pkg_discount.pm | 3 |
1 files changed, 3 insertions, 0 deletions
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; } |