From 09e79c62c89408963a8eb56fd037e28ad8221212 Mon Sep 17 00:00:00 2001 From: Fridolin SOMERS Date: Mon, 30 Dec 2013 09:49:01 +0100 Subject: [PATCH] Revert "Bug 8230: Display acquisition details on the catalogue detail page" This reverts commit 72aad868b2385d60ec59cab045aeda133a233435. --- C4/Acquisition.pm | 10 +-- catalogue/detail.pl | 16 +---- installer/data/mysql/sysprefs.sql | 1 - installer/data/mysql/updatedatabase.pl | 7 -- .../admin/preferences/cataloguing.pref | 6 -- .../prog/en/modules/catalogue/detail.tt | 65 ------------------- 6 files changed, 3 insertions(+), 102 deletions(-) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index cf7e7b7f92..dc090b86f1 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -2187,8 +2187,6 @@ sub GetHistory { my $basketgroupname = $params{basketgroupname}; my $budget = $params{budget}; my $orderstatus = $params{orderstatus}; - my $biblionumber = $params{biblionumber}; - my $get_canceled_order = $params{get_canceled_order} || 0; my @order_loop; my $total_qty = 0; @@ -2241,16 +2239,10 @@ sub GetHistory { $query .= " WHERE 1 "; - $query .= " AND (datecancellationprinted is NULL or datecancellationprinted='0000-00-00') " - if not $get_canceled_order or ( defined $orderstatus and $orderstatus ne 'cancelled' ); + $query .= " AND (datecancellationprinted is NULL or datecancellationprinted='0000-00-00') " if $orderstatus ne 'cancelled'; my @query_params = (); - if ( $biblionumber ) { - $query .= " AND biblio.biblionumber = ?"; - push @query_params, $biblionumber; - } - if ( $title ) { $query .= " AND biblio.title LIKE ? "; $title =~ s/\s+/%/g; diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 6bc0014c53..955dbf5e1b 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -20,7 +20,6 @@ use strict; use warnings; use CGI; -use C4::Acquisition qw( GetHistory GetItemnumbersFromOrder ); use C4::Auth; use C4::Dates qw/format_date/; use C4::Koha; @@ -45,6 +44,8 @@ use C4::HTML5Media; use C4::CourseReserves qw(GetItemCourseReservesInfo); use C4::Acquisition qw(GetOrdersByBiblionumber); +# use Smart::Comments; + my $query = CGI->new(); my $analyze = $query->param('analyze'); @@ -165,19 +166,6 @@ foreach my $subscription (@subscriptions) { push @subs, \%cell; } - -# Get acquisition details -my ( $orders, $qty, $price, $received ) = C4::Acquisition::GetHistory( biblionumber => $biblionumber, get_canceled_order => 1 ); -if ( C4::Context->preference('AcqCreateItem') eq 'ordering' ) { - for my $order ( @$orders ) { - $order->{itemnumbers} = [ C4::Acquisition::GetItemnumbersFromOrder( $order->{ordernumber} ) ]; - } -} -$template->param( - orders => $orders, - AcquisitionDetails => C4::Context->preference('AcquisitionDetails'), -); - if ( defined $dat->{'itemtype'} ) { $dat->{imageurl} = getitemtypeimagelocation( 'intranet', $itemtypes->{ $dat->{itemtype} }{imageurl} ); } diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 0de3ac7338..6438483249 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -1,7 +1,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES ('AcqCreateItem','ordering','ordering|receiving|cataloguing','Define when the item is created : when ordering, when receiving, or in cataloguing module','Choice'), ('AcqItemSetSubfieldsWhenReceived','0','','This syspref set a status for item when items are created when receiving (e.g. 995\$o=5)','Free'), -('AcquisitionDetails', '1', '', 'Hide/Show acquisition details on the biblio detail page.', 'YesNo'), ('AcqViewBaskets','user','user|branch|all','Define which baskets a user is allowed to view: his own only, any within his branch or all','Choice'), ('AcqWarnOnDuplicateInvoice','0','','Warn librarians when they try to create a duplicate invoice','YesNo'), ('AddPatronLists','categorycode','categorycode|category_type','Allow user to choose what list to pick up from when adding patrons','Choice'), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index cc91a5826b..d1b11c92b2 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -7825,13 +7825,6 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } -$DBversion = "3.13.00.XXX"; -if ( CheckVersion($DBversion) ) { - $dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES('AcquisitionDetails', '1', '', 'Hide/Show acquisition details on the biblio detail page.', 'YesNo');"); - print "Upgrade to $DBversion done (Bug 8230: Add AcquisitionDetails)\n"; - SetVersion ($DBversion); -} - =head1 FUNCTIONS =head2 TableExists($table) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref index 5eb493b4a8..9d15296b10 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref @@ -176,9 +176,3 @@ Cataloging: - pref: NotesBlacklist class: multi - note fields in title notes separator (OPAC record details) and in the description separator (Staff client record details). The fields should appear separated with commas and according with the Koha MARC format (eg 3.. for UNIMARC, 5.. for MARC21) - - - - pref: AcquisitionDetails - choices: - yes: Display - no: "Don't display" - - acquisition details on the biblio detail page. diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index 1bac5a985f..26f945c8a9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -1,4 +1,3 @@ -[% USE KohaDates %] [% USE AuthorisedValues %] [% ShowCourseReserves = 0 %] @@ -255,18 +254,6 @@ function verify_images() { table.before(link); deactivate_filters(id); } - [% IF AcquisitionDetails %] - $("#orders").dataTable($.extend(true, {}, dataTablesDefaults, { - 'sDom': 't', - 'bPaginate': false, - 'bAutoWidth': false, - "aaSorting": [[ 2, "desc" ]], - "aoColumnDefs": [ - { "aTargets": [ 2, 3 ], "sType": "title-string" } - ] - })); - - [% END %] }); //]]> @@ -495,7 +482,6 @@ function verify_images() { [% END %] [% IF ( MARCNOTES || notes ) %]
  • Descriptions
  • [% END %] [% IF ( subscriptionsnumber ) %]
  • Subscriptions
  • [% END %] -[% IF AcquisitionDetails %]
  • Acquisition details
  • [% END %] [% IF ( FRBRizeEditions ) %][% IF ( XISBNS ) %]
  • Editions
  • [% END %][% END %] [% IF ( LocalCoverImages ) %][% IF ( localimages || CAN_user_tools_upload_local_cover_images ) %]
  • Images
  • [% END %][% END %] [% IF ( HTML5MediaEnabled ) %][% IF ( HTML5MediaSets ) %]
  • Play media
  • [% END %][% END %] @@ -824,57 +810,6 @@ function verify_images() { [% END %] -[% IF AcquisitionDetails %] -
    - [% IF orders %] - - - - - - - - - - - - - [% FOR order IN orders %] - - - - - - - - [% END %] - -
    BasketOrdernumberCreation dateReceive dateStatusQuantity / items
    [% order.basketname %][% order.ordernumber %][% order.creationdate | $KohaDates%][% order.datereceived | $KohaDates%] - [% SWITCH order.orderstatus %] - [% CASE '0' %]New - [% CASE '1' %]Ordered - [% CASE '2' %]Partial - [% CASE '3' %]Complete - [% CASE '4' %]Deleted - [% END %] - - [% order.quantity %] - [% IF order.itemnumbers.size > 0 && order.orderstatus != '4' %] - ( - [% FOR itemnumber IN order.itemnumbers %] - [% itemnumber %] - [%- UNLESS loop.last %],[% END %] - [% END %] - ) - [% END %] - -
    - [% ELSE %] - There is no order for this biblio. - [% END %] -
    -[% END %] - [% IF ( FRBRizeEditions ) %][% IF ( XISBNS ) %]

    Editions

    -- 2.39.5