X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FRecord.pm;h=c8216eca83cf3f4f684ba49e7ec9eea3a3e89813;hb=e042c7a9463af50a08cab6ddfcd62fed2b5f276e;hp=11afd9ff6b0d4a360dbfea29ce96546a1fc0d522;hpb=283ea2b5137ae3ec36882b492e6de024b0ce6027;p=freeside.git diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm index 11afd9ff6..c8216eca8 100644 --- a/FS/FS/Record.pm +++ b/FS/FS/Record.pm @@ -1988,6 +1988,22 @@ sub ut_money { ''; } +=item ut_moneyn COLUMN + +Check/untaint monetary numbers. May be negative. If there +is an error, returns the error, otherwise returns false. + +=cut + +sub ut_moneyn { + my($self,$field)=@_; + if ($self->getfield($field) eq '') { + $self->setfield($field, ''); + return ''; + } + $self->ut_money($field); +} + =item ut_text COLUMN Check/untaint text. Alphanumerics, spaces, and the following punctuation