cataloge subdir (and cataloguing) - Dates.pm integration and warnings fixes.
Signed-off-by: Chris Cormack <crc@liblime.com> Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
parent
a7d1ef6dff
commit
fe00a94164
|
|
@ -24,7 +24,7 @@ use CGI;
|
|||
use C4::Auth;
|
||||
use C4::Biblio;
|
||||
use C4::Output;
|
||||
use C4::Date;
|
||||
use C4::Dates;
|
||||
|
||||
my $query = new CGI;
|
||||
my $type = $query->param('type');
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ if ($op eq "do_search") {
|
|||
|
||||
$sth=$dbh->prepare($strsth);
|
||||
$sth->execute($value);
|
||||
my $total;
|
||||
$total=0;
|
||||
my @catresults;
|
||||
my $javalue;
|
||||
while (my ($value,$ctresults)=$sth->fetchrow) {
|
||||
|
|
@ -127,7 +127,7 @@ if ($op eq "do_search") {
|
|||
}
|
||||
|
||||
|
||||
my $strsth="Select distinct authtypecode from marc_subfield_structure where (";
|
||||
$strsth="Select distinct authtypecode from marc_subfield_structure where (";
|
||||
foreach my $listtags (@tags){
|
||||
my @taglist=split /,/,$listtags;
|
||||
foreach my $curtag (@taglist){
|
||||
|
|
@ -137,9 +137,9 @@ if ($op eq "do_search") {
|
|||
}
|
||||
|
||||
$strsth=~s/ OR$/)/;
|
||||
my $strsth = $strsth." and authtypecode is not NULL";
|
||||
$strsth .= " and authtypecode is not NULL";
|
||||
# warn $strsth;
|
||||
my $sth=$dbh->prepare($strsth);
|
||||
$sth=$dbh->prepare($strsth);
|
||||
$sth->execute;
|
||||
|
||||
#
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ use C4::Output;
|
|||
|
||||
use C4::Circulation; # GetBiblioIssues
|
||||
use C4::Biblio; # GetBiblio GetBiblioFromItemNumber
|
||||
use C4::Date;
|
||||
use C4::Dates;
|
||||
|
||||
my $query = new CGI;
|
||||
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
|
||||
|
|
@ -41,33 +41,32 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
|
|||
my $params = $query->Vars;
|
||||
|
||||
my $biblionumber = $params->{'biblionumber'};
|
||||
my $itemnumber = $params->{'itemnumber'};
|
||||
my $itemnumber = $params->{'itemnumber'};
|
||||
my $title = $params->{'title'};
|
||||
my $author = $params->{'author'};
|
||||
|
||||
my ($issues,$biblio,$title,$author,$barcode);
|
||||
my ($issues,$biblio,$barcode);
|
||||
if ($itemnumber){
|
||||
$issues=GetItemIssues($itemnumber);
|
||||
$biblio=GetBiblioFromItemNumber($itemnumber);
|
||||
$biblionumber=$biblio->{biblionumber};
|
||||
$barcode=$issues->[0]->{barcode};
|
||||
$template->param(
|
||||
%$biblio,
|
||||
barcode=> $barcode,
|
||||
);
|
||||
$issues=GetItemIssues($itemnumber);
|
||||
$biblio=GetBiblioFromItemNumber($itemnumber);
|
||||
$biblionumber=$biblio->{biblionumber};
|
||||
$barcode=$issues->[0]->{barcode};
|
||||
$template->param(
|
||||
%$biblio,
|
||||
barcode=> $barcode,
|
||||
);
|
||||
} else {
|
||||
my @biblio;
|
||||
$issues = GetBiblioIssues($biblionumber);
|
||||
my (undef,@biblio)=GetBiblio($biblionumber);
|
||||
my $total = scalar @$issues;
|
||||
$template->param(
|
||||
%{$biblio[0]},
|
||||
);
|
||||
$issues = GetBiblioIssues($biblionumber);
|
||||
my (undef,@biblio)=GetBiblio($biblionumber);
|
||||
my $total = scalar @$issues;
|
||||
$template->param(
|
||||
%{$biblio[0]},
|
||||
);
|
||||
}
|
||||
foreach (@$issues){
|
||||
$_->{date_due}=format_date($_->{date_due});
|
||||
$_->{issuedate}=format_date($_->{issuedate});
|
||||
$_->{returndate}=format_date($_->{returndate});
|
||||
$_->{date_due} = format_date($_->{date_due});
|
||||
$_->{issuedate} = format_date($_->{issuedate});
|
||||
$_->{returndate} = format_date($_->{returndate});
|
||||
}
|
||||
$template->param(
|
||||
total => scalar @$issues,
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ use C4::Biblio; # to use &GetBiblioItemData &GetItemsByBiblioitemnum
|
|||
use C4::Acquisition;
|
||||
use C4::Output; # contains gettemplate
|
||||
use C4::Auth;
|
||||
use C4::Date;
|
||||
use C4::Dates;
|
||||
use C4::Circulation; # to use itemissues
|
||||
|
||||
my $query=new CGI;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,8 @@ my $plugin_name="cataloguing/value_builder/".$input->param("plugin_name");
|
|||
# opening plugin. Just check wether we are on a developper computer on a production one
|
||||
# (the cgidir differs)
|
||||
my $cgidir = C4::Context->intranetdir ."/cgi-bin";
|
||||
unless (opendir(DIR, "$cgidir/cataloguing/value_builder")) {
|
||||
my $vbdir = "$cgidir/cataloguing/value_builder";
|
||||
unless (-r $vbdir and -d $vbdir) {
|
||||
$cgidir = C4::Context->intranetdir;
|
||||
}
|
||||
do $cgidir."/".$plugin_name;
|
||||
|
|
|
|||
Loading…
Reference in New Issue