=================================================================== RCS file: /cvs/RT/Invoicing/rt_invoices.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- RT/Invoicing/rt_invoices.pl 2011/03/21 00:55:41 1.1 +++ RT/Invoicing/rt_invoices.pl 2011/03/21 01:05:38 1.2 @@ -12,7 +12,6 @@ use DateTime; -my %rates; my %included_hours; my $config = RTI::Config->new(); @@ -91,7 +90,9 @@ $date->subtract( days => 1 ); } - push @{ $invoice{projects} }, \%project; + if (@{ $project{fees} }) { + push @{ $invoice{projects} }, \%project; + } } else { $invoice{enddate} = DateTime->now->ymd; @@ -211,7 +212,10 @@ my $work_time = sprintf "%.03f", $txn->time_taken / 60; my $work_type = $txn->cf('WorkType'); - my $work_rate = $rates{$work_type} || $rates{default} || 0; + my $work_rate + = $invoice->{rates}{$work_type} + || $invoice->{rates}{default} + || 0; my $ih_type = exists $included_hours{$work_type}