diff options
author | Ivan Kohler <ivan@freeside.biz> | 2014-01-29 14:34:42 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2014-01-29 14:34:42 -0800 |
commit | 6f2c82d6c4cd6ded9bfea2518e99cc4147dfa0c1 (patch) | |
tree | 49b9c26e879157b06e8150e140d342bd96543f8c /FS/FS/tax_rate.pm | |
parent | 0654d57f76f9a7ac4544da7ecc65cb924fe67d05 (diff) |
fix for data in latest cch update, RT#26740
Diffstat (limited to 'FS/FS/tax_rate.pm')
-rw-r--r-- | FS/FS/tax_rate.pm | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/FS/FS/tax_rate.pm b/FS/FS/tax_rate.pm index 27df9e7..58d9d07 100644 --- a/FS/FS/tax_rate.pm +++ b/FS/FS/tax_rate.pm @@ -213,7 +213,7 @@ sub check { $self->ut_numbern('taxnum') || $self->ut_text('geocode') || $self->ut_textn('data_vendor') - || $self->ut_textn('location') + || $self->ut_cch_textn('location') || $self->ut_foreign_key('taxclassnum', 'tax_class', 'taxclassnum') || $self->ut_snumbern('effective_date') || $self->ut_float('tax') @@ -227,7 +227,7 @@ sub check { || $self->ut_floatn('excessfee') || $self->ut_floatn('feemax') || $self->ut_numbern('maxtype') - || $self->ut_textn('taxname') + || $self->ut_cch_textn('taxname') || $self->ut_numbern('taxauth') || $self->ut_numbern('basetype') || $self->ut_numbern('passtype') @@ -243,6 +243,18 @@ sub check { } +#ut_text / ut_textn w/ ` added cause now that's in the data +sub ut_cch_textn { + my($self,$field)=@_; + $self->getfield($field) + =~ /^([\wô \!\@\#\$\%\&\(\)\-\+\;\:\'\"\,\.\?\/\=\[\]\<\>\`]*)$/ + or return gettext('illegal_or_empty_text'). " $field: ". + $self->getfield($field); + $self->setfield($field,$1); + ''; + +} + =item taxclass_description Returns the human understandable value associated with the related |