This commit was generated by cvs2svn to compensate for changes in r11022,
[freeside.git] / FS / FS / part_event / Condition / pkg_notchange.pm
1 package FS::part_event::Condition::pkg_notchange;
2
3 use strict;
4
5 use base qw( FS::part_event::Condition );
6 use FS::Record qw( qsearch );
7
8 sub description {
9   'Package is a new order, not a change';
10 }
11
12 sub eventtable_hashref {
13     { 'cust_main' => 0,
14       'cust_bill' => 0,
15       'cust_pkg'  => 1,
16     };
17 }
18
19 sub condition {
20   my( $self, $cust_pkg ) = @_;
21
22   ! $cust_pkg->change_date;
23
24 }
25
26 sub condition_sql {
27   '( cust_pkg.change_date IS NULL OR cust_pkg.change_date = 0 )';
28 }
29
30 1;
31