[freeside-commits] branch FREESIDE_2_3_BRANCH updated. 18430ed0fb606a05154a7ca748d9a2b85d158fb0

Ivan ivan at 420.am
Wed Jan 15 16:05:38 PST 2014


The branch, FREESIDE_2_3_BRANCH has been updated
       via  18430ed0fb606a05154a7ca748d9a2b85d158fb0 (commit)
      from  27d474b1d00d900d509c9a8343b401f01f4a4f1c (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 18430ed0fb606a05154a7ca748d9a2b85d158fb0
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed Jan 15 16:05:37 2014 -0800

    add customer class event condition, RT#26997

diff --git a/FS/FS/part_event/Condition/cust_class.pm b/FS/FS/part_event/Condition/cust_class.pm
new file mode 100644
index 0000000..791bb63
--- /dev/null
+++ b/FS/FS/part_event/Condition/cust_class.pm
@@ -0,0 +1,29 @@
+package FS::part_event::Condition::cust_class;
+use base qw( FS::part_event::Condition );
+
+use strict;
+
+sub description {
+  'Customer class';
+}
+
+sub option_fields {
+  (
+    'cust_class'  => { 'label'    => 'Customer Class',
+                       'type'     => 'select-cust_class',
+                       'multiple' => 1,
+                     },
+  );
+}
+
+sub condition {
+  my( $self, $object ) = @_;
+
+  my $cust_main = $self->cust_main($object);
+
+  my $hashref = $self->option('cust_class') || {};
+  
+  $hashref->{ $cust_main->classnum };
+}
+
+1;

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

Summary of changes:
 FS/FS/part_event/Condition/cust_class.pm |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)
 create mode 100644 FS/FS/part_event/Condition/cust_class.pm




More information about the freeside-commits mailing list