summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>1999-04-08 12:08:59 +0000
committerivan <ivan>1999-04-08 12:08:59 +0000
commit78920f21696cd2c75d655d5bdfbbed3b5dd50d57 (patch)
treebe7cd92643e201a8b818586e6cbdb2bafa82b691
parentef9dcbfdf3c2e7c0ac44eeff478e6eddcd038d62 (diff)
fix up PostgreSQL money fields so you can actually use them as numbers. bah.
-rw-r--r--site_perl/Record.pm10
1 files changed, 7 insertions, 3 deletions
diff --git a/site_perl/Record.pm b/site_perl/Record.pm
index 4634026b8..730b1f969 100644
--- a/site_perl/Record.pm
+++ b/site_perl/Record.pm
@@ -122,11 +122,12 @@ sub new {
foreach my $field ( $self->fields ) {
$hashref->{$field}='' unless defined $hashref->{$field};
- #trim the '$' from money fields for Pg (belong HERE?)
+ #trim the '$' and ',' from money fields for Pg (belong HERE?)
#(what about Pg i18n?)
if ( datasrc =~ m/Pg/
&& $self->dbdef_table->column($field)->type eq 'money' ) {
${$hashref}{$field} =~ s/^\$//;
+ ${$hashref}{$field} =~ s/\,//;
}
}
@@ -822,7 +823,7 @@ sub hfields {
=head1 VERSION
-$Id: Record.pm,v 1.14 1999-04-07 14:58:31 ivan Exp $
+$Id: Record.pm,v 1.15 1999-04-08 12:08:59 ivan Exp $
=head1 BUGS
@@ -944,7 +945,10 @@ added pod documentation ivan@sisd.com 98-sep-6
ut_phonen got ''; at the end ivan@sisd.com 98-sep-27
$Log: Record.pm,v $
-Revision 1.14 1999-04-07 14:58:31 ivan
+Revision 1.15 1999-04-08 12:08:59 ivan
+fix up PostgreSQL money fields so you can actually use them as numbers. bah.
+
+Revision 1.14 1999/04/07 14:58:31 ivan
more kludges to get around different null/empty handling in Perl vs. MySQL vs.
PostgreSQL etc.