=================================================================== RCS file: /cvs/RT/Invoicing/rt_invoices.pl,v retrieving revision 1.25 retrieving revision 1.27 diff -u -r1.25 -r1.27 --- RT/Invoicing/rt_invoices.pl 2011/04/19 04:18:13 1.25 +++ RT/Invoicing/rt_invoices.pl 2011/04/19 04:21:06 1.27 @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $AFresh1: rt_invoices.pl,v 1.24 2011/04/12 19:32:15 andrew Exp $ +# $AFresh1: rt_invoices.pl,v 1.25 2011/04/19 03:18:13 andrew Exp $ ######################################################################## # Copyright (c) 2011 Andrew Fresh # @@ -76,6 +76,11 @@ my $iterator = $results->get_iterator; while ( my $ticket = &$iterator ) { + if (!$ticket->time_worked) { + say "Ticket " . $ticket->id . " has no time worked"; + next; + } + my $cust = find_customer_for_ticket( $ticket ); if ( !$cust ) { warn "No customer found for ticket " . $ticket->id; @@ -482,9 +487,11 @@ } my $invoice = $cust->{invoice}; - next - if $invoice->{start} - && $invoice->{start} > $fee->{date}; + if ($invoice->{start} && $invoice->{start} > $fee->{date}) { + warn "Ticket " . $ticket->id + . " has old uninvoiced Transaction " . $txn->id . "\n"; + next; + } next if $invoice->{end} < $fee->{date}; push @{ $project{fees} }, $fee;