+=head2 update_non_sales_tax_rows tax_class, $district_href
+
+The customer may have created additional taxes, such as Universal Service Fund.
+
+Ensure the columns for city and county are consistant between
+the user-created tax rows and the wa-sales-managed tax rows.
+
+=cut
+
+sub update_non_sales_tax_rows {
+ my ( $taxclass, $district ) = @_;
+
+ return unless ref $district && $district->{district};
+
+ my @rows = qsearch( cust_main_county => {
+ taxclass => $taxclass,
+ district => $district->{district},
+ state => 'WA',
+ country => 'US',
+ source => { op => '!=', value => 'wa_sales' },
+ });
+
+ for my $row ( @rows ) {
+ $row->city( uc $district->{city} );
+ $row->county( uc $district->{county} );
+
+ if ( my $error = $row->replace ) {
+ dbh->rollback;
+ local $FS::UID::AutoCommit = 1;
+ log_error_and_die(
+ sprintf
+ "Error updating cust_main_county row %s for district %s: %s",
+ $row->taxnum,
+ $district->{district},
+ $error
+ );
+ }
+ }
+
+}
+