[freeside-commits] freeside/FS/FS tax_rate.pm,1.43.4.11,1.43.4.12
Ivan,,,
ivan at wavetail.420.am
Sun May 22 17:01:35 PDT 2011
- Previous message: [freeside-commits] freeside/FS/FS tax_rate.pm,1.54,1.55
- Next message: [freeside-commits] freeside/httemplate/edit cust_bill_pay.cgi, 1.19, 1.20 cust_credit.cgi, 1.30, 1.31 cust_main.cgi, 1.108, 1.109 msgcat.cgi, 1.5, 1.6 svc_acct.cgi, 1.72, 1.73
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv582
Modified Files:
Tag: FREESIDE_2_1_BRANCH
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.43.4.11
retrieving revision 1.43.4.12
diff -u -w -d -r1.43.4.11 -r1.43.4.12
--- tax_rate.pm 15 Apr 2011 23:44:38 -0000 1.43.4.11
+++ tax_rate.pm 23 May 2011 00:01:33 -0000 1.43.4.12
@@ -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
);
- Previous message: [freeside-commits] freeside/FS/FS tax_rate.pm,1.54,1.55
- Next message: [freeside-commits] freeside/httemplate/edit cust_bill_pay.cgi, 1.19, 1.20 cust_credit.cgi, 1.30, 1.31 cust_main.cgi, 1.108, 1.109 msgcat.cgi, 1.5, 1.6 svc_acct.cgi, 1.72, 1.73
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list