<% foreach my $app ( sort keys %{$tally} ) { %>
<% if (eval {scalar @{$tally->{$app}->{$d}}} > 0) { %>
<% if (grep { $_ eq 'app' } @{$columns}) { %>
| <%= &subs::format_name($app) %> |
<% } %>
<% if (grep { $_ eq 'when' } @{$columns}) { %>
|
<% } %>
<% if (grep { $_ eq 'occurences' } @{$columns}) { %>
<%= $tally->{$app}->{'totals'}->{'occurences'} %> |
<% } %>
<% if (grep { $_ eq 'occurence_budget' } @{$columns}) { %>
<%= $tally->{$app}->{'budget'}->{'occurences'}->{'formatted_budget'} %> |
<% } %>
<% if (grep { $_ eq 'duration' } @{$columns}) { %>
<%= &subs::duration_sayer($tally->{$app}->{'totals'}->{'duration'} / 1000) %> |
<% } %>
<% if (grep { $_ eq 'duration_budget' } @{$columns}) { %>
<%= $tally->{$app}->{'budget'}->{'duration'}->{'formatted_budget'} %> |
<% } %>
<% if (grep { $_ eq 'duration_percent' } @{$columns}) { %>
<%= abs &subs::percent_formatter($tally->{$app}->{'totals'}->{$d}->{'duration'} / $total_duration) %> |
<% } %>
<% if (grep { $_ eq 'total_budget' } @{$columns}) { %>
<%= $tally->{$app}->{'budget'}->{'total'}->{'formatted_budget'} %> |
<% } %>
<% if (grep { $_ eq 'manufacturer' } @{$columns}) { %>
<%= &subs::format_name($tally->{$app}->{'budget'}->{'total'}->{$d}->{'manufacturer'}) %> |
<% } %>
<% if (grep { $_ eq 'item' } @{$columns}) { %>
<%= &subs::format_name($tally->{$app}->{'budget'}->{'total'}->{$d}->{'item'}) %> |
<% } %>
<% if (grep { $_ eq 'vendor' } @{$columns}) { %>
<%= &subs::format_name($tally->{$app}->{'budget'}->{'total'}->{$d}->{'vendor'}) %> |
<% } %>
<% if (grep { $_ eq 'account' } @{$columns}) { %>
|
<% } %>
<% if (grep { $_ eq 'project' } @{$columns}) { %>
|
<% } %>
<% foreach my $cash ( @{$dollas} ) { %>
<% if (grep { $_ eq $cash } @{$columns}) { %>
<%= &subs::price_formatter($tally->{$app}->{'totals'}->{$d}->{$cash}) %> |
<% } %>
<% } %>
<% foreach my $t ( @{$tally->{$app}->{$d}} ) { %>
<% if (grep { $_ eq 'app' } @{$columns}) { %>
| <%= &subs::format_name($t->{'app'}) %> |
<% } %>
<% if (grep { $_ eq 'when' } @{$columns}) { %>
|
<% } %>
<% if (grep { $_ eq 'occurences' } @{$columns}) { %>
<%= $t->{'occurences'} %> |
<% } %>
<% if (grep { $_ eq 'occurence_budget' } @{$columns}) { %>
|
<% } %>
<% if (grep { $_ eq 'duration' } @{$columns}) { %>
<%= &subs::duration_sayer($t->{'duration'} / 1000) %> |
<% } %>
<% if (grep { $_ eq 'duration_budget' } @{$columns}) { %>
|
<% } %>
<% if (grep { $_ eq 'duration_percent' } @{$columns}) { %>
<%= abs &subs::percent_formatter($t->{'duration'} / $total_duration) %> |
<% } %>
<% if (grep { $_ eq 'total_budget' } @{$columns}) { %>
|
<% } %>
<% if (grep { $_ eq 'manufacturer' } @{$columns}) { %>
<%= &subs::format_name($t->{'manufacturer'}) %> |
<% } %>
<% if (grep { $_ eq 'item' } @{$columns}) { %>
<%= &subs::format_name($t->{'item'}) %> |
<% } %>
<% if (grep { $_ eq 'vendor' } @{$columns}) { %>
<%= &subs::format_name($t->{'vendor'}) %> |
<% } %>
<% if (grep { $_ eq 'account' } @{$columns}) { %>
<%= &subs::format_name($t->{'account'}) %> |
<% } %>
<% if (grep { $_ eq 'project' } @{$columns}) { %>
<%= &subs::format_name($t->{'project'}) %> |
<% } %>
<% foreach my $cash (@{$dollas}) { %>
<% if (grep { $_ eq $cash } @{$columns}) { %>
<%= &subs::price_formatter($t->{$cash}) %> |
<% } %>
<% } %>
<% } %>
<% } %>
<% } %>
| Total <%= &subs::format_name($d) %> |
<% foreach my $col ( @{$columns} ) { %>
<% unless ($col eq 'app') { %>
<% if (grep { $_ eq $col } @{$dollas}) { %>
<%= &subs::price_formatter($totals->{$d}->{$col}) %>
<% } else { %>
<%= $totals->{$d}->{$col} %>
<% } %>
|
<% } %>
<% } %>
<% } %>