summaryrefslogtreecommitdiff
path: root/FS/FS/cust_main/Billing_Batch.pm
diff options
context:
space:
mode:
authorJonathan Prykop <jonathan@freeside.biz>2016-01-15 12:41:48 -0600
committerJonathan Prykop <jonathan@freeside.biz>2016-01-26 14:48:49 -0600
commitf685af08c55b6eaac2c87132bc2f0f5113b869d7 (patch)
tree0bd15c71b5ea3087e649ea1e98e7c1a5681d1df1 /FS/FS/cust_main/Billing_Batch.pm
parent19e69d1b833894aa23a1143398b0b334151f8ba2 (diff)
RT#38363: use cust_payby when saving cards during payments
Diffstat (limited to 'FS/FS/cust_main/Billing_Batch.pm')
-rw-r--r--FS/FS/cust_main/Billing_Batch.pm7
1 files changed, 1 insertions, 6 deletions
diff --git a/FS/FS/cust_main/Billing_Batch.pm b/FS/FS/cust_main/Billing_Batch.pm
index f91c5fb..7612df3 100644
--- a/FS/FS/cust_main/Billing_Batch.pm
+++ b/FS/FS/cust_main/Billing_Batch.pm
@@ -65,12 +65,7 @@ sub batch_card {
&& !($options{payby} && $options{payinfo} && $options{paydate} && $options{payname});
#false laziness with Billing_Realtime
- my @cust_payby = qsearch({
- 'table' => 'cust_payby',
- 'hashref' => { 'custnum' => $self->custnum, },
- 'extra_sql' => " AND payby IN ( 'CARD', 'CHEK' ) ",
- 'order_by' => 'ORDER BY weight ASC',
- });
+ my @cust_payby = $self->cust_payby('CARD','CHEK');
# batch can't try out every one like realtime, just use first one
my $cust_payby = $cust_payby[0];