| version 1.1, 2011/03/21 00:55:41 |
version 1.2, 2011/03/21 01:05:38 |
|
|
| |
|
| use DateTime; |
use DateTime; |
| |
|
| my %rates; |
|
| my %included_hours; |
my %included_hours; |
| |
|
| my $config = RTI::Config->new(); |
my $config = RTI::Config->new(); |
|
|
| $date->subtract( days => 1 ); |
$date->subtract( days => 1 ); |
| } |
} |
| |
|
| push @{ $invoice{projects} }, \%project; |
if (@{ $project{fees} }) { |
| |
push @{ $invoice{projects} }, \%project; |
| |
} |
| } |
} |
| else { |
else { |
| $invoice{enddate} = DateTime->now->ymd; |
$invoice{enddate} = DateTime->now->ymd; |
|
|
| |
|
| my $work_time = sprintf "%.03f", $txn->time_taken / 60; |
my $work_time = sprintf "%.03f", $txn->time_taken / 60; |
| my $work_type = $txn->cf('WorkType'); |
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 |
my $ih_type |
| = exists $included_hours{$work_type} |
= exists $included_hours{$work_type} |