[freeside-commits] branch master updated. 214c4e855a429f7a50dfd771b18c74ef7a34be58
Ivan Kohler
ivan at freeside.biz
Wed Jul 18 19:18:24 PDT 2018
The branch, master has been updated
via 214c4e855a429f7a50dfd771b18c74ef7a34be58 (commit)
from ea749c5e875371d98bdcf173e19a2d57fa46481e (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 214c4e855a429f7a50dfd771b18c74ef7a34be58
Author: Ivan Kohler <ivan at freeside.biz>
Date: Wed Jul 18 19:18:19 2018 -0700
more careful
diff --git a/bin/cust_main.restore-paymask b/bin/cust_main.restore-paymask
index c6c8a75ec..14dddd1b5 100755
--- a/bin/cust_main.restore-paymask
+++ b/bin/cust_main.restore-paymask
@@ -15,10 +15,14 @@ foreach my $cust_main (
my $custnum = $cust_main->custnum;
+ my $paydate = $cust_main->paydate;
+
my $paymask = FS::Record->scalar_sql(qq[
- SELECT paymask FROM h_cust_main WHERE custnum = $custnum AND history_action = 'replace_old' AND paymask IS NOT NULL AND paymask != 'N/A (tokenized)' ORDER BY historynum desc LIMIT 1
+ SELECT paymask FROM h_cust_main WHERE custnum = $custnum AND history_action = 'replace_old' AND paymask IS NOT NULL AND paymask != 'N/A (tokenized)' AND paydate = '$paydate' ORDER BY historynum desc LIMIT 1
]);
+ next unless length($paymask);
+
#dbh->do(
print
qq[UPDATE cust_main SET paymask = '$paymask' WHERE custnum = $custnum;]
-----------------------------------------------------------------------
Summary of changes:
bin/cust_main.restore-paymask | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
More information about the freeside-commits
mailing list