[freeside-commits] freeside/FS/FS tax_rate.pm,1.54,1.55
Ivan,,,
ivan at wavetail.420.am
Sun May 22 17:01:33 PDT 2011
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv580
Modified Files:
tax_rate.pm
Log Message:
fix cch tax rate import for taxes coming from dbf file in scientific notation, RT#11003
Index: tax_rate.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/tax_rate.pm,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -w -d -r1.54 -r1.55
--- tax_rate.pm 15 Apr 2011 23:44:36 -0000 1.54
+++ tax_rate.pm 23 May 2011 00:01:31 -0000 1.55
@@ -1196,9 +1196,14 @@
$date;
};
while (my $row = $cursor->fetch_hashref) {
- $csv->combine( map { ($table->field_type($_) eq 'D')
- ? &{$format_date}($row->{$_})
- : $row->{$_}
+ $csv->combine( map { my $type = $table->field_type($_);
+ if ($type eq 'D') {
+ &{$format_date}($row->{$_}) ;
+ } elsif ($type eq 'N' && $row->{$_} =~ /e-/i ) {
+ sprintf('%.8f', $row->{$_}); #db row is numeric(14,8)
+ } else {
+ $row->{$_};
+ }
}
@fields
);
More information about the freeside-commits
mailing list