diff options
author | Mark Wells <mark@freeside.biz> | 2016-12-04 21:35:52 -0800 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2016-12-04 23:11:30 -0800 |
commit | 567dc9c7dfb3686f47d03925e0faff09ccd6dea7 (patch) | |
tree | 75bd7ae32b92a3787c85102d348cbcc3e07b2d0c /FS/FS/cust_main | |
parent | 9a8399783bb9d87ef662b4371bebe983d2781dce (diff) |
minor fix for custnum-less cust_pay_pending, #71513
Diffstat (limited to 'FS/FS/cust_main')
-rw-r--r-- | FS/FS/cust_main/Billing_Realtime.pm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/FS/FS/cust_main/Billing_Realtime.pm b/FS/FS/cust_main/Billing_Realtime.pm index 3a3947b..35293f0 100644 --- a/FS/FS/cust_main/Billing_Realtime.pm +++ b/FS/FS/cust_main/Billing_Realtime.pm @@ -2553,7 +2553,11 @@ CUSTLOOP: # might happen for cust_pay_pending from failed verify records, # in which case we attempt tokenization without cust_main # everything else should absolutely have a cust_main - unless ($table eq 'cust_pay_pending' && $record->{'custnum_pending'}) { + if ($table eq 'cust_pay_pending' and !$record->custnum ) { + # override the usual safety check and allow the record to be + # updated even without a custnum. + $record->set('custnum_pending', 1); + } else { my $error = "Could not load cust_main for $table ".$record->get($record->primary_key); if ($opt{'queue'}) { $log->critical($error); @@ -2635,7 +2639,7 @@ CUSTLOOP: warn "ATTEMPTING GATEWAY-ONLY TOKENIZE" if $debug && !$cust_main; # if we got this far, time to mutex - $record = $record->select_for_update; + $record->select_for_update; # no clear record of name/address/etc used for transaction, # but will load name/phone/id from customer if run as an object method, |