summaryrefslogtreecommitdiff
path: root/FS/FS/Record.pm
diff options
context:
space:
mode:
authorjeff <jeff>2009-08-17 20:48:27 +0000
committerjeff <jeff>2009-08-17 20:48:27 +0000
commit36ac94ae711ab27d5f8d352ed7d2cba2e872ac31 (patch)
tree3ecc62eb0f812e38e96a0547db81974c62864718 /FS/FS/Record.pm
parent05820654d27caed7679d9e475d6763acaff38806 (diff)
improve emailed cdr csv file (#5727 again)
Diffstat (limited to 'FS/FS/Record.pm')
-rw-r--r--FS/FS/Record.pm16
1 files changed, 16 insertions, 0 deletions
diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm
index 11afd9f..c8216ec 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