[freeside-commits] branch master updated. 65b639012a5dc547eccb01fd0e55efd4aa728039

Ivan ivan at 420.am
Mon Jun 6 10:21:13 PDT 2016


The branch, master has been updated
       via  65b639012a5dc547eccb01fd0e55efd4aa728039 (commit)
       via  d2e75a0a9f47cfe1ecafce0fe8811dcb419d67d0 (commit)
       via  e3f0183408387878d3c6989895a8bcb65e395284 (commit)
      from  4924d635301e5c365d55b0c008f12e9cff40350f (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 65b639012a5dc547eccb01fd0e55efd4aa728039
Merge: d2e75a0 4924d63
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Mon Jun 6 10:21:09 2016 -0700

    Merge branch 'master' of git.freeside.biz:/home/git/freeside


commit d2e75a0a9f47cfe1ecafce0fe8811dcb419d67d0
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Mon Jun 6 10:21:03 2016 -0700

    fix "Customer has automatic payment information" condition when migrated from v3

diff --git a/FS/FS/part_event/Condition/has_cust_payby_auto.pm b/FS/FS/part_event/Condition/has_cust_payby_auto.pm
index 42f6d35..f13b639 100644
--- a/FS/FS/part_event/Condition/has_cust_payby_auto.pm
+++ b/FS/FS/part_event/Condition/has_cust_payby_auto.pm
@@ -4,7 +4,7 @@ use base qw( FS::part_event::Condition );
 use strict;
 use Tie::IxHash;
 use FS::payby;
-use FS::Record qw(qsearch);
+use FS::Record qw( qsearch dbh );
 
 sub description {
   'Customer has automatic payment information';

commit e3f0183408387878d3c6989895a8bcb65e395284
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Mon Jun 6 10:20:52 2016 -0700

    missing piece of #42043

diff --git a/FS/FS/cust_main/Packages.pm b/FS/FS/cust_main/Packages.pm
index fc5927c..89d25d2 100644
--- a/FS/FS/cust_main/Packages.pm
+++ b/FS/FS/cust_main/Packages.pm
@@ -500,6 +500,26 @@ sub ncancelled_pkgs {
 
 }
 
+=item cancelled_pkgs [ EXTRA_QSEARCH_PARAMS_HASHREF ]
+
+Returns all cancelled packages (see L<FS::cust_pkg>) for this customer.
+
+=cut
+
+sub cancelled_pkgs {
+  my $self = shift;
+  my $extra_qsearch = ref($_[0]) ? shift : { @_ };
+
+  return $self->num_cancelled_pkgs($extra_qsearch) unless wantarray;
+
+  $extra_qsearch->{'extra_sql'} .=
+    ' AND cust_pkg.cancel IS NOT NULL AND cust_pkg.cancel > 0 ';
+
+  local($skip_label_sort) = 1 if $extra_qsearch->{skip_label_sort};
+
+  sort sort_packages $self->_cust_pkg($extra_qsearch);
+}
+
 sub _cust_pkg {
   my $self = shift;
   my $extra_qsearch = ref($_[0]) ? shift : {};

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

Summary of changes:
 FS/FS/part_event/Condition/has_cust_payby_auto.pm |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)




More information about the freeside-commits mailing list