=================================================================== RCS file: /cvs/RT/Invoicing/rt_invoices.pl,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- RT/Invoicing/rt_invoices.pl 2011/05/03 05:38:56 1.29 +++ RT/Invoicing/rt_invoices.pl 2011/05/03 05:41:11 1.30 @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $AFresh1: rt_invoices.pl,v 1.28 2011/04/19 03:35:12 andrew Exp $ +# $AFresh1: rt_invoices.pl,v 1.29 2011/05/03 04:38:56 andrew Exp $ ######################################################################## # Copyright (c) 2011 Andrew Fresh # @@ -341,8 +341,9 @@ } # Is the start date more than $freq $per before the end date? - my $diff = $billend - $date; - return {} if $diff->in_units($per) < 1; + return {} + if DateTime->compare( $date->clone->add( $per => $freq ), $billend ) + > 0; if ( $cust->{base_rate} ) { my ( $project, $hours ) = make_base_project(