-my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
+my ( $template, $loggedinuser, $cookie, $userflags ) = get_template_and_user(
- $budget->{budget_owner} =
- $member->{'firstname'} . ' ' . $member->{'surname'};
+ $budget->{budget_owner_firstname} = $member->{'firstname'};
+ $budget->{budget_owner_surname} = $member->{'surname'};
+ $budget->{budget_owner_borrowernumber} = $member->{'borrowernumber'};
+ if ($budget->{budget_period_active}){
+ $total_active += $budget->{'budget_amount'};
+ $totspent_active += $budget->{'budget_spent'};
+ $totordered_active += $budget->{'budget_ordered'};
+ $totavail_active += $budget->{'budget_avail'};
+ }
+
for my $field (qw( budget_amount budget_spent budget_ordered budget_avail ) ) {
$budget->{$field} = $num_formatter->format_price( $budget->{$field} );
}
for my $field (qw( budget_amount budget_spent budget_ordered budget_avail ) ) {
$budget->{$field} = $num_formatter->format_price( $budget->{$field} );
}
branchname => $branchname,
total => $num_formatter->format_price($total),
totspent => $num_formatter->format_price($totspent),
totordered => $num_formatter->format_price($totordered),
totcomtd => $num_formatter->format_price($totcomtd),
totavail => $num_formatter->format_price($totavail),
branchname => $branchname,
total => $num_formatter->format_price($total),
totspent => $num_formatter->format_price($totspent),
totordered => $num_formatter->format_price($totordered),
totcomtd => $num_formatter->format_price($totcomtd),
totavail => $num_formatter->format_price($totavail),
- suggestions_count => $suggestions_count,
+ total_active => $num_formatter->format_price($total_active),
+ totspent_active => $num_formatter->format_price($totspent_active),
+ totordered_active => $num_formatter->format_price($totordered_active),
+ totavail_active => $num_formatter->format_price($totavail_active),
+ suggestions_count => $suggestions_count,