[freeside-commits] freeside/FS/FS/part_event/Condition pkg_freq.pm, NONE, 1.1.2.2

Mark Wells mark at wavetail.420.am
Thu Jul 29 22:50:26 PDT 2010


Update of /home/cvs/cvsroot/freeside/FS/FS/part_event/Condition
In directory wavetail.420.am:/tmp/cvs-serv11392/FS/FS/part_event/Condition

Added Files:
      Tag: FREESIDE_1_9_BRANCH
	pkg_freq.pm 
Log Message:
add pkg_freq event condition, RT#8896

--- NEW FILE: pkg_freq.pm ---
package FS::part_event::Condition::pkg_freq;

use strict;
use FS::Misc;
use FS::cust_pkg;

use base qw( FS::part_event::Condition );

sub description { 'Package billing frequency'; }

sub option_fields {
  my $freqs = FS::Misc::pkg_freqs();
  (
    'freq' => { 'label'      => 'Frequency',
                'type'       => 'select',
                'labels'     => $freqs,
                'options'    => [ keys(%$freqs) ],
              },
  );
}

sub eventtable_hashref {
  { 'cust_main' => 0,
    'cust_bill' => 0,
    'cust_pkg'  => 1,
  };
}

sub condition {
  my($self, $cust_pkg) = @_;

  $cust_pkg->part_pkg->freq eq $self->option('freq')
}

1;




More information about the freeside-commits mailing list