[freeside-commits] branch FREESIDE_4_BRANCH updated. 14dbb86a955c2c222d7bcae0add087df1a0df381
Mitch Jackson
mitch at freeside.biz
Sun Dec 23 18:18:05 PST 2018
The branch, FREESIDE_4_BRANCH has been updated
via 14dbb86a955c2c222d7bcae0add087df1a0df381 (commit)
from bd1a73ccafba5c67e449aa92a88d70c96b031dab (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 14dbb86a955c2c222d7bcae0add087df1a0df381
Author: Mitch Jackson <mitch at freeside.biz>
Date: Sun Dec 23 21:11:25 2018 -0500
RT# 80488 Suppress warnings, disambiguate columns
diff --git a/FS/FS/Cron/tax_rate_update.pm b/FS/FS/Cron/tax_rate_update.pm
index 72ca14535..ef529c4a5 100755
--- a/FS/FS/Cron/tax_rate_update.pm
+++ b/FS/FS/Cron/tax_rate_update.pm
@@ -144,22 +144,22 @@ sub wa_sales_log_customer_without_tax_district {
cust_location.state,
cust_location.zip
',
- hashref => {
- state => 'WA',
- district => undef,
- },
addl_from => '
LEFT JOIN cust_main USING (custnum)
LEFT JOIN cust_pkg ON cust_location.locationnum = cust_pkg.locationnum
',
- extra_sql => sprintf(
- '
+ extra_sql => sprintf(q{
+ WHERE cust_location.state = 'WA'
+ AND (
+ cust_location.district IS NULL
+ or cust_location.district = ''
+ )
AND cust_pkg.pkgnum IS NOT NULL
AND (
cust_pkg.cancel > %s
OR cust_pkg.cancel IS NULL
)
- ', time()
+ }, time()
),
);
@@ -353,14 +353,19 @@ sub wa_sales_update_cust_main_county {
# creating an entire separate set of tax rows with
# the new taxname, update the taxname on existing records
- if (
- $row->tax == ( $district->{tax_combined} * 100 )
- && $row->taxname eq $args->{taxname}
- && uc $row->county eq uc $district->{county}
- && uc $row->city eq uc $district->{city}
- ) {
- $same_count++;
- next;
+ {
+ # Supress warning on taxname comparison, when taxname is undef
+ no warnings 'uninitialized';
+
+ if (
+ $row->tax == ( $district->{tax_combined} * 100 )
+ && $row->taxname eq $args->{taxname}
+ && uc $row->county eq uc $district->{county}
+ && uc $row->city eq uc $district->{city}
+ ) {
+ $same_count++;
+ next;
+ }
}
$row->city( uc $district->{city} );
-----------------------------------------------------------------------
Summary of changes:
FS/FS/Cron/tax_rate_update.pm | 35 ++++++++++++++++++++---------------
1 file changed, 20 insertions(+), 15 deletions(-)
More information about the freeside-commits
mailing list