[freeside-commits] branch FREESIDE_3_BRANCH updated. 13d6bd1395b5f006cab027d68723c7a8eab47a4f

Mark Wells mark at 420.am
Wed May 7 23:43:11 PDT 2014


The branch, FREESIDE_3_BRANCH has been updated
       via  13d6bd1395b5f006cab027d68723c7a8eab47a4f (commit)
      from  ed4d5fe0311a21c687083e1edca5ef36b9dbb049 (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 13d6bd1395b5f006cab027d68723c7a8eab47a4f
Author: Mark Wells <mark at freeside.biz>
Date:   Wed May 7 23:42:58 2014 -0700

    upgrade in reverse numeric order, #29017

diff --git a/FS/FS/cust_pay.pm b/FS/FS/cust_pay.pm
index 7b68ae2..3413a07 100644
--- a/FS/FS/cust_pay.pm
+++ b/FS/FS/cust_pay.pm
@@ -1100,12 +1100,14 @@ sub process_upgrade_paybatch {
     foreach my $table (qw(cust_pay cust_pay_void cust_refund)) {
       my $and_batchnum_is_null =
         ( $table =~ /^cust_pay/ ? ' AND batchnum IS NULL' : '' );
+      my $pkey = ($table =~ /^cust_pay/ ? 'paynum' : 'refundnum');
       my $search = FS::Cursor->new({
         table     => $table,
         extra_sql => "WHERE payby IN('CARD','CHEK') ".
                      "AND (paybatch IS NOT NULL ".
                      "OR (paybatch IS NULL AND auth IS NULL
-                     $and_batchnum_is_null ) )",
+                     $and_batchnum_is_null ) )
+                     ORDER BY $pkey DESC"
       });
       while ( my $object = $search->fetch ) {
         if ( $object->paybatch eq '' ) {

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/cust_pay.pm |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)




More information about the freeside-commits mailing list