=================================================================== RCS file: /cvs/RT/Invoicing/rt_invoices.pl,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- RT/Invoicing/rt_invoices.pl 2011/04/08 18:10:28 1.22 +++ RT/Invoicing/rt_invoices.pl 2011/04/08 19:00:16 1.23 @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $AFresh1: rt_invoices.pl,v 1.21 2011/03/24 20:03:49 andrew Exp $ +# $AFresh1: rt_invoices.pl,v 1.22 2011/04/08 17:10:28 andrew Exp $ ######################################################################## # Copyright (c) 2011 Andrew Fresh # @@ -343,7 +343,9 @@ if !$startdate || $startdate > $date; } - return if $billends <= $date; + # Is the start date more than $freq $per before the end date? + my $diff = $billends - $date; + return unless $diff->subtract( $per => $freq )->is_positive; if ( $cust->{base_rate} ) { my ( $project, $hours ) = make_base_project(