Lines 69-81
the supplier this script have to display the basket.
Link Here
|
69 |
|
69 |
|
70 |
=cut |
70 |
=cut |
71 |
|
71 |
|
72 |
my $query = new CGI; |
72 |
our $query = new CGI; |
73 |
our $basketno = $query->param('basketno'); |
73 |
our $basketno = $query->param('basketno'); |
74 |
my $ean = $query->param('ean'); |
74 |
our $ean = $query->param('ean'); |
75 |
my $booksellerid = $query->param('booksellerid'); |
75 |
our $booksellerid = $query->param('booksellerid'); |
76 |
my $duplinbatch = $query->param('duplinbatch'); |
76 |
my $duplinbatch = $query->param('duplinbatch'); |
77 |
|
77 |
|
78 |
my ( $template, $loggedinuser, $cookie, $userflags ) = get_template_and_user( |
78 |
our ( $template, $loggedinuser, $cookie, $userflags ) = get_template_and_user( |
79 |
{ |
79 |
{ |
80 |
template_name => "acqui/basket.tt", |
80 |
template_name => "acqui/basket.tt", |
81 |
query => $query, |
81 |
query => $query, |
Lines 86-92
my ( $template, $loggedinuser, $cookie, $userflags ) = get_template_and_user(
Link Here
|
86 |
} |
86 |
} |
87 |
); |
87 |
); |
88 |
|
88 |
|
89 |
my $basket = GetBasket($basketno); |
89 |
our $basket = GetBasket($basketno); |
90 |
$booksellerid = $basket->{booksellerid} unless $booksellerid; |
90 |
$booksellerid = $basket->{booksellerid} unless $booksellerid; |
91 |
my $bookseller = Koha::Acquisition::Booksellers->find( $booksellerid ); |
91 |
my $bookseller = Koha::Acquisition::Booksellers->find( $booksellerid ); |
92 |
my $schema = Koha::Database->new()->schema(); |
92 |
my $schema = Koha::Database->new()->schema(); |
Lines 112-118
unless (CanUserManageBasket($loggedinuser, $basket, $userflags)) {
Link Here
|
112 |
# warn "=>".$basket->{booksellerid}; |
112 |
# warn "=>".$basket->{booksellerid}; |
113 |
my $op = $query->param('op') // 'list'; |
113 |
my $op = $query->param('op') // 'list'; |
114 |
|
114 |
|
115 |
my $confirm_pref= C4::Context->preference("BasketConfirmations") || '1'; |
115 |
our $confirm_pref= C4::Context->preference("BasketConfirmations") || '1'; |
116 |
$template->param( skip_confirm_reopen => 1) if $confirm_pref eq '2'; |
116 |
$template->param( skip_confirm_reopen => 1) if $confirm_pref eq '2'; |
117 |
|
117 |
|
118 |
my @messages; |
118 |
my @messages; |
Lines 466-471
sub get_order_infos {
Link Here
|
466 |
my $holds_count = $biblio ? $biblio->holds->count : 0; |
466 |
my $holds_count = $biblio ? $biblio->holds->count : 0; |
467 |
my @items = GetItemnumbersFromOrder( $ordernumber ); |
467 |
my @items = GetItemnumbersFromOrder( $ordernumber ); |
468 |
my $itemholds = $biblio ? $biblio->holds->search({ itemnumber => { -in => \@items } })->count : 0; |
468 |
my $itemholds = $biblio ? $biblio->holds->search({ itemnumber => { -in => \@items } })->count : 0; |
|
|
469 |
warn "L469 $holds_count $itemholds"; |
469 |
|
470 |
|
470 |
# if the biblio is not in other orders and if there is no items elsewhere and no subscriptions and no holds we can then show the link "Delete order and Biblio" see bug 5680 |
471 |
# if the biblio is not in other orders and if there is no items elsewhere and no subscriptions and no holds we can then show the link "Delete order and Biblio" see bug 5680 |
471 |
$line{can_del_bib} = 1 if $countbiblio <= 1 && $itemcount == scalar @items && !(@subscriptions) && !($holds_count); |
472 |
$line{can_del_bib} = 1 if $countbiblio <= 1 && $itemcount == scalar @items && !(@subscriptions) && !($holds_count); |
472 |
- |
|
|