push out event triggered suspensions
[freeside.git] / FS / FS / part_event / Condition / dundate.pm
diff --git a/FS/FS/part_event/Condition/dundate.pm b/FS/FS/part_event/Condition/dundate.pm
new file mode 100644 (file)
index 0000000..ee2a95f
--- /dev/null
@@ -0,0 +1,26 @@
+package FS::part_event::Condition::dundate;
+
+use strict;
+
+use base qw( FS::part_event::Condition );
+
+sub description {
+  "Skip until customer dun date is reached";
+}
+
+sub condition {
+  my($self, $object, %opt) = @_;
+
+  my $cust_main = $self->cust_main($object);
+
+  $cust_main->dundate <= $opt{time};
+
+}
+
+#sub condition_sql {
+#  my( $self, $table ) = @_;
+#
+#  'true';
+#}
+
+1;