X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=catalogue%2Fmoredetail.pl;h=9d5465b9105caa8dfc505735f3df88f7a5f15f8d;hb=beb0678bfc9957145895a792a8bed42815f4ad22;hp=f5bb90452b5ebc0928f4bf069e906689088c27fa;hpb=4f0da07de61285216197f681330ee418ed14583c;p=koha_gimpoz diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl index f5bb90452b..9d5465b910 100755 --- a/catalogue/moredetail.pl +++ b/catalogue/moredetail.pl @@ -27,14 +27,15 @@ use C4::Biblio; use C4::Items; use C4::Branch; use C4::Acquisition; -use C4::Output; +use C4::Bookseller qw(GetBookSellerFromId); +use C4::Output; # contains gettemplate use C4::Auth; use C4::Serials; -use C4::Dates qw/format_date/; use C4::Circulation; # to use itemissues use C4::Members; # to use GetMember use C4::Search; # enabled_staff_search_views use C4::Members qw/GetHideLostItemsPreference/; +use Koha::DateUtils; my $query=new CGI; @@ -119,7 +120,7 @@ my $ccodes= GetKohaAuthorisedValues('items.ccode',$fw); my $itemtypes = GetItemTypes; $data->{'itemtypename'} = $itemtypes->{$data->{'itemtype'}}->{'description'}; - +$data->{'rentalcharge'} = sprintf( "%.2f", $data->{'rentalcharge'} ); foreach ( keys %{$data} ) { $template->param( "$_" => defined $data->{$_} ? $data->{$_} : '' ); } @@ -131,10 +132,8 @@ foreach my $item (@items){ $item->{'collection'} = $ccodes->{ $item->{ccode} } if ($ccodes); $item->{'itype'} = $itemtypes->{ $item->{'itype'} }->{'description'}; $item->{'replacementprice'} = sprintf( "%.2f", $item->{'replacementprice'} ); - $item->{$_} = format_date( $item->{$_} ) foreach qw/datelastborrowed dateaccessioned datelastseen lastreneweddate/; $item->{'copyvol'} = $item->{'copynumber'}; - # item has a host number if its biblio number does not match the current bib if ($item->{biblionumber} ne $biblionumber){ $item->{hostbiblionumber} = $item->{biblionumber}; @@ -147,6 +146,12 @@ foreach my $item (@items){ $item->{'ordernumber'} = $order->{'ordernumber'}; $item->{'basketno'} = $order->{'basketno'}; $item->{'booksellerinvoicenumber'} = $order->{'booksellerinvoicenumber'}; + $item->{'orderdate'} = $order->{'entrydate'}; + if ($item->{'basketno'}){ + my $basket = GetBasket($item->{'basketno'}); + my $bookseller = GetBookSellerFromId($basket->{'booksellerid'}); + $item->{'vendor'} = $bookseller->{'name'}; + } $item->{'datereceived'} = $order->{'datereceived'}; if ($item->{notforloantext} or $item->{itemlost} or $item->{damaged} or $item->{wthdrawn}) { @@ -163,7 +168,6 @@ foreach my $item (@items){ $item->{'homebranchname'} = GetBranchName($item->{'homebranch'}); $item->{'holdingbranchname'} = GetBranchName($item->{'holdingbranch'}); if ($item->{'datedue'}) { - $item->{'datedue'} = format_date($item->{'datedue'}); $item->{'issue'}= 1; } else { $item->{'issue'}= 0;