From 87cbc31d23218754c58a6e874b44a9567adbc2ad Mon Sep 17 00:00:00 2001 From: Paul Poulain Date: Tue, 16 Apr 2013 22:10:00 +0200 Subject: [PATCH] Bug 6070: publication place and [collection|series]title not properly saved Before this patch, adding an order from a suggestion with a collection title and publication place resulted in loosing those informations This patch fixes the behaviour by * adding a biblioitems.place to TransformKohaToMarc call in addorder.pl * adding publication place field in neworderempty template * sending collectiontlte & place fields to templates This patch also: * does some reindenting in addorder.pl * fixes some UCFirst coding guidelines errors in opac-suggestions.pl --- acqui/addorder.pl | 33 +++++++++++----------- acqui/neworderempty.pl | 2 ++ .../prog/en/modules/acqui/neworderempty.tt | 18 +++++++++--- 3 files changed, 33 insertions(+), 20 deletions(-) diff --git a/acqui/addorder.pl b/acqui/addorder.pl index 1b05f07..6afe9be 100755 --- a/acqui/addorder.pl +++ b/acqui/addorder.pl @@ -241,22 +241,23 @@ if ( $orderinfo->{quantity} ne '0' ) { my $record = TransformKohaToMarc( { "biblio.title" => "$$orderinfo{title}", - "biblio.author" => $$orderinfo{author} ? $$orderinfo{author} : "", - "biblio.seriestitle" => $$orderinfo{series} ? $$orderinfo{series} : "", - "biblioitems.isbn" => $$orderinfo{isbn} ? $$orderinfo{isbn} : "", - "biblioitems.ean" => $$orderinfo{ean} ? $$orderinfo{ean} : "", - "biblioitems.publishercode" => $$orderinfo{publishercode} ? $$orderinfo{publishercode} : "", - "biblioitems.publicationyear" => $$orderinfo{publicationyear} ? $$orderinfo{publicationyear}: "", - "biblio.copyrightdate" => $$orderinfo{publicationyear} ? $$orderinfo{publicationyear}: "", - "biblioitems.itemtype" => $$orderinfo{itemtype} ? $$orderinfo{itemtype} : "", - "biblioitems.editionstatement"=> $$orderinfo{editionstatement} ? $$orderinfo{editionstatement} : "", - "aqorders.branchcode" => $$orderinfo{branchcode} ? $$orderinfo{branchcode} : "", - "aqorders.quantity" => $$orderinfo{quantity} ? $$orderinfo{quantity} : "", - "aqorders.listprice" => $$orderinfo{listprice} ? $$orderinfo{listprice} : "", - "aqorders.uncertainprice" => $$orderinfo{uncertainprice} ? $$orderinfo{uncertainprice} : "", - "aqorders.rrp" => $$orderinfo{rrp} ? $$orderinfo{rrp} : "", - "aqorders.ecost" => $$orderinfo{ecost} ? $$orderinfo{ecost} : "", - "aqorders.discount" => $$orderinfo{discount} ? $$orderinfo{discount} : "", + "biblio.author" => $$orderinfo{author} ? $$orderinfo{author} : "", + "biblio.seriestitle" => $$orderinfo{series} ? $$orderinfo{series} : "", + "biblioitems.isbn" => $$orderinfo{isbn} ? $$orderinfo{isbn} : "", + "biblioitems.ean" => $$orderinfo{ean} ? $$orderinfo{ean} : "", + "biblioitems.publishercode" => $$orderinfo{publishercode} ? $$orderinfo{publishercode} : "", + "biblioitems.publicationyear" => $$orderinfo{publicationyear} ? $$orderinfo{publicationyear} : "", + "biblio.copyrightdate" => $$orderinfo{publicationyear} ? $$orderinfo{publicationyear} : "", + "biblioitems.place" => $$orderinfo{place} ? $$orderinfo{place} : "", + "biblioitems.itemtype" => $$orderinfo{itemtype} ? $$orderinfo{itemtype} : "", + "biblioitems.editionstatement"=> $$orderinfo{editionstatement}? $$orderinfo{editionstatement} : "", + "aqorders.branchcode" => $$orderinfo{branchcode} ? $$orderinfo{branchcode} : "", + "aqorders.quantity" => $$orderinfo{quantity} ? $$orderinfo{quantity} : "", + "aqorders.listprice" => $$orderinfo{listprice} ? $$orderinfo{listprice} : "", + "aqorders.uncertainprice" => $$orderinfo{uncertainprice} ? $$orderinfo{uncertainprice} : "", + "aqorders.rrp" => $$orderinfo{rrp} ? $$orderinfo{rrp} : "", + "aqorders.ecost" => $$orderinfo{ecost} ? $$orderinfo{ecost} : "", + "aqorders.discount" => $$orderinfo{discount} ? $$orderinfo{discount} : "", }); # create the record in catalogue, with framework '' diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl index 9fdf032..d12b329 100755 --- a/acqui/neworderempty.pl +++ b/acqui/neworderempty.pl @@ -400,6 +400,8 @@ $template->param( ean => $data->{'ean'}, seriestitle => $data->{'seriestitle'}, itemtypeloop => \@itemtypes, + collectiontitle => $data->{'collectiontitle'}, + place => $data->{'place'}, quantity => $data->{'quantity'}, quantityrec => $data->{'quantity'}, rrp => $data->{'rrp'}, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt index 596aa07..02f1ca2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt @@ -272,6 +272,16 @@ $(document).ready(function()
  • [% IF ( biblionumber ) %] + Publication place: + [% place %] + [% ELSE %] + + + [% END %] +
  • + +
  • + [% IF ( biblionumber ) %] Publication year: [% publicationyear %] [% ELSE %] @@ -301,11 +311,11 @@ $(document).ready(function() [% END %]
  • [% IF ( biblionumber ) %] - Series: - [% seriestitle %] + Collection title: + [% collectiontitle %] [% ELSE %] - - + + [% END %]
  • [% UNLESS ( biblionumber ) %] -- 1.8.3.2