=cut
-use strict;
-use warnings;
+use Modern::Perl;
use C4::Auth;
use C4::Biblio;
use C4::Budgets;
{ template_name => 'acqui/booksellers.tt',
query => $query,
type => 'intranet',
- authnotrequired => 0,
flagsrequired => { acquisition => '*' },
debug => 1,
}
my @suppliers;
if ($booksellerid) {
- push @suppliers, scalar Koha::Acquisition::Booksellers->find( $booksellerid );
+ push @suppliers, Koha::Acquisition::Booksellers->find( $booksellerid );
} else {
@suppliers = Koha::Acquisition::Booksellers->search(
{ name => { -like => "%$supplier%" } },
my $budgets = GetBudgetHierarchy;
my $has_budgets = 0;
foreach my $r (@{$budgets}) {
- if (!defined $r->{budget_amount} || $r->{budget_amount} == 0) {
- next;
- }
next unless (CanUserUseBudget($loggedinuser, $r, $userflags));
$has_budgets = 1;
$basket->{$_} ||= 0;
}
if ( $patron ) {
- $basket->{authorisedby_firstname} = $patron->firstname;
- $basket->{authorisedby_surname} = $patron->surname;
+ $basket->{authorisedby} = $patron;
}
if ($basket->{basketgroupid}) {
my $basketgroup = C4::Acquisition::GetBasketgroup($basket->{basketgroupid});