X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_main%2FBilling_Batch.pm;h=d8ae3b40f53c227584d1b62d26e561c73b3ccbd2;hb=386c1c45a7cb9e8ad93862d9aa2d59cdb4ed0d3a;hp=f91c5fbdc0bc04e9d4e5ddc462ea68389d85144e;hpb=1259a17db297fa2352619b29f2c5bd34e313cd64;p=freeside.git diff --git a/FS/FS/cust_main/Billing_Batch.pm b/FS/FS/cust_main/Billing_Batch.pm index f91c5fbdc..d8ae3b40f 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]; @@ -119,7 +114,7 @@ sub batch_card { } ); foreach (qw( address1 address2 city state zip country latitude longitude - payby payinfo paydate payname )) + payby payinfo paydate payname paycode )) { $options{$_} = '' unless exists($options{$_}); } @@ -145,7 +140,9 @@ sub batch_card { 'payinfo' => $options{payinfo} || $cust_payby->payinfo, 'exp' => $options{paydate} || $cust_payby->paydate, 'payname' => $options{payname} || $cust_payby->payname, + 'paytype' => $options{paytype} || $cust_payby->paytype, 'amount' => $amount, # consolidating + 'paycode' => $options{paycode} || $cust_payby->paycode, } ); $cust_pay_batch->paybatchnum($old_cust_pay_batch->paybatchnum)