|
Lines 63-69
use C4::Biblio;
Link Here
|
| 63 |
use C4::Auth; |
63 |
use C4::Auth; |
| 64 |
use C4::Output; |
64 |
use C4::Output; |
| 65 |
use C4::Koha; |
65 |
use C4::Koha; |
| 66 |
use C4::Budgets qw/ GetBudgetHierarchy /; |
66 |
use C4::Budgets qw/ GetBudgetHierarchy CanUserUseBudget /; |
| 67 |
use C4::Languages qw(getlanguage); |
67 |
use C4::Languages qw(getlanguage); |
| 68 |
|
68 |
|
| 69 |
use Koha::Acquisition::Booksellers; |
69 |
use Koha::Acquisition::Booksellers; |
|
Lines 87-93
my $bookseller = Koha::Acquisition::Booksellers->find( $booksellerid );
Link Here
|
| 87 |
my $lang = C4::Languages::getlanguage($input); |
87 |
my $lang = C4::Languages::getlanguage($input); |
| 88 |
|
88 |
|
| 89 |
# getting the template |
89 |
# getting the template |
| 90 |
my ( $template, $loggedinuser, $cookie ) = get_template_and_user( |
90 |
my ( $template, $loggedinuser, $cookie, $userflags ) = get_template_and_user( |
| 91 |
{ |
91 |
{ |
| 92 |
template_name => "acqui/neworderbiblio.tt", |
92 |
template_name => "acqui/neworderbiblio.tt", |
| 93 |
query => $input, |
93 |
query => $input, |
|
Lines 141-152
foreach my $result ( @{$marcresults} ) {
Link Here
|
| 141 |
} |
141 |
} |
| 142 |
|
142 |
|
| 143 |
my $patron = Koha::Patrons->find( $loggedinuser ); |
143 |
my $patron = Koha::Patrons->find( $loggedinuser ); |
| 144 |
my $budgets = GetBudgetHierarchy(q{},$patron->branchcode,$patron->borrowernumber); |
144 |
my $budgets = GetBudgetHierarchy; |
| 145 |
my $has_budgets = 0; |
145 |
my $has_budgets = 0; |
| 146 |
foreach my $r (@{$budgets}) { |
146 |
foreach my $r (@{$budgets}) { |
| 147 |
if (!defined $r->{budget_amount} || $r->{budget_amount} == 0) { |
147 |
if (!defined $r->{budget_amount} || $r->{budget_amount} == 0) { |
| 148 |
next; |
148 |
next; |
| 149 |
} |
149 |
} |
|
|
150 |
next unless (CanUserUseBudget($loggedinuser, $r, $userflags)); |
| 151 |
|
| 150 |
$has_budgets = 1; |
152 |
$has_budgets = 1; |
| 151 |
last; |
153 |
last; |
| 152 |
} |
154 |
} |
| 153 |
- |
|
|