invoice_sections_with_taxes per-agent, RT#79636
[freeside.git] / bin / wa_tax_rate_update
index 2d493db..d4a4b52 100644 (file)
@@ -78,6 +78,7 @@ my $total_skipped = 0;
 while ( !$csv->eof ) {
   my $line = $csv->getline_hr($fh);
   my $district = $line->{Code} or next;
+  $district = sprintf('%04d', $district);
   my $tax = sprintf('%.1f', $line->{Rate} * 100);
   my $changed = 0;
   my $skipped = 0;
@@ -88,6 +89,7 @@ while ( !$csv->eof ) {
       district  => $district,
       taxclass  => $opt_c,
       taxname   => $opt_t,
+      tax       => { op => '>', value => '0' },
   });
   if ($opt_t eq '') {
     push @rates, qsearch('cust_main_county', {
@@ -95,7 +97,8 @@ while ( !$csv->eof ) {
       state     => 'WA', # this is specific to WA
       district  => $district,
       taxclass  => $opt_c,
-      taxname   => 'Tax'
+      taxname   => 'Tax',
+      tax       => { op => '>', value => '0' },
     });
   }
   foreach my $rate (@rates) {