[freeside-commits] freeside/FS/FS Conf.pm, 1.343, 1.344 tax_rate.pm, 1.30, 1.31

Jeff Finucane,420,, jeff at wavetail.420.am
Mon Dec 21 06:36:52 PST 2009


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv21953/FS/FS

Modified Files:
	Conf.pm tax_rate.pm 
Log Message:
move cch conf into database and add a couple small tools for processing updates more manually

Index: Conf.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Conf.pm,v
retrieving revision 1.343
retrieving revision 1.344
diff -u -d -r1.343 -r1.344
--- Conf.pm	20 Dec 2009 21:52:06 -0000	1.343
+++ Conf.pm	21 Dec 2009 14:36:50 -0000	1.344
@@ -1677,8 +1677,8 @@
   {
     'key'         => 'taxdatadirectdownload',
     'section'     => 'billing',  #well
-    'description' => 'Enable downloading tax data directly from the vendor site',
-    'type'        => 'checkbox',
+    'description' => 'Enable downloading tax data directly from the vendor site. at least three lines: URL, username, and password.j',
+    'type'        => 'textarea',
   },
 
   {

Index: tax_rate.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/tax_rate.pm,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- tax_rate.pm	12 Nov 2009 16:56:57 -0000	1.30
+++ tax_rate.pm	21 Dec 2009 14:36:50 -0000	1.31
@@ -1398,11 +1398,14 @@
     eval "use XBase;";
     die $@ if $@;
 
-    my $conffile = '%%%FREESIDE_CONF%%%/cchconf';
-    my $conffh = new IO::File "<$conffile" or die "can't open $conffile: $!\n";
-    my ( $urls, $secret, $states ) =
-      map { /^(.*)$/ or die "bad config line in $conffile: $_\n"; $1 }
-          <$conffh>;
+    my $conf = new FS::Conf;
+    die "direct download of tax data not enabled\n" 
+      unless $conf->exists('taxdatadirectdownload');
+    my ( $urls, $username, $secret, $states ) =
+      $conf->config('taxdatadirectdownload');
+    die "No tax download URL provided.  ".
+        "Did you set the taxdatadirectdownload configuration value?\n"
+      unless $urls;
 
     $dir .= '/cch';
 



More information about the freeside-commits mailing list