X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=bin%2Ftest-event;h=73c9d31ec0eddebb1d09c1c7e3cd0ec551dc88b4;hp=061e00061f18adcf38f35bcc8f25dddf88fcdc11;hb=29d80a8582103ead0b5910391cabc45cb85fa836;hpb=b5c4237a34aef94976bc343c8d9e138664fc3984 diff --git a/bin/test-event b/bin/test-event old mode 100644 new mode 100755 index 061e00061..73c9d31ec --- a/bin/test-event +++ b/bin/test-event @@ -26,13 +26,22 @@ my $object = qsearchs($table, { $pkey => $tablenum } ) my $cust_event = $part_event->new_cust_event($object); +print "\n"; + ### # specifics ### my @conditions = $part_event->part_event_condition; foreach my $condition ( @conditions ) { - my $sat = $condition->condition( $object, 'cust_event' => $cust_event ); + my $sat = $condition->condition( $object, + 'cust_event' => $cust_event, + 'time' => time, + ); + + my $sql = $condition->condition_sql(); + + print $condition->conditionname. '.pm: '. ( $sat ? "satisfied\n" : "NOT SATISFIED\n" ); @@ -50,8 +59,6 @@ foreach my $condition ( @conditions ) { # overall ### -print "\n"; - my $run = $cust_event->test_conditions; print "\n". $part_event->eventpart.': '. $part_event->event.