[freeside-commits] freeside/FS/FS tax_rate.pm,1.33,1.34
Jeff Finucane,420,,
jeff at wavetail.420.am
Mon Feb 15 18:19:56 PST 2010
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv32349/FS/FS
Modified Files:
tax_rate.pm
Log Message:
refactor cch tax import to remove tons of false laziness and improve flexibility; allow reload from local files
Index: tax_rate.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/tax_rate.pm,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- tax_rate.pm 13 Jan 2010 03:14:09 -0000 1.33
+++ tax_rate.pm 16 Feb 2010 02:19:54 -0000 1.34
@@ -3,11 +3,11 @@
use strict;
use vars qw( @ISA $DEBUG $me
%tax_unittypes %tax_maxtypes %tax_basetypes %tax_authorities
- %tax_passtypes %GetInfoType );
+ %tax_passtypes %GetInfoType $keep_cch_files );
use Date::Parse;
use DateTime;
use DateTime::Format::Strptime;
-use Storable qw( thaw );
+use Storable qw( thaw nfreeze );
use IO::File;
[...1231 lines suppressed...]
- close $fh;
- #unlink $file or warn "Can't delete $file: $!";
- }
+ # perform the import
+ local $keep_cch_files = 1;
+ $param->{uploaded_files} = join( ',', @list );
+ $param->{format} .= '-update' if $update;
+ $error ||=
+ _perform_batch_import( $job, encode_base64( nfreeze( $param ) ) );
- if ($error) {
- $dbh->rollback or die $dbh->errstr if $oldAutoCommit;
- die $error;
- }else{
- $dbh->commit or die $dbh->errstr if $oldAutoCommit;
- }
-
rename "$dir.new", "$dir"
or die "cch tax update processed, but can't rename $dir.new: $!\n";
More information about the freeside-commits
mailing list