Lines 28-39
use C4::Output;
Link Here
|
28 |
use CGI; |
28 |
use CGI; |
29 |
use C4::Acquisition; |
29 |
use C4::Acquisition; |
30 |
use C4::Budgets; |
30 |
use C4::Budgets; |
31 |
|
|
|
32 |
use C4::Bookseller qw( GetBookSellerFromId); |
31 |
use C4::Bookseller qw( GetBookSellerFromId); |
33 |
use C4::Dates qw/format_date/; |
32 |
use C4::Dates qw/format_date/; |
34 |
use C4::Debug; |
33 |
use C4::Debug; |
35 |
|
34 |
use C4::Biblio; |
36 |
use C4::Members qw/GetMember/; #needed for permissions checking for changing basketgroup of a basket |
35 |
use C4::Members qw/GetMember/; #needed for permissions checking for changing basketgroup of a basket |
|
|
36 |
use C4::Items; |
37 |
=head1 NAME |
37 |
=head1 NAME |
38 |
|
38 |
|
39 |
basket.pl |
39 |
basket.pl |
Lines 259-271
if ( $op eq 'delete_confirm' ) {
Link Here
|
259 |
# FIXME: what about the "actual cost" field? |
259 |
# FIXME: what about the "actual cost" field? |
260 |
$qty_total += $qty; |
260 |
$qty_total += $qty; |
261 |
my %line = %{ $order }; |
261 |
my %line = %{ $order }; |
262 |
|
262 |
my $biblionumber = $order->{'biblionumber'}; |
263 |
$line{order_received} = ( $qty == $order->{'quantityreceived'} ); |
263 |
my $countbiblio = CountBiblioInOrders($biblionumber); |
264 |
$line{basketno} = $basketno; |
264 |
my $ordernumber = $order->{'ordernumber'}; |
265 |
$line{budget_name} = $budget->{budget_name}; |
265 |
my @subscriptions = GetSubscriptionsId ($biblionumber); |
266 |
$line{rrp} = sprintf( "%.2f", $line{'rrp'} ); |
266 |
my $itemcount = GetItemsCount($biblionumber); |
267 |
$line{ecost} = sprintf( "%.2f", $line{'ecost'} ); |
267 |
my $holds = GetHolds ($biblionumber); |
268 |
$line{line_total} = sprintf( "%.2f", $line_total ); |
268 |
my @items = GetItemnumbersFromOrder( $ordernumber ); |
|
|
269 |
my $itemholds; |
270 |
foreach my $item (@items){ |
271 |
my $nb = GetItemHolds($biblionumber, $item); |
272 |
if ($nb){ |
273 |
$itemholds += $nb; |
274 |
} |
275 |
} |
276 |
# 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 |
277 |
$line{can_del_bib} = 1 if $countbiblio <= 1 && $itemcount == scalar @items && !(@subscriptions) && !($holds); |
278 |
$line{items} = ($itemcount) - (scalar @items); |
279 |
$line{left_item} = 1 if $line{items} >= 1; |
280 |
$line{left_biblio} = 1 if $countbiblio > 1; |
281 |
$line{biblios} = $countbiblio - 1; |
282 |
$line{left_subscription} = 1 if scalar @subscriptions >= 1; |
283 |
$line{subscriptions} = scalar @subscriptions; |
284 |
$line{left_holds} = 1 if $holds >= 1; |
285 |
$line{left_holds_on_order} = 1 if $line{left_holds}==1 && ($line{items} == 0 || $itemholds ); |
286 |
$line{holds} = $holds; |
287 |
$line{holds_on_order} = $itemholds?$itemholds:$holds if $line{left_holds_on_order}; |
288 |
$line{order_received} = ( $qty == $order->{'quantityreceived'} ); |
289 |
$line{basketno} = $basketno; |
290 |
$line{budget_name} = $budget->{budget_name}; |
291 |
$line{rrp} = sprintf( "%.2f", $line{'rrp'} ); |
292 |
$line{ecost} = sprintf( "%.2f", $line{'ecost'} ); |
293 |
$line{line_total} = sprintf( "%.2f", $line_total ); |
269 |
if ($line{uncertainprice}) { |
294 |
if ($line{uncertainprice}) { |
270 |
$template->param( uncertainprices => 1 ); |
295 |
$template->param( uncertainprices => 1 ); |
271 |
$line{rrp} .= ' (Uncertain)'; |
296 |
$line{rrp} .= ' (Uncertain)'; |