Lines 76-87
my $totordered_active = 0;
Link Here
|
76 |
my $totavail_active = 0; |
76 |
my $totavail_active = 0; |
77 |
|
77 |
|
78 |
my @budget_loop; |
78 |
my @budget_loop; |
|
|
79 |
my %patrons = ($loggedinuser => Koha::Patrons->find($loggedinuser)); |
80 |
my $loggedinpatron = $patrons{$loggedinuser}->unblessed; |
79 |
foreach my $budget ( @{$budget_arr} ) { |
81 |
foreach my $budget ( @{$budget_arr} ) { |
80 |
next unless (CanUserUseBudget($loggedinuser, $budget, $userflags)); |
82 |
next unless (CanUserUseBudget($loggedinpatron, $budget, $userflags)); |
81 |
|
83 |
|
82 |
my $patron = Koha::Patrons->find( $budget->{budget_owner_id} ); |
84 |
if ( my $borrowernumber = $budget->{budget_owner_id} ) { |
83 |
if ( $patron ) { |
85 |
unless (exists $patrons{$borrowernumber}) { |
84 |
$budget->{budget_owner} = $patron; |
86 |
$patrons{$borrowernumber} = Koha::Patrons->find($borrowernumber); |
|
|
87 |
} |
88 |
$budget->{budget_owner} = $patrons{$borrowernumber}; |
85 |
} |
89 |
} |
86 |
|
90 |
|
87 |
if ( !defined $budget->{budget_amount} ) { |
91 |
if ( !defined $budget->{budget_amount} ) { |
88 |
- |
|
|