+ my $desc = $part_event_condition->description;
+
+ if ( $cgi->param('test_eventtable_num') =~ /^(\d+)$/ ) {
+
+ my $tablenum = $1;
+
+ if ( $cgi->param('eventtable') =~ /^(cust_main|cust_pkg|cust_bill)$/ ) {
+ my $eventtable = "FS::$1";
+ my $object = $eventtable->by_key($tablenum);
+
+ my $cust_event = $part_event->new_cust_event($object);
+
+ my $test = $part_event_condition->condition(
+ $object,
+ 'cust_event' => $cust_event,
+ );
+
+ my $yesno = $test ? '(<FONT COLOR="#00ff00">yes</FONT>)'
+ : '(<FONT COLOR="#ff0000">no</FONT>)';
+
+ $desc .= " $yesno";
+ }
+ }
+