Lines 68-73
my $op = $cgiparams->{'op'} || '';
Link Here
|
68 |
my $booksellerid = $input->param('booksellerid'); |
68 |
my $booksellerid = $input->param('booksellerid'); |
69 |
my $allmatch = $input->param('allmatch'); |
69 |
my $allmatch = $input->param('allmatch'); |
70 |
my $bookseller = Koha::Acquisition::Booksellers->find( $booksellerid ); |
70 |
my $bookseller = Koha::Acquisition::Booksellers->find( $booksellerid ); |
|
|
71 |
my $logged_in_patron = Koha::Patrons->find($loggedinuser); |
72 |
my $logged_in_patron_unblessed = $logged_in_patron->unblessed; |
71 |
|
73 |
|
72 |
$template->param(scriptname => "/cgi-bin/koha/acqui/addorderiso2709.pl", |
74 |
$template->param(scriptname => "/cgi-bin/koha/acqui/addorderiso2709.pl", |
73 |
booksellerid => $booksellerid, |
75 |
booksellerid => $booksellerid, |
Lines 312-325
if ($op eq ""){
Link Here
|
312 |
} |
314 |
} |
313 |
} else { |
315 |
} else { |
314 |
# 3rd add order |
316 |
# 3rd add order |
315 |
my $patron = Koha::Patrons->find( $loggedinuser ); |
|
|
316 |
# get quantity in the MARC record (1 if none) |
317 |
# get quantity in the MARC record (1 if none) |
317 |
my $quantity = GetMarcQuantity($marcrecord, C4::Context->preference('marcflavour')) || 1; |
318 |
my $quantity = GetMarcQuantity($marcrecord, C4::Context->preference('marcflavour')) || 1; |
318 |
my %orderinfo = ( |
319 |
my %orderinfo = ( |
319 |
biblionumber => $biblionumber, |
320 |
biblionumber => $biblionumber, |
320 |
basketno => $cgiparams->{'basketno'}, |
321 |
basketno => $cgiparams->{'basketno'}, |
321 |
quantity => $c_quantity, |
322 |
quantity => $c_quantity, |
322 |
branchcode => $patron->branchcode, |
323 |
branchcode => $logged_in_patron->branchcode, |
323 |
budget_id => $c_budget_id, |
324 |
budget_id => $c_budget_id, |
324 |
uncertainprice => 1, |
325 |
uncertainprice => 1, |
325 |
sort1 => $c_sort1, |
326 |
sort1 => $c_sort1, |
Lines 406-419
if ($op eq ""){
Link Here
|
406 |
my $budgets = GetBudgets(); |
407 |
my $budgets = GetBudgets(); |
407 |
my $budget_id = @$budgets[0]->{'budget_id'}; |
408 |
my $budget_id = @$budgets[0]->{'budget_id'}; |
408 |
# build bookfund list |
409 |
# build bookfund list |
409 |
my $patron = Koha::Patrons->find( $loggedinuser )->unblessed; |
|
|
410 |
my $budget = GetBudget($budget_id); |
410 |
my $budget = GetBudget($budget_id); |
411 |
|
411 |
|
412 |
# build budget list |
412 |
# build budget list |
413 |
my $budget_loop = []; |
413 |
my $budget_loop = []; |
414 |
my $budgets_hierarchy = GetBudgetHierarchy; |
414 |
my $budgets_hierarchy = GetBudgetHierarchy; |
415 |
foreach my $r ( @{$budgets_hierarchy} ) { |
415 |
foreach my $r ( @{$budgets_hierarchy} ) { |
416 |
next unless (CanUserUseBudget($patron, $r, $userflags)); |
416 |
next unless (CanUserUseBudget($logged_in_patron_unblessed, $r, $userflags)); |
417 |
push @{$budget_loop}, |
417 |
push @{$budget_loop}, |
418 |
{ b_id => $r->{budget_id}, |
418 |
{ b_id => $r->{budget_id}, |
419 |
b_txt => $r->{budget_name}, |
419 |
b_txt => $r->{budget_name}, |