[freeside-commits] freeside/FS/FS Record.pm,1.226,1.226.2.1
Ivan,,,
ivan at wavetail.420.am
Fri Aug 12 14:31:31 PDT 2011
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv10246
Modified Files:
Tag: FREESIDE_2_3_BRANCH
Record.pm
Log Message:
fix discounting w/changed money_char, RT#14032
Index: Record.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Record.pm,v
retrieving revision 1.226
retrieving revision 1.226.2.1
diff -u -w -d -r1.226 -r1.226.2.1
--- Record.pm 7 Jul 2011 16:00:34 -0000 1.226
+++ Record.pm 12 Aug 2011 21:31:29 -0000 1.226.2.1
@@ -2,8 +2,9 @@
use strict;
use vars qw( $AUTOLOAD @ISA @EXPORT_OK $DEBUG
- $conf $conf_encryption $me
%virtual_fields_cache
+ $conf $conf_encryption $money_char
+ $me
$nowarn_identical $nowarn_classload
$no_update_diff $no_check_foreign
@encrypt_payby
@@ -59,6 +60,7 @@
die $@ if $@;
$conf = FS::Conf->new;
$conf_encryption = $conf->exists('encryption');
+ $money_char = $conf->config('money_char') || '$';
$File::CounterFile::DEFAULT_DIR = $conf->base_dir . "/counters.". datasrc;
if ( driver_name eq 'Pg' ) {
eval "use DBD::Pg ':pg_types'";
@@ -2242,7 +2244,7 @@
#warn "notexist ". \¬exist. "\n";
#warn "AUTOLOAD ". \&AUTOLOAD. "\n";
$self->getfield($field)
- =~ /^([\w \!\@\#\$\%\&\(\)\-\+\;\:\'\"\,\.\?\/\=\[\]\<\>]+)$/
+ =~ /^([\w \!\@\#\$\%\&\(\)\-\+\;\:\'\"\,\.\?\/\=\[\]\<\>$money_char]+)$/
or return gettext('illegal_or_empty_text'). " $field: ".
$self->getfield($field);
$self->setfield($field,$1);
More information about the freeside-commits
mailing list