X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_pay_batch.pm;h=2931fe79d7e3c179bf24f72cc4d3f56e82cf9614;hb=c2dbe36096332d1e09bc58d7d9903e05247f0c9b;hp=614c11753b73f5384856c8a1a772b5b4d7f6ae5f;hpb=d5988a9f7a3617de33da3058f2e9f1151b24420e;p=freeside.git diff --git a/FS/FS/cust_pay_batch.pm b/FS/FS/cust_pay_batch.pm index 614c11753..2931fe79d 100644 --- a/FS/FS/cust_pay_batch.pm +++ b/FS/FS/cust_pay_batch.pm @@ -239,7 +239,7 @@ sub expmmyy { =item pay_batch -Returns the payment batch this payment belongs to (L). =cut @@ -293,6 +293,9 @@ sub approve { if ( $error ) { return "error approving paybatchnum $paybatchnum: $error\n"; } + + return if $new->paycode eq "C"; + my $cust_pay = new FS::cust_pay ( { 'custnum' => $new->custnum, 'payby' => $new->payby, @@ -479,8 +482,8 @@ sub process_unbatch_and_delete { =item unbatch_and_delete May only be called on a record with an empty status and an associated -L with a status of 'O' (not yet in transit.) Deletes all associated -records from L and then deletes this record. +L with a status of 'O' (not yet in transit.) Deletes all associated +records from L and then deletes this record. If there is an error, returns the error, otherwise returns false. =cut