[freeside-commits] branch FREESIDE_4_BRANCH updated. 2ca291caff85cdd292370a944be1e4bacd4583a7

Ivan Kohler ivan at freeside.biz
Wed Sep 18 15:55:11 PDT 2019


The branch, FREESIDE_4_BRANCH has been updated
       via  2ca291caff85cdd292370a944be1e4bacd4583a7 (commit)
      from  9610c36df328850c679da7c6181d1c0f219c912d (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 2ca291caff85cdd292370a944be1e4bacd4583a7
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed Sep 18 15:54:29 2019 -0700

    more efficient invoice voiding, RT#80366

diff --git a/FS/FS/cust_bill_pkg.pm b/FS/FS/cust_bill_pkg.pm
index 305ad63a6..6f9c74a64 100644
--- a/FS/FS/cust_bill_pkg.pm
+++ b/FS/FS/cust_bill_pkg.pm
@@ -6,7 +6,7 @@ use vars qw( @ISA $DEBUG $me );
 use Carp;
 use List::Util qw( sum min );
 use Text::CSV_XS;
-use FS::Record qw( qsearch qsearchs dbh );
+use FS::Record qw( qsearch qsearchs dbh fields );
 use FS::cust_pkg;
 use FS::cust_bill_pkg_detail;
 use FS::cust_bill_pkg_display;
@@ -429,8 +429,10 @@ sub void_cust_bill_pkg_detail {
     $self->billpkgnum
   );
 
-  $self->scalar_sql("INSERT INTO cust_bill_pkg_detail_void
-                       SELECT * $from_cust_bill_pkg_detail",
+  my $fields = join(', ', fields('cust_bill_pkg_detail_void') );
+
+  $self->scalar_sql("INSERT INTO cust_bill_pkg_detail_void ($fields)
+                       SELECT $fields $from_cust_bill_pkg_detail",
                     $self->billpkgnum
                    );
 

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

Summary of changes:
 FS/FS/cust_bill_pkg.pm | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)




More information about the freeside-commits mailing list