X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Ftax-import.cgi;h=9581a797544387f11356acca8e6c639f51933659;hb=5847b9f9d69019e8c254da74b484e2b55f1507a1;hp=ceb74645cde12314087b0470658883c0c3eb7799;hpb=624b2d44625f69d71175c3348cae635d580c890b;p=freeside.git
diff --git a/httemplate/misc/tax-import.cgi b/httemplate/misc/tax-import.cgi
index ceb74645c..9581a7975 100644
--- a/httemplate/misc/tax-import.cgi
+++ b/httemplate/misc/tax-import.cgi
@@ -1,27 +1,27 @@
-<% include("/elements/header.html",'Batch Tax Rate Import') %>
+<& /elements/header.html,'Batch Tax Rate Import' &>
Import a CSV file set containing tax rate records.
-<% include( '/elements/form-file_upload.html',
- 'name' => 'TaxRateUpload',
- 'action' => 'process/tax-import.cgi',
- 'num_files' => 6,
- 'fields' => [ 'format', 'reload' ],
- 'message' => 'Tax rates imported',
- )
-%>
+<& /elements/form-file_upload.html,
+ 'name' => 'TaxRateUpload',
+ 'action' => 'process/tax-import.cgi',
+ 'fields' => [ 'format', 'reload' ],
+ 'num_files' => $vendor_info{$data_vendor}->{num_files},
+ 'message' => 'Tax rates imported',
+ 'onsubmit' => "document.TaxRateUpload.submitButton.disabled=true;",
+&>
-<% &ntable("#cccccc", 2) %>
+<& /elements/table-grid.html &>
Format |
|
@@ -33,30 +33,18 @@ Import a CSV file set containing tax rate records.
- <% include( '/elements/file-upload.html',
- 'field' => [ 'geocodefile',
- 'codefile',
- 'plus4file',
- 'zipfile',
- 'txmatrixfile',
- 'detailfile',
- ],
- 'label' => [ 'geocode filename',
- 'code filename',
- 'plus4 filename',
- 'zip filename',
- 'txmatrix filename',
- 'detail filename',
- ],
+ <& /elements/file-upload.html,
+ 'field' => $vendor_info{$data_vendor}->{field},
+ 'label' => $vendor_info{$data_vendor}->{label},
'debug' => 0,
- )
- %>
+ &>
-
|
@@ -71,4 +59,37 @@ Import a CSV file set containing tax rate records.
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Import');
+my $conf = FS::Conf->new;
+my $data_vendor = $conf->config('tax_data_vendor');
+
+my %vendor_info = (
+ cch => {
+ 'num_files' => 6,
+ 'formats' => [ 'cch' => 'CCH import (CSV)',
+ 'cch-fixed' => 'CCH import (fixed length)' ],
+ 'field' => [ 'geocodefile',
+ 'codefile',
+ 'plus4file',
+ 'zipfile',
+ 'txmatrixfile',
+ 'detailfile',
+ ],
+ 'label' => [ 'geocode filename',
+ 'code filename',
+ 'plus4 filename',
+ 'zip filename',
+ 'txmatrix filename',
+ 'detail filename',
+ ],
+ },
+ billsoft => {
+ 'num_files' => 1,
+ 'formats' => [ 'billsoft-pcode' => 'Billsoft PCodes',
+ 'billsoft-taxclass' => 'Tax classes',
+ 'billsoft-taxproduct' => 'Tax products' ],
+ 'field' => [ 'file' ],
+ 'label' => [ 'Filename' ],
+ },
+);
+
%init>