projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ef9dcbf
)
fix up PostgreSQL money fields so you can actually use them as numbers. bah.
author
ivan
<ivan>
Thu, 8 Apr 1999 12:08:59 +0000
(12:08 +0000)
committer
ivan
<ivan>
Thu, 8 Apr 1999 12:08:59 +0000
(12:08 +0000)
site_perl/Record.pm
patch
|
blob
|
history
diff --git
a/site_perl/Record.pm
b/site_perl/Record.pm
index
4634026
..
730b1f9
100644
(file)
--- 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};
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/^\$//;
#(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
=head1 VERSION
-$Id: Record.pm,v 1.1
4 1999-04-07 14:58:31
ivan Exp $
+$Id: Record.pm,v 1.1
5 1999-04-08 12:08:59
ivan Exp $
=head1 BUGS
=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 $
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.
more kludges to get around different null/empty handling in Perl vs. MySQL vs.
PostgreSQL etc.