sub SearchOrder {
#### -------- SearchOrder-------------------------------
- my ($ordernumber, $search, $supplierid, $basket) = @_;
+ my ( $ordernumber, $search, $ean, $supplierid, $basket ) = @_;
my $dbh = C4::Context->dbh;
my @args = ();
$query .= " AND (biblio.title like ? OR biblio.author LIKE ? OR biblioitems.isbn like ?)";
push @args, ("%$search%","%$search%","%$search%");
}
- if($supplierid){
+ if ($ean) {
+ $query .= " AND biblioitems.ean = ?";
+ push @args, $ean;
+ }
+ if ($supplierid) {
$query .= "AND aqbasket.booksellerid = ?";
push @args, $supplierid;
}
my $title = $params{title};
my $author = $params{author};
my $isbn = $params{isbn};
+ my $ean = $params{ean};
my $name = $params{name};
my $from_placed_on = $params{from_placed_on};
my $to_placed_on = $params{to_placed_on};
my $basket = $params{basket};
my $booksellerinvoicenumber = $params{booksellerinvoicenumber};
-
my @order_loop;
my $total_qty = 0;
my $total_qtyreceived = 0;
biblio.title,
biblio.author,
biblioitems.isbn,
+ biblioitems.ean,
aqorders.basketno,
- aqbasket.basketname,
- aqbasket.basketgroupid,
- aqbasketgroups.name as groupname,
+ aqbasket.basketname,
+ aqbasket.basketgroupid,
+ aqbasketgroups.name as groupname,
aqbooksellers.name,
- aqbasket.creationdate,
+ aqbasket.creationdate,
aqorders.datereceived,
aqorders.quantity,
aqorders.quantityreceived,
aqorders.biblionumber
FROM aqorders
LEFT JOIN aqbasket ON aqorders.basketno=aqbasket.basketno
- LEFT JOIN aqbasketgroups ON aqbasket.basketgroupid=aqbasketgroups.id
+ LEFT JOIN aqbasketgroups ON aqbasket.basketgroupid=aqbasketgroups.id
LEFT JOIN aqbooksellers ON aqbasket.booksellerid=aqbooksellers.id
LEFT JOIN biblioitems ON biblioitems.biblionumber=aqorders.biblionumber
LEFT JOIN biblio ON biblio.biblionumber=aqorders.biblionumber";
$query .= " AND biblioitems.isbn LIKE ? ";
push @query_params, "%$isbn%";
}
-
+ if ( defined $ean and $ean ) {
+ $query .= " AND biblioitems.ean = ? ";
+ push @query_params, "$ean";
+ }
if ( $name ) {
$query .= " AND aqbooksellers.name LIKE ? ";
push @query_params, "%$name%";
cn_item = ?,
cn_suffix = ?,
cn_sort = ?,
- totalissues = ?
+ totalissues = ?,
+ ean = ?
where biblioitemnumber = ?
";
my $sth = $dbh->prepare($query);
$biblioitem->{'pages'}, $biblioitem->{'bnotes'}, $biblioitem->{'size'}, $biblioitem->{'place'},
$biblioitem->{'lccn'}, $biblioitem->{'url'}, $biblioitem->{'biblioitems.cn_source'}, $biblioitem->{'cn_class'},
$biblioitem->{'cn_item'}, $biblioitem->{'cn_suffix'}, $cn_sort, $biblioitem->{'totalissues'},
+ $biblioitem->{'ean'},
$biblioitem->{'biblioitemnumber'}
);
if ( $dbh->errstr ) {
cn_item = ?,
cn_suffix = ?,
cn_sort = ?,
- totalissues = ?
+ totalissues = ?,
+ ean = ?
";
my $sth = $dbh->prepare($query);
$sth->execute(
$biblioitem->{'pages'}, $biblioitem->{'bnotes'}, $biblioitem->{'size'}, $biblioitem->{'place'},
$biblioitem->{'lccn'}, $biblioitem->{'marc'}, $biblioitem->{'url'}, $biblioitem->{'biblioitems.cn_source'},
$biblioitem->{'cn_class'}, $biblioitem->{'cn_item'}, $biblioitem->{'cn_suffix'}, $cn_sort,
- $biblioitem->{'totalissues'}
+ $biblioitem->{'totalissues'}, $biblioitem->{'ean'}
);
my $bibitemnum = $dbh->{'mysql_insertid'};
=head2 GetSubscriptions
-@results = GetSubscriptions($title,$ISSN,$biblionumber);
-this function gets all subscriptions which have title like $title,ISSN like $ISSN and biblionumber like $biblionumber.
+@results = GetSubscriptions($title,$ISSN,$ean,$biblionumber);
+this function gets all subscriptions which have title like $title,ISSN like $ISSN,EAN like $ean and biblionumber like $biblionumber.
return:
a table of hashref. Each hash containt the subscription.
=cut
sub GetSubscriptions {
- my ( $string, $issn, $biblionumber ) = @_;
+ my ( $string, $issn, $ean, $biblionumber ) = @_;
#return unless $title or $ISSN or $biblionumber;
my $dbh = C4::Context->dbh;
}
$sqlwhere .= ( $sqlwhere ? " AND " : " WHERE " ) . "((" . join( ") OR (", @sqlstrings ) . "))";
}
+ if ($ean) {
+ my @sqlstrings;
+ my @strings_to_search;
+ @strings_to_search = map { "$_" } split( / /, $ean );
+ foreach my $index qw(biblioitems.ean) {
+ push @bind_params, @strings_to_search;
+ my $tmpstring = "OR $index = ? " x scalar(@strings_to_search);
+ $debug && warn "$tmpstring";
+ $tmpstring =~ s/^OR //;
+ push @sqlstrings, $tmpstring;
+ }
+ $sqlwhere .= ( $sqlwhere ? " AND " : " WHERE " ) . "((" . join( ") OR (", @sqlstrings ) . "))";
+ }
+
$sql .= "$sqlwhere ORDER BY title";
$debug and warn "GetSubscriptions query: $sql params : ", join( " ", @bind_params );
$sth = $dbh->prepare($sql);
"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}: "",
my $author = $input->param('author');
my $isbn = $input->param('isbn');
my $name = $input->param( 'name' );
+my $ean = $input->param('ean');
my $basket = $input->param( 'basket' );
my $booksellerinvoicenumber = $input->param( 'booksellerinvoicenumber' );
my $do_search = $input->param('do_search') || 0;
title => $title,
author => $author,
isbn => $isbn,
+ ean => $ean,
name => $name,
from_placed_on => $from_iso,
to_placed_on => $to_iso,
numresults => $order_loop ? scalar(@$order_loop) : undef,
title => $title,
author => $author,
- isbn => $isbn,
+ isbn => $isbn,
+ ean => $ean,
name => $name,
basket => $basket,
booksellerinvoicenumber => $booksellerinvoicenumber,
DHTMLcalendar_dateformat=> C4::Dates->DHTMLcalendar(),
dateformat => C4::Dates->new()->format(),
debug => $debug || $input->param('debug') || 0,
+ uc(C4::Context->preference("marcflavour")) => 1
);
output_html_with_http_headers $input, $cookie, $template->output;
editionstatement => $data->{'editionstatement'},
budget_loop => $budget_loop,
isbn => $data->{'isbn'},
+ ean => $data->{'ean'},
seriestitle => $data->{'seriestitle'},
itemtypeloop => \@itemtypes,
quantity => $data->{'quantity'},
# CHECKME: gst-stuff needs verifing, mason.
gstrate => $bookseller->{'gstrate'} // C4::Context->preference("gist") // 0,
gstreg => $bookseller->{'gstreg'},
+ (uc(C4::Context->preference("marcflavour"))) => 1
);
output_html_with_http_headers $input, $cookie, $template->output;
booksellerid => $basket->{'booksellerid'},
breedingid => $params->{'breedingid'},
duplicatetitle => $duplicatetitle,
+ (uc(C4::Context->preference("marcflavour"))) => 1
);
output_html_with_http_headers $input, $cookie, $template->output;
});
my @datas;
- my $search = $input->param('search') || '';
+ my $search = $input->param('search') || '';
+ my $ean = $input->param('ean') || '';
my $supplier = $input->param('booksellerid') || '';
my $basketno = $input->param('basketno') || '';
my $orderno = $input->param('orderno') || '';
- my $orders = SearchOrder($orderno, $search, $supplier, $basketno);
- foreach my $order (@$orders){
- if($order->{quantityreceived} < $order->{quantity}){
+ my $orders = SearchOrder($orderno, $search, $ean, $supplier, $basketno);
+ foreach my $order (@$orders) {
+ if ( $order->{quantityreceived} < $order->{quantity} ) {
my $data = {};
$data->{basketno} = $order->{basketno};
totalPqtyrcvd => $totalPqtyrcvd,
totalPecost => sprintf("%.2f", $totalPecost),
resultsperpage => $resultsperpage,
+ (uc(C4::Context->preference("marcflavour"))) => 1
);
output_html_with_http_headers $input, $cookie, $template->output;
#coping with subscriptions
my $subscriptionsnumber = CountSubscriptionFromBiblionumber($biblionumber);
-my @subscriptions = GetSubscriptions( $dat->{title}, $dat->{issn}, $biblionumber );
+my @subscriptions = GetSubscriptions( $dat->{title}, $dat->{issn}, undef, $biblionumber );
my @subs;
foreach my $subscription (@subscriptions) {
('022', 'Government Publication Number', 'Government Publication Number', 0, 0, '', ''),
('040', 'CODEN (Serials)', 'CODEN (Serials)', 0, 0, '', ''),
('071', 'Publisher\'s Number (Sound Recordings and Music)', '', 0, 0, '', ''),
+ ('073', 'EAN', 'EAN', 1, 0, '', ''),
('100', 'General Processing Data', 'General Processing Data', 1, 0, '', ''),
('101', 'Language of the Item', 'Language of the Item', 1, 0, '', ''),
('102', 'Country of Publication or Production', 'Country of Publication or Production', 0, 0, '', ''),
('040', 'z', 'Erroneous CODEN', 'Erroneous CODEN', 1, 0, '', 0, '', '', '', 0, -5, '', '', '', NULL),
('071', 'a', 'Publisher\'s Number (Sound Recordings and Music)', 'Publisher\'s Number (Sound Recordings and Music)', 0, 0, '', 0, '', '', '', 0, -5, '', '', '', NULL),
('071', 'b', 'Source', 'Source', 0, 0, '', 0, '', '', '', 0, -5, '', '', '', NULL),
+ ('073', 'a', 'EAN', 'EAN', 0, 0, 'biblioitems.ean', 0, '', '', '', 0, 0, '', '', '', NULL),
('100', 'a', 'General Processing Data', 'General Processing Data', 0, 0, '', 1, '', '', 'unimarc_field_100.pl', 0, 0, '', '', '', NULL),
('101', 'a', 'Language of the Text, Soundtrack, etc.', 'Language of the Text, Soundtrack, etc.', 1, 0, '', 1, 'LAN', '', '', 0, 0, '', '', '', NULL),
('101', 'b', 'Language of Intermediate Text when Item is Not Translated from Original', 'Language of Intermediate Text when Item is Not Translated from Original', 0, 0, '', 1, '', '', '', 0, -5, '', '', '', NULL),
('072', 'c', 'Numéro additionnels suivant le code normalisé', '', 0, 0, '', 0, '', '', '', 0, 0, '', NULL, '', ''),
('072', 'd', 'Mention de disponibilité et/ou de prix', '', 0, 0, '', 0, '', '', '', 0, 0, '', NULL, '', ''),
('072', 'z', 'Numéro ou code erroné', '', 0, 0, '', 0, '', '', '', 0, 0, '', NULL, '', ''),
-('073', 'a', 'Numéro', '', 0, 0, '', 0, '', '', '', NULL, 0, '', '', NULL, ''),
+('073', 'a', 'Numéro', '', 0, 0, 'biblioitems.ean', 0, '', '', '', NULL, 0, '', '', NULL, ''),
('073', 'b', 'Qualificatif', '', 0, 0, '', 0, '', '', '', NULL, 0, '', '', NULL, ''),
('073', 'c', 'Numéros additionnels', '', 0, 0, '', 0, '', '', '', NULL, 0, '', '', NULL, ''),
('073', 'd', 'Prix et disponibilité', '', 0, 0, '', 0, '', '', '', NULL, 0, '', '', NULL, ''),
('995', 'u', 'note', '', 0, 0, 'items.itemnotes', 10, '', '', '', NULL, 0, '', NULL, NULL, '');
UPDATE `marc_subfield_structure` SET maxlength=24 WHERE tagfield='000';
-UPDATE `marc_subfield_structure` SET maxlength=36 WHERE tagfield='100';
\ No newline at end of file
+UPDATE `marc_subfield_structure` SET maxlength=36 WHERE tagfield='100';
`itemtype` varchar(10) default NULL, -- biblio level item type (MARC21 942$c)
`isbn` varchar(30) default NULL, -- ISBN (MARC21 020$a)
`issn` varchar(9) default NULL, -- ISSN (MARC21 022$a)
+ `ean` varchar(13) default NULL,
`publicationyear` text,
`publishercode` varchar(255) default NULL, -- publisher (MARC21 260$b)
`volumedate` date default NULL,
`itemtype` varchar(10) default NULL, -- biblio level item type (MARC21 942$c)
`isbn` varchar(30) default NULL, -- ISBN (MARC21 020$a)
`issn` varchar(9) default NULL, -- ISSN (MARC21 022$a)
+ `ean` varchar(13) default NULL,
`publicationyear` text,
`publishercode` varchar(255) default NULL, -- publisher (MARC21 260$b)
`volumedate` date default NULL,
SetVersion($DBversion);
}
+$DBversion = "3.09.00.011";
+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
+ $dbh->do("ALTER TABLE `biblioitems` ADD `ean` VARCHAR( 13 ) NULL AFTER issn");
+ $dbh->do("CREATE INDEX `ean` ON biblioitems (`ean`) ");
+ $dbh->do("ALTER TABLE `deletedbiblioitems` ADD `ean` VARCHAR( 13 ) NULL AFTER issn");
+ if (C4::Context->preference("marcflavour") eq 'UNIMARC') {
+ $dbh->do("UPDATE marc_subfield_structure SET kohafield='biblioitems.ean' WHERE tagfield='073' and tagsubfield='a'");
+ }
+ print "Upgrade to $DBversion done (Adding ean in biblioitems and deletedbiblioitems)\n";
+ print "If you have records with ean, please run misc/batchRebuildBiblioTables.pl to populate bibliotems.ean\n" if (C4::Context->preference("marcflavour") eq 'UNIMARC');
+ SetVersion($DBversion);
+}
+
=head1 FUNCTIONS
=head2 TableExists($table)
<div id="header_search">
<div id="subscription_search" class="residentsearch">
<p class="tip">Search subscriptions:</p>
- <form action="/cgi-bin/koha/serials/serials-home.pl" method="get">[% IF ( routing ) %]<input type="hidden" name="routing" value="[% routing %]" />[% END %]<input type="hidden" name="searched" value="1" /> <label for="ISSN_filter">ISSN:</label> <input type="text" size="10" maxlength="11" name="ISSN_filter" id="ISSN_filter" value="[% ISSN_filter %]" /> <label for="title_filter">Title:</label> <input type="text" size="20" maxlength="40" name="title_filter" id="title_filter" value="[% title_filter %]" /><input type="submit" value="Search" class="submit" />
-</form>
+ <form action="/cgi-bin/koha/serials/serials-home.pl" method="get">
+ [% IF ( routing ) %]<input type="hidden" name="routing" value="[% routing %]" />[% END %]
+ <input type="hidden" name="searched" value="1" />
+ <label for="ISSN_filter">ISSN:</label> <input type="text" size="10" maxlength="11" name="ISSN_filter" id="ISSN_filter" value="[% ISSN_filter %]" />
+
+ [% IF (UNIMARC) %]
+ <label for="EAN_filter">EAN:</label> <input type="text" size="20" maxlength="40" name="EAN_filter" id="EAN_filter" value="[% EAN_filter %]" />
+ [% END %]
+ <label for="title_filter">Title:</label> <input type="text" size="20" maxlength="40" name="title_filter" id="title_filter" value="[% title_filter %]" />
+ <input type="submit" value="Search" class="submit" />
+ </form>
</div>
[% INCLUDE 'patron-search-box.inc' %]
[% IF ( CAN_user_catalogue ) %]
<li><label for="title">Title: </label> <input type="text" name="title" id="title" value="[% title %]" /></li>
<li><label for="author">Author: </label> <input type="text" name="author" id="author" value="[% author %]" /></li>
<li><label for="isbn">ISBN: </label> <input type="isbn" name="isbn" id="isbn" value="[% isbn %]" /></li>
+ [% IF (UNIMARC) %]
+ <li><label for="ean">EAN: </label> <input type="text" name="ean" id="ean" value="[% ean %]" /></li>
+ [% END %]
<li><label for="name">Vendor: </label> <input type="text" name="name" id="name" value="[% name %]" /></li>
<li><label for="basket">Basket: </label> <input type="text" name="basket" id="basket" value="[% basket %]" /></li>
<li><label for="booksellerinvoicenumber ">Bookseller invoice no: </label> <input type="text" name="booksellerinvoicenumber" id="booksellerinvoicenumber" value="[% booksellerinvoicenumber %]" /></li>
<input type="text" size="50" name="isbn" id="ISBN" value="[% isbn %]" />
[% END %]
</li>
+ [% IF (UNIMARC) %]
+ <li>
+ [% IF ( biblionumber ) %]
+ <span class="label">EAN: </span>
+ <input type="hidden" size="20" name="ean" id="EAN" value="[% ean %]" />[% ean %]
+ [% ELSE %]
+ <label for="EAN">EAN: </label>
+ <input type="text" size="20" name="ean" id="EAN" value="[% ean %]" />
+ [% END %]
+ </li>
+ [% END %]
<li>
[% IF ( biblionumber ) %]
<span class="label">Series: </span>
var summaryStatus = jQuery.trim($("#summaryfilter").val());
var basketStatus = $("#basketfilter").val();
var orderStatus = $("#orderfilter").val();
+ var eanStatus = $("#eanfilter").val() || '';
- if (summaryStatus == '' && basketStatus == '' && orderStatus == '') { clearFilters(); return false; }
+ if (summaryStatus == '' && basketStatus == '' && orderStatus == '' && eanStatus == '') { clearFilters(); return false; }
var filtered = "table#pendingt tbody.filterclass tr";
}catch(e){alert(e);}
}
}
- var transaction = YAHOO.util.Connect.asyncRequest('GET', '/cgi-bin/koha/acqui/parcel.pl?booksellerid=[% booksellerid %]&search='+summaryStatus+'&basketno='+basketStatus+'&orderno='+orderStatus+'&format=json', callback, null);
+ var transaction = YAHOO.util.Connect.asyncRequest('GET', '/cgi-bin/koha/acqui/parcel.pl?booksellerid=[% booksellerid %]&search='+summaryStatus+'&basketno='+basketStatus+'&orderno='+orderStatus+'&ean='+eanStatus+'&format=json', callback, null);
return false;
}
<label for="orderfilter">Order line :</label>
<input type="text" name="orderfilter" id="orderfilter" />
</li>
+ [% IF (UNIMARC) %]
+ <li>
+ <label for="eanfilter">EAN :</label>
+ <input type="text" name="eanfilter" id="eanfilter" />
+ </li>
+ [% END %]
</ol>
<fieldset class="action">
<input type="submit" value="Filter" />
my $subscriptionsnumber = CountSubscriptionFromBiblionumber($biblionumber);
my $dbh = C4::Context->dbh;
my $dat = TransformMarcToKoha( $dbh, $record );
-my @subscriptions = GetSubscriptions( undef, undef, $biblionumber );
+my @subscriptions = GetSubscriptions( $dat->{title}, $dat->{issn}, undef, $biblionumber );
my @subs;
foreach my $subscription (@subscriptions) {
my %cell;
SetUTF8Flag($record);
+my $marcflavour = C4::Context->preference("marcflavour");
+my $ean = GetNormalizedEAN( $record, $marcflavour );
# XSLT processing of some stuff
if (C4::Context->preference("OPACXSLTDetailsDisplay") ) {
my @all_items = GetItemsInfo( $biblionumber );
# adding items linked via host biblios
-my $marcflavour = C4::Context->preference("marcflavour");
my $analyticfield = '773';
if ($marcflavour eq 'MARC21' || $marcflavour eq 'NORMARC'){
#coping with subscriptions
my $subscriptionsnumber = CountSubscriptionFromBiblionumber($biblionumber);
-my @subscriptions = GetSubscriptions( undef, undef, $biblionumber );
+my @subscriptions = GetSubscriptions($dat->{'title'}, $dat->{'issn'}, $ean, $biblionumber );
my @subs;
$dat->{'serial'}=1 if $subscriptionsnumber;
# in each case, we're grabbing the first value we find in
# the record and normalizing it
my $upc = GetNormalizedUPC($record,$marcflavour);
-my $ean = GetNormalizedEAN($record,$marcflavour);
my $oclc = GetNormalizedOCLCNumber($record,$marcflavour);
my $isbn = GetNormalizedISBN(undef,$record,$marcflavour);
my $content_identifier_exists;
}
$template->param (
DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
+ (uc(C4::Context->preference("marcflavour"))) => 1
);
output_html_with_http_headers $query, $cookie, $template->output;
branchloop => $branchloop,
dateformat => C4::Context->preference("dateformat"),
DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
+ (uc(C4::Context->preference("marcflavour"))) => 1
);
output_html_with_http_headers $input, $cookie, $template->output;
routingnotes => $routingnotes,
generalroutingnote => C4::Context->preference('RoutingListNote'),
hasRouting => check_routing($subscriptionid),
+ (uc(C4::Context->preference("marcflavour"))) => 1
);
output_html_with_http_headers $query, $cookie, $template->output;
dates => $dates,
routingnotes => $serials[0]->{'routingnotes'},
hasRouting => check_routing($subscriptionid),
+ (uc(C4::Context->preference("marcflavour"))) => 1
+
);
output_html_with_http_headers $query, $cookie, $template->output;
virtualshelves => "".C4::Context->preference("virtualshelves"),
);
}
+$template->param((uc(C4::Context->preference("marcflavour"))) => 1);
output_html_with_http_headers $query, $cookie, $template->output;
subscriptioncount => $subscriptioncount,
location => $locationlib,
callnumber => $callnumber,
+ uc(C4::Context->preference("marcflavour")) => 1
);
output_html_with_http_headers $query, $cookie, $template->output;
serialslist => \@serialdatalist,
default_bib_view => $default_bib_view,
location => $locationlib,
+ (uc(C4::Context->preference("marcflavour"))) => 1
+
);
output_html_with_http_headers $query, $cookie, $template->output;
use C4::Context;
use C4::Branch;
-my $query = new CGI;
-my $title = $query->param('title_filter');
-my $ISSN = $query->param('ISSN_filter');
-my $routing = $query->param('routing')||C4::Context->preference("RoutingSerials");
-my $searched = $query->param('searched');
-my $biblionumber = $query->param('biblionumber');
+my $query = new CGI;
+my $title = $query->param('title_filter');
+my $ISSN = $query->param('ISSN_filter');
+my $EAN = $query->param('EAN_filter');
+my $routing = $query->param('routing') || C4::Context->preference("RoutingSerials");
+my $searched = $query->param('searched');
+my $biblionumber = $query->param('biblionumber');
my @serialseqs = $query->param('serialseq');
my @planneddates = $query->param('planneddate');
$template->param('information'=>\@information);
}
my @subscriptions;
-if ($searched){
- @subscriptions = GetSubscriptions( $title, $ISSN, $biblionumber );
+if ($searched) {
+ @subscriptions = GetSubscriptions( $title, $ISSN, $EAN, $biblionumber );
}
# to toggle between create or edit routing list options
ISSN_filter => $ISSN,
done_searched => $searched,
routing => $routing,
+ (uc(C4::Context->preference("marcflavour"))) => 1
);
+
output_html_with_http_headers $query, $cookie, $template->output;
frommissing => $manualstatus,
missingdate => $manualdate,
missingid => $manualid,
+ (uc(C4::Context->preference("marcflavour"))) => 1
);
output_html_with_http_headers $query, $cookie, $template->output;
$template->param(bibliotitle => $bib->{title});
}
}
+ $template->param((uc(C4::Context->preference("marcflavour"))) => 1);
output_html_with_http_headers $query, $cookie, $template->output;
}
intranetcolorstylesheet => C4::Context->preference('intranetcolorstylesheet'),
irregular_issues => scalar @irregular_issues,
default_bib_view => $default_bib_view,
+ (uc(C4::Context->preference("marcflavour"))) => 1
);
output_html_with_http_headers $query, $cookie, $template->output;
}
$template->param(alertloop => $borrowers,
bibliotitle => $subscription->{bibliotitle},
- subscriptionid => $subscriptionid);
+ subscriptionid => $subscriptionid,
+ (uc(C4::Context->preference("marcflavour"))) => 1
+ );
output_html_with_http_headers $input, $cookie, $template->output;
@subscriptions = GetSubscriptions( undef, $$subscriptioninformation{issn} );
isa_ok( \@subscriptions, 'ARRAY' );
$debug && warn scalar(@subscriptions);
-@subscriptions = GetSubscriptions( undef,undef ,$$subscriptioninformation{bibnum} );
+@subscriptions = GetSubscriptions( undef, undef, $$subscriptioninformation{ean} );
+isa_ok( \@subscriptions, 'ARRAY' );
+$debug && warn scalar(@subscriptions);
+@subscriptions = GetSubscriptions( undef, undef, undef, $$subscriptioninformation{bibnum} );
isa_ok( \@subscriptions, 'ARRAY' );
$debug && warn scalar(@subscriptions);
if ($subscriptioninformation->{periodicity} % 16==0){
# diag( Data::Dumper->Dump( [ $order_loop ], [ 'order_loop' ] ) );
}
+ # searching by isbn
+ {
+ my ( $order_loop, $total_qty, $total_price, $total_qtyreceived) = GetHistory( isbn => $bibliodata->{'isbn'} );
+ # diag( Data::Dumper->Dump( [ $order_loop, $total_qty, $total_price, $total_qtyreceived ], [ qw( order_loop total_qty total_price total_qtyreceived ) ] ) );
+
+ is( scalar @$order_loop, 1, 'order_loop searched by isbn' );
+ is( $total_qty, 1, 'total_qty searched by isbn' );
+ is( $total_price, 1, 'total_price searched by isbn' );
+ is( $total_qtyreceived, 0, 'total_qtyreceived searched by isbn' );
+
+ # diag( Data::Dumper->Dump( [ $order_loop ], [ 'order_loop' ] ) );
+ }
+
+ # searching by ean
+ {
+ my ( $order_loop, $total_qty, $total_price, $total_qtyreceived) = GetHistory( ean => $bibliodata->{'ean'} );
+ # diag( Data::Dumper->Dump( [ $order_loop, $total_qty, $total_price, $total_qtyreceived ], [ qw( order_loop total_qty total_price total_qtyreceived ) ] ) );
+
+ is( scalar @$order_loop, 1, 'order_loop searched by ean' );
+ is( $total_qty, 1, 'total_qty searched by ean' );
+ is( $total_price, 1, 'total_price searched by ean' );
+ is( $total_qtyreceived, 0, 'total_qtyreceived searched by ean' );
+
+ # diag( Data::Dumper->Dump( [ $order_loop ], [ 'order_loop' ] ) );
+ }
+
+
# searching by basket number
{
my ( $order_loop, $total_qty, $total_price, $total_qtyreceived) = GetHistory( basket => $basketno );