reordering code & debugging
This commit is contained in:
parent
d5bf14f780
commit
8e5b1d4792
337
C4/Bull.pm
337
C4/Bull.pm
|
|
@ -41,10 +41,129 @@ Give all XYZ functions
|
|||
=cut
|
||||
|
||||
@ISA = qw(Exporter);
|
||||
@EXPORT = qw(&Initialize_Sequence &Find_Next_Date, &Get_Next_Seq);
|
||||
@EXPORT = qw(&newsubscription &modsubscription &getsubscriptions &getsubscription
|
||||
&modsubscriptionhistory
|
||||
&getserials &serialchangestatus
|
||||
&Initialize_Sequence &Find_Next_Date, &Get_Next_Seq);
|
||||
|
||||
# FIXME - Retirer ce FIXME il ne sert pas.
|
||||
sub newsubscription {
|
||||
my ($auser,$aqbooksellerid,$cost,$aqbudgetid,$biblionumber,$startdate,$periodicity,$dow,$numberlength,$weeklength,$monthlength,$seqnum1,$seqnum1,$seqtype1,$freq1, $step1,$seqnum2,$seqnum2,$seqtype2,$freq2, $step2,$seqnum3,$seqnum3,$seqtype3,$freq3, $step3, $numberingmethod, $arrivalplanified, $status, $notes) = @_;
|
||||
my $dbh = C4::Context->dbh;
|
||||
#save subscription
|
||||
my $sth=$dbh->prepare("insert into subscription (librarian, aqbooksellerid,cost,aqbudgetid,biblionumber,startdate, periodicity,dow,numberlength,weeklength,monthlength,seqnum1,startseqnum1,seqtype1,freq1,step1,seqnum2,startseqnum2,seqtype2,freq2, step2, seqnum3,startseqnum3,seqtype3, freq3, step3,numberingmethod, arrivalplanified, status, notes, pos1, pos2, pos3) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?, 0, 0, 0)");
|
||||
$sth->execute($auser,$aqbooksellerid,$cost,$aqbudgetid,$biblionumber,$startdate,$periodicity,$dow,$numberlength,$weeklength,$monthlength,$seqnum1,$seqnum1,$seqtype1,$freq1, $step1,$seqnum2,$seqnum2,$seqtype2,$freq2, $step2,$seqnum3,$seqnum3,$seqtype3,$freq3, $step3, $numberingmethod, $arrivalplanified, $status, $notes);
|
||||
#then create the 1st waited number
|
||||
my $subscriptionid = $dbh->{'mysql_insertid'};
|
||||
$sth = $dbh->prepare("insert into subscriptionhistory (biblionumber, subscriptionid, startdate, enddate, missinglist, recievedlist, opacnote, librariannote) values (?,?,?,?,?,?,?,?)");
|
||||
$sth->execute($biblionumber, $subscriptionid, $startdate, 0, "", "", 0, $notes);
|
||||
$sth = $dbh->prepare("insert into serial (biblionumber, subscriptionid, serialseq, status, planneddate) values (?,?,?,?,?)");
|
||||
$sth->execute($biblionumber, $subscriptionid, Initialize_Sequence($numberingmethod, $seqnum1, $seqtype1, $freq1, $step1, $seqnum2, $seqtype2, $freq2, $step2, $seqnum3, $seqtype3, $freq3, $step3), $status, C4::Bull::Find_Next_Date());
|
||||
$sth->finish;
|
||||
|
||||
}
|
||||
sub getsubscription {
|
||||
my ($subscriptionid) = @_;
|
||||
my $dbh = C4::Context->dbh;
|
||||
my $sth = $dbh->prepare('select subscription.*,aqbudget.bookfundid,aqbooksellers.name as aqbooksellername,biblio.title as bibliotitle
|
||||
from subscription
|
||||
left join aqbudget on subscription.aqbudgetid=aqbudget.aqbudgetid
|
||||
left join aqbooksellers on subscription.aqbooksellerid=aqbooksellers.id
|
||||
left join biblio on biblio.biblionumber=subscription.biblionumber
|
||||
where subscriptionid = ?');
|
||||
$sth->execute($subscriptionid);
|
||||
my $subs = $sth->fetchrow_hashref;
|
||||
return $subs;
|
||||
}
|
||||
|
||||
sub modsubscription {
|
||||
my ($auser,$aqbooksellerid,$cost,$aqbudgetid,$startdate,
|
||||
$periodicity,$dow,$numberlength,$weeklength,$monthlength,
|
||||
$seqnum1,$startseqnum1,$seqtype1,$freq1,$step1,
|
||||
$seqnum2,$startseqnum2,$seqtype2,$freq2,$step2,
|
||||
$seqnum3,$startseqnum3,$seqtype3,$freq3,$step3,
|
||||
$numberingmethod, $arrivalplanified, $status, $biblionumber, $notes, $subscriptionid)= @_;
|
||||
my $dbh = C4::Context->dbh;
|
||||
my $sth=$dbh->prepare("update subscription set librarian=?, aqbooksellerid=?,cost=?,aqbudgetid=?,startdate=?, periodicity=?,dow=?,numberlength=?,weeklength=?,monthlength=?,seqnum1=?,startseqnum1=?,seqtype1=?,freq1=?,step1=?,seqnum2=?,startseqnum2=?,seqtype2=?,freq2=?, step2=?, seqnum3=?,startseqnum3=?,seqtype3=?, freq3=?, step3=?,numberingmethod=?, arrivalplanified=?, status=?, biblionumber=?, notes=? where subscriptionid = ?");
|
||||
$sth->execute($auser,$aqbooksellerid,$cost,$aqbudgetid,$startdate,
|
||||
$periodicity,$dow,$numberlength,$weeklength,$monthlength,
|
||||
$seqnum1,$startseqnum1,$seqtype1,$freq1,$step1,
|
||||
$seqnum2,$startseqnum2,$seqtype2,$freq2,$step2,
|
||||
$seqnum3,$startseqnum3,$seqtype3,$freq3,$step3,
|
||||
$numberingmethod, $arrivalplanified, $status, $biblionumber, $notes, $subscriptionid);
|
||||
$sth->finish;
|
||||
|
||||
}
|
||||
|
||||
sub getsubscriptions {
|
||||
my ($title,$ISSN) = @_;
|
||||
my $dbh = C4::Context->dbh;
|
||||
my $sth;
|
||||
$sth = $dbh->prepare("select subscription.subscriptionid,biblio.title,biblioitems.issn from subscription,biblio,biblioitems where biblio.biblionumber = biblioitems.biblionumber and biblio.biblionumber=subscription.biblionumber and (biblio.title like ? or biblioitems.issn = ? )");
|
||||
$sth->execute($title,$ISSN);
|
||||
my @results;
|
||||
while (my $line = $sth->fetchrow_hashref) {
|
||||
push @results, $line;
|
||||
}
|
||||
return @results;
|
||||
}
|
||||
|
||||
sub modsubscriptionhistory {
|
||||
my ($subscriptionid,$startdate,$enddate,$recievedlist,$missinglist,$opacnote,$librariannote)=@_;
|
||||
my $dbh=C4::Context->dbh;
|
||||
my $sth = $dbh->prepare("update subscriptionhistory set startdate=?,enddate=?,recievedlist=?,missinglist=?,opacnote=?,librariannote=? where subscriptionid=?");
|
||||
$sth->execute($startdate,$enddate,$recievedlist,$missinglist,$opacnote,$librariannote,$subscriptionid);
|
||||
}
|
||||
# get every serial not arrived for a given subscription.
|
||||
sub getserials {
|
||||
my ($subscriptionid) = @_;
|
||||
my $dbh = C4::Context->dbh;
|
||||
# status = 2 is "arrived"
|
||||
my $sth=$dbh->prepare("select serialid,serialseq, status, planneddate from serial where subscriptionid = ? and status <>2 and status <>4");
|
||||
$sth->execute($subscriptionid);
|
||||
my @serials;
|
||||
while(my $line = $sth->fetchrow_hashref) {
|
||||
$line->{"status".$line->{status}} = 1; # fills a "statusX" value, used for template status select list
|
||||
push @serials,$line;
|
||||
}
|
||||
return @serials;
|
||||
}
|
||||
|
||||
sub serialchangestatus {
|
||||
my ($serialid,$serialseq,$planneddate,$status)=@_;
|
||||
warn "($serialid,$serialseq,$planneddate,$status)";
|
||||
# return 1;
|
||||
# 1st, get previous status : if we change from "waited" to something else, then we will have to create a new "waited" entry
|
||||
my $dbh = C4::Context->dbh;
|
||||
my $sth = $dbh->prepare("select subscriptionid,status from serial where serialid=?");
|
||||
$sth->execute($serialid);
|
||||
my ($subscriptionid,$oldstatus) = $sth->fetchrow;
|
||||
# change status & update subscriptionhistory
|
||||
$sth = $dbh->prepare("update serial set serialseq=?,planneddate=?,status=? where serialid = ?");
|
||||
$sth->execute($serialseq,$planneddate,$status,$serialid);
|
||||
$sth = $dbh->prepare("select missinglist,recievedlist from subscriptionhistory where subscriptionid=?");
|
||||
$sth->execute($subscriptionid);
|
||||
my ($missinglist,$recievedlist) = $sth->fetchrow;
|
||||
if ($status eq 2) {
|
||||
$recievedlist .= ",$serialseq";
|
||||
}
|
||||
if ($status eq 4) {
|
||||
$missinglist .= ",$serialseq";
|
||||
}
|
||||
$sth=$dbh->prepare("update subscriptionhistory set recievedlist=?, missinglist=? where subscriptionid=?");
|
||||
$sth->execute($recievedlist,$missinglist,$subscriptionid);
|
||||
# create new waited entry if needed (ie : was a "waited" and has changed)
|
||||
if ($oldstatus eq 1 && $status ne 1) {
|
||||
$sth = $dbh->prepare("select * from subscription where subscriptionid = ? ");
|
||||
$sth->execute($subscriptionid);
|
||||
my $val = $sth->fetchrow_hashref;
|
||||
$sth = $dbh->prepare("insert into serial (serialseq,subscriptionid,biblionumber,status, planneddate) values (?,?,?,?,?)");
|
||||
my ($temp, $X, $Y, $Z, $pos1, $pos2, $pos3) = Get_Next_Seq($val->{'numberingmethod'},$val->{'seqnum1'},$val->{'freq1'}, $val->{'step1'}, $val->{'seqtype1'}, $val->{'seqnum2'}, $val->{'freq2'}, $val->{'step2'}, $val->{'seqtype2'}, $val->{'seqnum3'}, $val->{'freq3'}, $val->{'step3'}, $val->{'seqtype3'}, $val->{'pos1'}, $val->{'pos2'}, $val->{'pos3'});
|
||||
$sth->execute($temp, $subscriptionid, $val->{'biblionumber'}, 1, 0);
|
||||
$sth = $dbh->prepare("update subscription set seqnum1=?, seqnum2=?,seqnum3=?,pos1=?,pos2=?,pos3=? where subscriptionid = ?");
|
||||
$sth->execute($X, $Y, $Z, $pos1, $pos2, $pos3, $subscriptionid);
|
||||
|
||||
}
|
||||
}
|
||||
sub GetValue(@) {
|
||||
my $seq = shift;
|
||||
my $X = shift;
|
||||
|
|
@ -59,58 +178,38 @@ sub GetValue(@) {
|
|||
|
||||
|
||||
sub Initialize_Sequence(@) {
|
||||
my $sequence = shift;
|
||||
my $X = shift;
|
||||
my $Xstate = shift;
|
||||
my $Xfreq = shift;
|
||||
my $Xstep = shift;
|
||||
my $Y = shift;
|
||||
my $Ystate = shift;
|
||||
my $Yfreq = shift;
|
||||
my $Ystep = shift;
|
||||
my $Z = shift;
|
||||
my $Zstate = shift;
|
||||
my $Zfreq = shift;
|
||||
my $Zstep = shift;
|
||||
my $finalstring = "";
|
||||
my @string = split //, $sequence;
|
||||
my $etat = 0;
|
||||
|
||||
for (my $i = 0; $i < (scalar @string); $i++)
|
||||
{
|
||||
if ($string[$i] ne '{')
|
||||
{
|
||||
if (!$etat)
|
||||
{
|
||||
my $sequence = shift;
|
||||
my $X = shift;
|
||||
my $seqtype1 = shift;
|
||||
my $freq1 = shift;
|
||||
my $step1 = shift;
|
||||
my $Y = shift;
|
||||
my $seqtype2 = shift;
|
||||
my $freq2 = shift;
|
||||
my $step2 = shift;
|
||||
my $Z = shift;
|
||||
my $seqtype3 = shift;
|
||||
my $freq3 = shift;
|
||||
my $step3 = shift;
|
||||
my $finalstring = "";
|
||||
my @string = split //, $sequence;
|
||||
my $etat = 0;
|
||||
|
||||
for (my $i = 0; $i < (scalar @string); $i++) {
|
||||
if ($string[$i] ne '{') {
|
||||
if (!$etat) {
|
||||
$finalstring .= $string[$i];
|
||||
}
|
||||
else
|
||||
{
|
||||
return "1 Syntax Error in Sequence";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
# if ($string[$i + 1] eq '\'')
|
||||
# {
|
||||
# return "2 Syntax Error in Sequence"
|
||||
# if ($string[$i + 2] ne 'X' && $string[$i + 2] ne 'Y' && $string[$i + 2] ne 'Z');
|
||||
|
||||
# $finalstring .= GetValueAsc($string[$i + 2], $X, $Y, $Z);
|
||||
# $i += 3;
|
||||
# }
|
||||
# else
|
||||
# {
|
||||
return "3 Syntax Error in Sequence"
|
||||
if ($string[$i + 1] ne 'X' && $string[$i + 1] ne 'Y' && $string[$i + 1] ne 'Z');
|
||||
|
||||
|
||||
$finalstring .= GetValue($string[$i + 1], $X, $Y, $Z);
|
||||
$i += 2;
|
||||
# }
|
||||
} else {
|
||||
return "1 Syntax Error in Sequence";
|
||||
}
|
||||
} else {
|
||||
return "3 Syntax Error in Sequence"
|
||||
if ($string[$i + 1] ne 'X' && $string[$i + 1] ne 'Y' && $string[$i + 1] ne 'Z');
|
||||
$finalstring .= GetValue($string[$i + 1], $X, $Y, $Z);
|
||||
$i += 2;
|
||||
}
|
||||
}
|
||||
return "$finalstring";
|
||||
}
|
||||
return "$finalstring";
|
||||
}
|
||||
|
||||
sub Find_Next_Date(@) {
|
||||
|
|
@ -118,74 +217,90 @@ sub Find_Next_Date(@) {
|
|||
}
|
||||
|
||||
sub Step(@) {
|
||||
my $X = shift;
|
||||
my $Xstate = shift;
|
||||
my $Xfreq = shift;
|
||||
my $Xstep = shift;
|
||||
my $Y = shift;
|
||||
my $Ystate = shift;
|
||||
my $Yfreq = shift;
|
||||
my $Ystep = shift;
|
||||
my $Z = shift;
|
||||
my $Zstate = shift;
|
||||
my $Zfreq = shift;
|
||||
my $Zstep = shift;
|
||||
my $Xpos = shift;
|
||||
my $Ypos = shift;
|
||||
my $Zpos = shift;
|
||||
my $seqnum1 = shift;
|
||||
my $seqtype1 = shift;
|
||||
my $freq1 = shift;
|
||||
my $step1 = shift;
|
||||
my $seqnum2 = shift;
|
||||
my $seqtype2 = shift;
|
||||
my $freq2 = shift;
|
||||
my $step2 = shift;
|
||||
my $seqnum3 = shift;
|
||||
my $seqtype3 = shift;
|
||||
my $freq3 = shift;
|
||||
my $step3 = shift;
|
||||
my $pos1 = shift;
|
||||
my $pos2 = shift;
|
||||
my $pos3 = shift;
|
||||
|
||||
$seqnum1 += $step1 if ($seqtype1 == 1);
|
||||
if ($seqtype1 == 2) {
|
||||
$pos1 += 1;
|
||||
if ($pos1 >= $freq1) {
|
||||
$pos1 = 0;
|
||||
$seqnum1 += $step1;
|
||||
}
|
||||
}
|
||||
|
||||
$seqnum2 += $step2 if ($seqtype2 == 1);
|
||||
if ($seqtype2 == 2) {
|
||||
$pos2 += 1;
|
||||
if ($pos2 >= $freq2) {
|
||||
$pos2 = 0;
|
||||
$seqnum2 += $step2;
|
||||
}
|
||||
}
|
||||
|
||||
$seqnum3 += $step3 if ($seqtype3 == 1);
|
||||
if ($seqtype3 == 2) {
|
||||
$pos3 += 1;
|
||||
if ($pos3 >= $freq3) {
|
||||
$pos3 = 0;
|
||||
$seqnum3 += $step3;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$X += $Xstep if ($Xstate == 1);
|
||||
if ($Xstate == 2) { $Xpos += 1; if ($Xpos >= $Xfreq) {
|
||||
$Xpos = 0; $X += $Xstep; } }
|
||||
|
||||
$Y += $Ystep if ($Ystate == 1);
|
||||
if ($Ystate == 2) { $Ypos += 1; if ($Ypos >= $Yfreq) {
|
||||
$Ypos = 0; $Y += $Ystep; } }
|
||||
|
||||
$Z += $Zstep if ($Zstate == 1);
|
||||
if ($Zstate == 2) { $Zpos += 1; if ($Zpos >= $Zfreq) {
|
||||
$Zpos = 0; $Z += $Zstep; } }
|
||||
|
||||
# $Y += $Ystep; if ($Ystate == 1);
|
||||
# if ($Ystate == 2) { $Ypos += 1; if ($Ypos >= $Yfreq) {
|
||||
#$Ypos = 0; $Y += $Ystep; } }
|
||||
# $Y += $step2; if ($seqtype2 == 1);
|
||||
# if ($seqtype2 == 2) { $pos2 += 1; if ($pos2 >= $freq2) {
|
||||
#$pos2 = 0; $Y += $step2; } }
|
||||
|
||||
|
||||
# $Z += $Zstep; if ($Zstate == 1);
|
||||
# if ($Zstate == 2) { $Zpos += 1; if ($Zpos >= $Zfreq) {
|
||||
# $Zpos = 0; $Z += $Zstep; } }
|
||||
# $Z += $step3; if ($seqtype3 == 1);
|
||||
# if ($seqtype3 == 2) { $pos3 += 1; if ($pos3 >= $freq3) {
|
||||
# $pos3 = 0; $Z += $step3; } }
|
||||
|
||||
return ($X, $Y, $Z, $Xpos, $Ypos, $Zpos);
|
||||
return ($seqnum1, $seqnum2, $seqnum3, $pos1, $pos2, $pos3);
|
||||
}
|
||||
|
||||
sub Get_Next_Seq(@) {
|
||||
my $sequence = shift;
|
||||
my $X = shift;
|
||||
my $Xfreq = shift;
|
||||
my $Xstep = shift;
|
||||
my $Xstate = shift;
|
||||
my $Y = shift;
|
||||
my $Yfreq = shift;
|
||||
my $Ystep = shift;
|
||||
my $Ystate = shift;
|
||||
my $Z = shift;
|
||||
my $Zfreq = shift;
|
||||
my $Zstep = shift;
|
||||
my $Zstate = shift;
|
||||
my $Xpos = shift;
|
||||
my $Ypos = shift;
|
||||
my $Zpos = shift;
|
||||
my $seqnum1 = shift;
|
||||
my $freq1 = shift;
|
||||
my $step1 = shift;
|
||||
my $seqtype1 = shift;
|
||||
my $seqnum2 = shift;
|
||||
my $freq2 = shift;
|
||||
my $step2 = shift;
|
||||
my $seqtype2 = shift;
|
||||
my $seqnum3 = shift;
|
||||
my $freq3 = shift;
|
||||
my $step3 = shift;
|
||||
my $seqtype3 = shift;
|
||||
my $pos1 = shift;
|
||||
my $pos2 = shift;
|
||||
my $pos3 = shift;
|
||||
|
||||
return ("$sequence", $X, $Y, $Z)
|
||||
if (!defined($X) && !defined($Y) && !defined($Z));
|
||||
($X, $Y, $Z, $Xpos, $Ypos, $Zpos) =
|
||||
Step($X, $Xstate, $Xfreq, $Xstep, $Y, $Ystate, $Yfreq,
|
||||
$Ystep, $Z, $Zstate, $Zfreq, $Zstep, $Xpos, $Ypos, $Zpos);
|
||||
return (Initialize_Sequence($sequence, $X, $Xstate,
|
||||
$Xfreq, $Xstep, $Y, $Ystate, $Yfreq,
|
||||
$Ystep, $Z, $Zstate, $Zfreq, $Zstep),
|
||||
$X, $Y, $Z, $Xpos, $Ypos, $Zpos);
|
||||
return ("$sequence", $seqnum1, $seqnum2, $seqnum3)
|
||||
if (!defined($seqnum1) && !defined($seqnum2) && !defined($seqnum3));
|
||||
|
||||
($seqnum1, $seqnum2, $seqnum3, $pos1, $pos2, $pos3) =
|
||||
Step($seqnum1, $seqtype1, $freq1, $step1, $seqnum2, $seqtype2, $freq2,
|
||||
$step2, $seqnum3, $seqtype3, $freq3, $step3, $pos1, $pos2, $pos3);
|
||||
|
||||
return (Initialize_Sequence($sequence, $seqnum1, $seqtype1,
|
||||
$freq1, $step1, $seqnum2, $seqtype2, $freq2,
|
||||
$step2, $seqnum3, $seqtype3, $freq3, $step3),
|
||||
$seqnum1, $seqnum2, $seqnum3, $pos1, $pos2, $pos3);
|
||||
}
|
||||
|
||||
END { } # module clean-up code here (global destructor)
|
||||
|
|
|
|||
|
|
@ -79,8 +79,6 @@ if (!$query){
|
|||
global_vars => 1,
|
||||
path => ["$htdocs/$theme/$lang/includes"]);
|
||||
|
||||
# XXX temporary patch for Bug 182 for themelang
|
||||
warn "theme is $theme lang is $lang";
|
||||
$template->param(themelang => ($opac ne 'intranet'? '/opac-tmpl': '/intranet-tmpl') . "/$theme/$lang",
|
||||
interface => ($opac ne 'intranet'? '/opac-tmpl': '/intranet-tmpl'),
|
||||
theme => $theme,
|
||||
|
|
@ -94,10 +92,9 @@ if (!$query){
|
|||
# FIXME - POD
|
||||
sub themelanguage {
|
||||
my ($htdocs, $tmpl, $section, $query) = @_;
|
||||
if (!$query) {
|
||||
warn "no query";
|
||||
|
||||
}
|
||||
# if (!$query) {
|
||||
# warn "no query";
|
||||
# }
|
||||
my $dbh = C4::Context->dbh;
|
||||
my @languages;
|
||||
my @themes;
|
||||
|
|
|
|||
10
bull-home.pl
10
bull-home.pl
|
|
@ -3,12 +3,16 @@
|
|||
use strict;
|
||||
use CGI;
|
||||
use C4::Auth;
|
||||
use C4::Bull;
|
||||
use C4::Output;
|
||||
use C4::Interface::CGI::Output;
|
||||
use C4::Context;
|
||||
use HTML::Template;
|
||||
|
||||
my $query = new CGI;
|
||||
my $title = $query->param('title');
|
||||
my $ISSN = $query->param('ISSN');
|
||||
my @subscriptions = getsubscriptions($title,$ISSN);
|
||||
my ($template, $loggedinuser, $cookie)
|
||||
= get_template_and_user({template_name => "bull/bull-home.tmpl",
|
||||
query => $query,
|
||||
|
|
@ -17,4 +21,10 @@ my ($template, $loggedinuser, $cookie)
|
|||
flagsrequired => {catalogue => 1},
|
||||
debug => 1,
|
||||
});
|
||||
|
||||
$template->param(
|
||||
subscriptions => \@subscriptions,
|
||||
title => $title,
|
||||
ISSN => $ISSN,
|
||||
);
|
||||
output_html_with_http_headers $query, $cookie, $template->output;
|
||||
|
|
|
|||
|
|
@ -7,8 +7,7 @@ use C4::Output;
|
|||
use C4::Interface::CGI::Output;
|
||||
use C4::Database;
|
||||
use HTML::Template;
|
||||
use C4::Catalogue;
|
||||
|
||||
use C4::Acquisition;
|
||||
my $query = new CGI;
|
||||
my ($template, $loggedinuser, $cookie)
|
||||
= get_template_and_user({template_name => "bull/search-supply.tmpl",
|
||||
|
|
@ -20,7 +19,7 @@ my ($template, $loggedinuser, $cookie)
|
|||
});
|
||||
|
||||
# budget
|
||||
my ($count,@results)=bookfunds;
|
||||
my ($count,@results)=&bookfunds;
|
||||
my $classlist='';
|
||||
my $total=0;
|
||||
my $totspent=0;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
# Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
use strict;
|
||||
use C4::Catalogue;
|
||||
use C4::Acquisition;
|
||||
use C4::Auth;
|
||||
use C4::Biblio;
|
||||
use C4::Output;
|
||||
|
|
@ -32,7 +32,6 @@ use CGI;
|
|||
use C4::Interface::CGI::Output;
|
||||
use C4::Database;
|
||||
use HTML::Template;
|
||||
use C4::Catalogue;
|
||||
use C4::Date;
|
||||
|
||||
my $query=new CGI;
|
||||
|
|
|
|||
|
|
@ -30,13 +30,13 @@ if ($op eq 'search')
|
|||
|
||||
|
||||
|
||||
my $sth = $dbh->prepare("select subscriptionid, perioid from subscription");
|
||||
my $sth = $dbh->prepare("select subscriptionid, biblionumber from subscription");
|
||||
$sth->execute();
|
||||
my @finalsolution;
|
||||
while (my $first_step = $sth->fetchrow_hashref)
|
||||
{
|
||||
my $sth2 = $dbh->prepare("select b3.title from biblioitems b2, biblio b3 where b3.biblionumber = ? and b2.biblionumber = b3.biblionumber and (b2.issn = ? or b3.title like ?)");
|
||||
$sth2->execute($first_step->{'perioid'},$search, "%$search%");
|
||||
$sth2->execute($first_step->{'biblionumber'},$search, "%$search%");
|
||||
my @answear;
|
||||
@answear = $sth2->fetchrow_array;
|
||||
$total = scalar @answear;
|
||||
|
|
|
|||
|
|
@ -12,89 +12,31 @@ use HTML::Template;
|
|||
my $query = new CGI;
|
||||
my $op = $query->param('op');
|
||||
my $dbh = C4::Context->dbh;
|
||||
my $sid = $query->param('subsid');
|
||||
my $ser = $query->param('serial');
|
||||
warn "$ser la valeur du nom du formulaire";
|
||||
if ($op eq 'modsubscriptionhistory')
|
||||
{
|
||||
my $auser = $query->param('user');
|
||||
my $status = $query->param('status');
|
||||
my $waited = $query->param('waited');
|
||||
my $begin = $query->param('begin');
|
||||
my $end = $query->param('end');
|
||||
my $arrived = $query->param('arrived');
|
||||
my $gapped = $query->param('gapped');
|
||||
my $opac = $query->param('opac');
|
||||
my $intra = $query->param('intra');
|
||||
|
||||
my $sth=$dbh->prepare("update subscriptionhistory set startdate=?, enddate=?,missinglist=?, recievedlist=?, opacnote=?, librariannote=? where subscriptionid = ?");
|
||||
$sth->execute($begin, $end, $gapped, $arrived, $opac, $intra, $sid);
|
||||
|
||||
if ($status != 1)
|
||||
{
|
||||
if ($status == 2)
|
||||
{
|
||||
$sth = $dbh->prepare("select recievedlist from subscriptionhistory where subscriptionid = ?");
|
||||
$sth->execute($sid);
|
||||
my $received = $sth->fetchrow;
|
||||
$sth = $dbh->prepare("select * from subscription where subscriptionid = ? ");
|
||||
$sth->execute($sid);
|
||||
my $val = $sth->fetchrow_hashref;
|
||||
$sth = $dbh->prepare("update serial set serialseq = ? where subscriptionid = ? and status = 1");
|
||||
my ($temp, $X, $Y, $Z, $Xpos, $Ypos, $Zpos) = Get_Next_Seq($val->{'numberingmethod'},$val->{'seqnum1'},$val->{'freq1'}, $val->{'step1'}, $val->{'seqtype1'}, $val->{'seqnum2'}, $val->{'freq2'}, $val->{'step2'}, $val->{'seqtype2'}, $val->{'seqnum3'}, $val->{'freq3'}, $val->{'step3'}, $val->{'seqtype3'}, $val->{'pos1'}, $val->{'pos2'}, $val->{'pos3'});
|
||||
$sth->execute($temp, $sid);
|
||||
$sth = $dbh->prepare("update subscription set seqnum1=?, seqnum2=?,seqnum3=?,pos1=?,pos2=?,pos3=? where subscriptionid = ?");
|
||||
$sth->execute($X, $Y, $Z, $Xpos, $Ypos, $Zpos, $sid);
|
||||
$sth = $dbh->prepare("update subscriptionhistory set recievedlist=? where subscriptionid = ?");
|
||||
if (length($received) > 2)
|
||||
{
|
||||
$sth->execute("$received,$waited", $sid);
|
||||
}
|
||||
else
|
||||
{
|
||||
$sth->execute($waited, $sid);
|
||||
}
|
||||
|
||||
}
|
||||
elsif ($status == 3)
|
||||
{
|
||||
$sth = $dbh->prepare("select missinglist from subscriptionhistory where subscriptionid = ?");
|
||||
$sth->execute($sid);
|
||||
my $missing = $sth->fetchrow;
|
||||
$sth = $dbh->prepare("select * from subscription where subscriptionid = ? ");
|
||||
$sth->execute($sid);
|
||||
my $val = $sth->fetchrow_hashref;
|
||||
$sth = $dbh->prepare("update serial set status = 2 where subscriptionid = ? and status = 1");
|
||||
$sth->execute($sid);
|
||||
$sth = $dbh->prepare("insert into serial (serialseq,subscriptionid,biblionumber,status, planneddate) values (?,?,?,?,?)");
|
||||
my ($temp, $X, $Y, $Z, $Xpos, $Ypos, $Zpos) = Get_Next_Seq($val->{'numberingmethod'},$val->{'seqnum1'},$val->{'freq1'}, $val->{'step1'}, $val->{'seqtype1'}, $val->{'seqnum2'}, $val->{'freq2'}, $val->{'step2'}, $val->{'seqtype2'}, $val->{'seqnum3'}, $val->{'freq3'}, $val->{'step3'}, $val->{'seqtype3'}, $val->{'pos1'}, $val->{'pos2'}, $val->{'pos3'});
|
||||
$sth->execute($temp, $sid, $val->{'biblionumber'}, 1, 0);
|
||||
$sth = $dbh->prepare("update subscription set seqnum1=?, seqnum2=?,seqnum3=?,pos1=?,pos2=?,pos3=? where subscriptionid = ?");
|
||||
$sth->execute($X, $Y, $Z, $Xpos, $Ypos, $Zpos, $sid);
|
||||
$sth = $dbh->prepare("update subscriptionhistory set missinglist=? where subscriptionid = ?");
|
||||
if (length($missing) > 2)
|
||||
{
|
||||
$sth->execute("$missing,$waited", $sid);
|
||||
}
|
||||
else
|
||||
{
|
||||
$sth->execute($waited, $sid);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
warn ("Error vous avez fait None dans le formulaire receipt\n");
|
||||
}
|
||||
}
|
||||
|
||||
$sth->finish;
|
||||
my $subscriptionid = $query->param('subscriptionid');
|
||||
# warn "$ser la valeur du nom du formulaire";
|
||||
my $auser = $query->param('user');
|
||||
my $startdate = $query->param('startdate');
|
||||
my $enddate = $query->param('enddate');
|
||||
my $recievedlist = $query->param('recievedlist');
|
||||
my $missinglist = $query->param('missinglist');
|
||||
my $opacnote = $query->param('opacnote');
|
||||
my $librariannote = $query->param('librariannote');
|
||||
my @serialids = $query->param('serialid');
|
||||
my @serialseqs = $query->param('serialseq');
|
||||
my @planneddates = $query->param('planneddate');
|
||||
my @status = $query->param('status');
|
||||
if ($op eq 'modsubscriptionhistory') {
|
||||
modsubscriptionhistory($subscriptionid,$startdate,$enddate,$recievedlist,$missinglist,$opacnote,$librariannote);
|
||||
}
|
||||
my $sth=$dbh->prepare("select serialseq, status, planneddate from serial where subscriptionid = ? and status = ?");
|
||||
$sth->execute($sid, 1);
|
||||
my $sol = $sth->fetchrow_hashref;
|
||||
if ($op eq 'serialchangestatus') {
|
||||
for (my $i=0;$i<=$#serialids;$i++) {
|
||||
serialchangestatus($serialids[$i],$serialseqs[$i],$planneddates[$i],$status[$i]);
|
||||
}
|
||||
}
|
||||
my @serialslist = getserials($subscriptionid);
|
||||
|
||||
my $sth=$dbh->prepare("select * from subscriptionhistory where subscriptionid = ?");
|
||||
$sth->execute($sid);
|
||||
$sth->execute($subscriptionid);
|
||||
my $solhistory = $sth->fetchrow_hashref;
|
||||
my ($template, $loggedinuser, $cookie)
|
||||
= get_template_and_user({template_name => "bull/statecollection.tmpl",
|
||||
|
|
@ -105,20 +47,17 @@ my ($template, $loggedinuser, $cookie)
|
|||
debug => 1,
|
||||
});
|
||||
|
||||
my ($user, $cookie, $sessionID, $flags)
|
||||
= checkauth($query, 0, {catalogue => 1}, "intranet");
|
||||
|
||||
$template->param(
|
||||
user => $user,
|
||||
serial => $ser,
|
||||
status => $sol->{'status'},
|
||||
waited => $sol->{'serialseq'},
|
||||
begin => $solhistory->{'startdate'},
|
||||
end => $solhistory->{'enddate'},
|
||||
arrived => $solhistory->{'recievedlist'},
|
||||
gapped => $solhistory->{'missinglist'},
|
||||
opac => $solhistory->{'opacnote'},
|
||||
intra => $solhistory->{'librariannote'},
|
||||
sid => $sid,
|
||||
# user => $user,
|
||||
serialslist => \@serialslist,
|
||||
# status => $sol->{'status'},
|
||||
# waited => $sol->{'serialseq'},
|
||||
startdate => $solhistory->{'startdate'},
|
||||
enddate => $solhistory->{'enddate'},
|
||||
recievedlist => $solhistory->{'recievedlist'},
|
||||
missinglist => $solhistory->{'missinglist'},
|
||||
opacnote => $solhistory->{'opacnote'},
|
||||
librariannote => $solhistory->{'librariannote'},
|
||||
subscriptionid => $subscriptionid,
|
||||
);
|
||||
output_html_with_http_headers $query, $cookie, $template->output;
|
||||
|
|
|
|||
|
|
@ -2,8 +2,10 @@
|
|||
|
||||
use strict;
|
||||
use CGI;
|
||||
use C4::Koha;
|
||||
use C4::Auth;
|
||||
use C4::Output;
|
||||
use C4::Bull;
|
||||
use C4::Interface::CGI::Output;
|
||||
use C4::Context;
|
||||
use HTML::Template;
|
||||
|
|
@ -12,59 +14,14 @@ use C4::Bull;
|
|||
my $query = new CGI;
|
||||
my $op = $query->param('op');
|
||||
my $dbh = C4::Context->dbh;
|
||||
if ($op eq 'addsubscription')
|
||||
{
|
||||
my $auser = $query->param('user');
|
||||
my $supplier = $query->param('supplier');
|
||||
my $cost = $query->param('cost');
|
||||
my $budget = $query->param('budget');
|
||||
my $begin = $query->param('begin');
|
||||
my $frequency = $query->param('frequency');
|
||||
my $dow = $query->param('arrival');
|
||||
my $numberlength = $query->param('numberlength');
|
||||
my $weeklength = $query->param('weeklength');
|
||||
my $monthlength = $query->param('monthlength');
|
||||
my $X = $query->param('X');
|
||||
my $Xstate = $query->param('Xstate');
|
||||
my $Xfreq = $query->param('Xfreq');
|
||||
my $Xstep = $query->param('Xstep');
|
||||
my $Y = $query->param('Y');
|
||||
my $Ystate = $query->param('Ystate');
|
||||
my $Yfreq = $query->param('Yfreq');
|
||||
my $Ystep = $query->param('Ystep');
|
||||
my $Z = $query->param('Z');
|
||||
my $Zstate = $query->param('Zstate');
|
||||
my $Zfreq = $query->param('Zfreq');
|
||||
my $Zstep = $query->param('Zstep');
|
||||
my $sequence = $query->param('sequence');
|
||||
my $arrivalplanified = $query->param('arrivalplanified');
|
||||
my $status = 1;
|
||||
my $perioid = $query->param('biblioid');
|
||||
my $notes = $query->param('notes');
|
||||
my ($subscriptionid,$auser,$librarian,$cost,$aqbooksellerid, $aqbooksellername,$aqbudgetid, $bookfundid, $startdate, $periodicity,
|
||||
$dow, $numberlength, $weeklength, $monthlength,
|
||||
$seqnum1,$startseqnum1,$seqtype1,$freq1,$step1,
|
||||
$seqnum2,$startseqnum2,$seqtype2,$freq2,$step2,
|
||||
$seqnum3,$startseqnum3,$seqtype3,$freq3,$step3,
|
||||
$numberingmethod, $arrivalplanified, $status, $biblionumber,
|
||||
$bibliotitle, $notes);
|
||||
|
||||
my $sth=$dbh->prepare("insert into subscription (librarian, aqbooksellerid,cost,aqbudgetid,startdate, periodicity,dow,numberlength,weeklength,monthlength,seqnum1,startseqnum1,seqtype1,freq1,step1,seqnum2,startseqnum2,seqtype2,freq2, step2, seqnum3,startseqnum3,seqtype3, freq3, step3,numberingmethod, arrivalplanified, status, perioid, notes, pos1, pos2, pos3) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?, 0, 0, 0)");
|
||||
$sth->execute($auser,$supplier,$cost,$budget,$begin,$frequency,$dow,$numberlength,$weeklength,$monthlength,$X,$X,$Xstate,$Xfreq, $Xstep,$Y,$Y,$Ystate,$Yfreq, $Ystep,$Z,$Z,$Zstate,$Zfreq, $Zstep, $sequence, $arrivalplanified, $status, $perioid, $notes);
|
||||
$sth = $dbh->prepare("select subscriptionid from subscription where perioid = ? and numberingmethod = ?");
|
||||
$sth->execute($perioid, $sequence);
|
||||
my $subid = $sth->fetchrow;
|
||||
|
||||
$sth = $dbh->prepare("insert into subscriptionhistory (biblioid, subscriptionid, startdate, enddate, missinglist, recievedlist, opacnote, librariannote) values (?,?,?,?,?,?,?,?)");
|
||||
$sth->execute($perioid, $subid, $begin, 0, "", "", 0, $notes);
|
||||
$sth = $dbh->prepare("insert into serial (biblionumber, subscriptionid, serialseq, status, planneddate) values (?,?,?,?,?)");
|
||||
|
||||
$sth->execute($perioid, $subid, Initialize_Sequence($sequence, $X, $Xstate, $Xfreq, $Xstep, $Y, $Ystate, $Yfreq, $Ystep, $Z, $Zstate, $Zfreq, $Zstep), $status, C4::Bull::Find_Next_Date());
|
||||
# biblionumber,
|
||||
# subscriptionid,
|
||||
# startdate, enddate,
|
||||
# missinglist,
|
||||
# recievedlist,
|
||||
# opacnote,
|
||||
# librariannote
|
||||
$sth->finish;
|
||||
|
||||
|
||||
|
||||
}
|
||||
my ($template, $loggedinuser, $cookie)
|
||||
= get_template_and_user({template_name => "bull/subscription-add.tmpl",
|
||||
query => $query,
|
||||
|
|
@ -74,9 +31,129 @@ my ($template, $loggedinuser, $cookie)
|
|||
debug => 1,
|
||||
});
|
||||
|
||||
my ($user, $cookie, $sessionID, $flags)
|
||||
= checkauth($query, 0, {catalogue => 1}, "intranet");
|
||||
|
||||
if ($op eq 'mod') {
|
||||
my $subscriptionid = $query->param('subscriptionid');
|
||||
my $subs = &getsubscription($subscriptionid);
|
||||
$auser = $subs->{'user'};
|
||||
$librarian => $subs->{'librarian'},
|
||||
$cost = $subs->{'cost'};
|
||||
$aqbooksellerid = $subs->{'aqbooksellerid'};
|
||||
$aqbooksellername = $subs->{'aqbooksellername'};
|
||||
$bookfundid = $subs->{'bookfundid'};
|
||||
$aqbudgetid = $subs->{'aqbudgetid'};
|
||||
$startdate = $subs->{'startdate'};
|
||||
$periodicity = $subs->{'periodicity'};
|
||||
$dow = $subs->{'dow'};
|
||||
$numberlength = $subs->{'numberlength'};
|
||||
$weeklength = $subs->{'weeklength'};
|
||||
$monthlength = $subs->{'monthlength'};
|
||||
$seqnum1 = $subs->{'seqnum1'};
|
||||
$startseqnum1 = $subs->{'startseqnum1'};
|
||||
$seqtype1 = $subs->{'seqtype1'};
|
||||
$freq1 = $subs->{'freq1'};
|
||||
$step1 = $subs->{'step1'};
|
||||
$seqnum2 = $subs->{'seqnum2'};
|
||||
$startseqnum2 = $subs->{'startseqnum2'};
|
||||
$seqtype2 = $subs->{'seqtype2'};
|
||||
$freq2 = $subs->{'freq2'};
|
||||
$step2 = $subs->{'step2'};
|
||||
$seqnum3 = $subs->{'seqnum3'};
|
||||
$startseqnum3 = $subs->{'startseqnum3'};
|
||||
$seqtype3 = $subs->{'seqtype3'};
|
||||
$freq3 = $subs->{'freq3'};
|
||||
$step3 = $subs->{'step3'};
|
||||
$numberingmethod = $subs->{'numberingmethod'};
|
||||
$arrivalplanified = $subs->{'arrivalplanified'};
|
||||
$status = $subs->{status};
|
||||
$biblionumber = $subs->{'biblionumber'};
|
||||
$bibliotitle = $subs->{'bibliotitle'},
|
||||
$notes = $subs->{'notes'};
|
||||
$template->param(
|
||||
user => $user,
|
||||
$op => 1,
|
||||
user => $auser,
|
||||
librarian => $librarian,
|
||||
aqbooksellerid => $aqbooksellerid,
|
||||
aqbooksellername => $aqbooksellername,
|
||||
cost => $cost,
|
||||
aqbudgetid => $aqbudgetid,
|
||||
bookfundid => $bookfundid,
|
||||
startdate => $startdate,
|
||||
periodicity => $periodicity,
|
||||
dow => $dow,
|
||||
numberlength => $numberlength,
|
||||
weeklength => $weeklength,
|
||||
monthlength => $monthlength,
|
||||
seqnum1 =>$seqnum1,
|
||||
startseqnum =>$startseqnum1,
|
||||
seqtype1 =>$seqtype1,
|
||||
freq1 =>$freq1,
|
||||
step1 =>$step1,
|
||||
seqnum2 => $seqnum2,
|
||||
startseqnum2 => $startseqnum2,
|
||||
seqtype2 => $seqtype2,
|
||||
freq2 => $freq2,
|
||||
step2 => $step2,
|
||||
seqnum3 => $seqnum3,
|
||||
startseqnum3 => $startseqnum3,
|
||||
seqtype3 => $seqtype3,
|
||||
freq3 => $freq3,
|
||||
step3 => $step3,
|
||||
numberingmethod => $numberingmethod,
|
||||
arrivalplanified => $arrivalplanified,
|
||||
status => $status,
|
||||
biblionumber => $biblionumber,
|
||||
bibliotitle => $bibliotitle,
|
||||
notes => $notes,
|
||||
subscriptionid => $subscriptionid
|
||||
);
|
||||
$template->param(
|
||||
"periodicity$periodicity" => 1,
|
||||
"seqtype1$seqtype1" => 1,
|
||||
"seqtype2$seqtype2" => 1,
|
||||
"seqtype3$seqtype3" => 1,
|
||||
"dow$dow" => 1,
|
||||
);
|
||||
} else {
|
||||
# fill seqtype with 0 to avoid a javascript error
|
||||
$template->param(
|
||||
"seqtype1" => 0,
|
||||
"seqtype2" => 0,
|
||||
"seqtype3" => 0,
|
||||
);
|
||||
}
|
||||
if ($op eq 'addsubscription') {
|
||||
my $auser = $query->param('user');
|
||||
my $aqbooksellerid = $query->param('aqbooksellerid');
|
||||
my $cost = $query->param('cost');
|
||||
my $aqbudgetid = $query->param('aqbudgetid');
|
||||
my $startdate = $query->param('startdate');
|
||||
my $periodicity = $query->param('periodicity');
|
||||
my $dow = $query->param('dow');
|
||||
my $numberlength = $query->param('numberlength');
|
||||
my $weeklength = $query->param('weeklength');
|
||||
my $monthlength = $query->param('monthlength');
|
||||
my $seqnum1 = $query->param('seqnum1');
|
||||
my $seqtype1 = $query->param('seqtype1');
|
||||
my $freq1 = $query->param('freq1');
|
||||
my $step1 = $query->param('step1');
|
||||
my $seqnum2 = $query->param('seqnum2');
|
||||
my $seqtype2 = $query->param('seqtype2');
|
||||
my $freq2 = $query->param('freq2');
|
||||
my $step2 = $query->param('step2');
|
||||
my $seqnum3 = $query->param('seqnum3');
|
||||
my $seqtype3 = $query->param('seqtype3');
|
||||
my $freq3 = $query->param('freq3');
|
||||
my $step3 = $query->param('step3');
|
||||
my $numberingmethod = $query->param('numberingmethod');
|
||||
my $arrivalplanified = $query->param('arrivalplanified');
|
||||
my $status = 1;
|
||||
my $biblionumber = $query->param('biblionumber');
|
||||
my $notes = $query->param('notes');
|
||||
|
||||
my $sth=$dbh->prepare("insert into subscription (librarian, aqbooksellerid,cost,aqbudgetid,biblionumber,startdate, periodicity,dow,numberlength,weeklength,monthlength,seqnum1,startseqnum1,seqtype1,freq1,step1,seqnum2,startseqnum2,seqtype2,freq2, step2, seqnum3,startseqnum3,seqtype3, freq3, step3,numberingmethod, arrivalplanified, status, notes, pos1, pos2, pos3) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?, 0, 0, 0)");
|
||||
newsubscription($auser,$aqbooksellerid,$cost,$aqbudgetid,$biblionumber,$startdate,$periodicity,$dow,$numberlength,$weeklength,$monthlength,$seqnum1,$seqnum1,$seqtype1,$freq1, $step1,$seqnum2,$seqnum2,$seqtype2,$freq2, $step2,$seqnum3,$seqnum3,$seqtype3,$freq3, $step3, $numberingmethod, $arrivalplanified, $status, $notes);
|
||||
|
||||
}
|
||||
|
||||
output_html_with_http_headers $query, $cookie, $template->output;
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
use strict;
|
||||
require Exporter;
|
||||
use CGI;
|
||||
use C4::Koha;
|
||||
use C4::Auth;
|
||||
use HTML::Template;
|
||||
use C4::Context;
|
||||
|
|
@ -29,8 +30,8 @@ use C4::Auth;
|
|||
use C4::Output;
|
||||
use C4::Interface::CGI::Output;
|
||||
use C4::Biblio;
|
||||
use C4::Acquisition;
|
||||
use C4::SearchMarc;
|
||||
use C4::Catalogue;
|
||||
use C4::Koha; # XXX subfield_is_koha_internal_p
|
||||
|
||||
# Creates the list of active tags using the active MARC configuration
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
use strict;
|
||||
use CGI;
|
||||
use C4::Auth;
|
||||
use C4::Koha;
|
||||
use C4::Bull;
|
||||
use C4::Output;
|
||||
use C4::Interface::CGI::Output;
|
||||
use C4::Context;
|
||||
|
|
@ -12,110 +14,95 @@ my $query = new CGI;
|
|||
my $op = $query->param('op');
|
||||
my $dbh = C4::Context->dbh;
|
||||
my $sth;
|
||||
my $id;
|
||||
# my $id;
|
||||
my ($template, $loggedinuser, $cookie, $subs);
|
||||
my ($subscriptionid,$auser,$librarian,$cost,$aqbooksellerid, $aqbooksellername,$aqbudgetid, $bookfundid, $startdate, $periodicity,
|
||||
$dow, $numberlength, $weeklength, $monthlength,
|
||||
$seqnum1,$startseqnum1,$seqtype1,$freq1,$step1,
|
||||
$seqnum2,$startseqnum2,$seqtype2,$freq2,$step2,
|
||||
$seqnum3,$startseqnum3,$seqtype3,$freq3,$step3,
|
||||
$numberingmethod, $arrivalplanified, $status, $biblionumber, $bibliotitle, $notes);
|
||||
|
||||
if ($op eq 'modsubscription')
|
||||
{
|
||||
$subscriptionid = $query->param('subscriptionid');
|
||||
|
||||
|
||||
# if ($op eq 'addsubscription')
|
||||
# {
|
||||
my $id = $query->param('suscr');
|
||||
my $auser = $query->param('user');
|
||||
my $cost = $query->param('cost');
|
||||
my $supplier = $query->param('supplier');
|
||||
my $budget = $query->param('budget'); #stocker le id pas le number
|
||||
my $begin = $query->param('begin');
|
||||
my $frequency = $query->param('frequency');
|
||||
my $dow = $query->param('arrival');
|
||||
my $numberlength = $query->param('numberlength');
|
||||
my $weeklength = $query->param('weeklength');
|
||||
my $monthlength = $query->param('monthlength');
|
||||
my $X = $query->param('X');
|
||||
my $Xstate = $query->param('Xstate');
|
||||
my $Xfreq = $query->param('Xfreq');
|
||||
my $Xstep = $query->param('Xstep');
|
||||
my $Y = $query->param('Y');
|
||||
my $Ystate = $query->param('Ystate');
|
||||
my $Yfreq = $query->param('Yfreq');
|
||||
my $Ystep = $query->param('Ystep');
|
||||
my $Z = $query->param('Z');
|
||||
my $Zstate = $query->param('Zstate');
|
||||
my $Zfreq = $query->param('Zfreq');
|
||||
my $Zstep = $query->param('Zstep');
|
||||
my $sequence = $query->param('sequence');
|
||||
my $arrivalplanified = $query->param('arrivalplanified');
|
||||
my $status = 1;
|
||||
my $perioid = $query->param('biblioid');
|
||||
my $notes = $query->param('notes');
|
||||
if ($op eq 'modsubscription') {
|
||||
$auser = $query->param('user');
|
||||
$librarian => $query->param('librarian'),
|
||||
$cost = $query->param('cost');
|
||||
$aqbooksellerid = $query->param('aqbooksellerid');
|
||||
$biblionumber = $query->param('biblionumber');
|
||||
$aqbudgetid = $query->param('aqbudgetid');
|
||||
$startdate = $query->param('startdate');
|
||||
$periodicity = $query->param('periodicity');
|
||||
$dow = $query->param('dow');
|
||||
$numberlength = $query->param('numberlength');
|
||||
$weeklength = $query->param('weeklength');
|
||||
$monthlength = $query->param('monthlength');
|
||||
$seqnum1 = $query->param('seqnum1');
|
||||
$startseqnum1 = $query->param('startseqnum1');
|
||||
$seqtype1 = $query->param('seqtype1');
|
||||
$freq1 = $query->param('freq1');
|
||||
$step1 = $query->param('step1');
|
||||
$seqnum2 = $query->param('seqnum2');
|
||||
$startseqnum2 = $query->param('startseqnum2');
|
||||
$seqtype2 = $query->param('seqtype2');
|
||||
$freq2 = $query->param('freq2');
|
||||
$step2 = $query->param('step2');
|
||||
$seqnum3 = $query->param('seqnum3');
|
||||
$startseqnum3 = $query->param('startseqnum3');
|
||||
$seqtype3 = $query->param('seqtype3');
|
||||
$freq3 = $query->param('freq3');
|
||||
$step3 = $query->param('step3');
|
||||
$numberingmethod = $query->param('numberingmethod');
|
||||
$arrivalplanified = $query->param('arrivalplanified');
|
||||
$status = 1;
|
||||
$notes = $query->param('notes');
|
||||
|
||||
|
||||
my $sth=$dbh->prepare("update subscription set librarian=?, aqbooksellerid=?,cost=?,aqbudgetid=?,startdate=?, periodicity=?,dow=?,numberlength=?,weeklength=?,monthlength=?,seqnum1=?,startseqnum1=?,seqtype1=?,freq1=?,step1=?,seqnum2=?,startseqnum2=?,seqtype2=?,freq2=?, step2=?, seqnum3=?,startseqnum3=?,seqtype3=?, freq3=?, step3=?,numberingmethod=?, arrivalplanified=?, status=?, perioid=?, notes=? where subscriptionid = ?");
|
||||
$sth->execute($auser,$supplier,$cost,$budget,$begin,$frequency,$dow,$numberlength,$weeklength,$monthlength,$X,$X,$Xstate,$Xfreq, $Xstep,$Y,$Y,$Ystate,$Yfreq, $Ystep,$Z,$Z,$Zstate,$Zfreq, $Zstep, $sequence, $arrivalplanified, $status, $perioid, $notes, $id);
|
||||
$sth->finish;
|
||||
($template, $loggedinuser, $cookie)
|
||||
= get_template_and_user({template_name => "bull/subscription-detail.tmpl",
|
||||
query => $query,
|
||||
type => "intranet",
|
||||
authnotrequired => 0,
|
||||
flagsrequired => {catalogue => 1},
|
||||
debug => 1,
|
||||
});
|
||||
|
||||
# }
|
||||
my ($user, $cookie, $sessionID, $flags)
|
||||
= checkauth($query, 0, {catalogue => 1}, "intranet");
|
||||
$template->param(
|
||||
user => $auser, ,librarian => $auser,
|
||||
aqbooksellerid => $supplier,
|
||||
cost => $cost,
|
||||
aqbudgetid => $budget,
|
||||
startdate => $begin,
|
||||
frequency => $frequency,
|
||||
arrival => $dow,
|
||||
numberlength => $numberlength,
|
||||
weeklength => $weeklength,
|
||||
monthlength => $monthlength,
|
||||
seqnum1 => $X,
|
||||
startseqnum1 => $X,
|
||||
seqtype1 => $Xstate,
|
||||
freq1 => $Xfreq,
|
||||
step1 => $Xstep,
|
||||
seqnum2 => $Y,
|
||||
startseqnum2 => $Y,
|
||||
seqtype2 => $Ystate,
|
||||
freq2 => $Yfreq,
|
||||
step2 => $Ystep,
|
||||
seqnum3 => $Z,
|
||||
startseqnum3 => $Z,
|
||||
seqtype3 => $Zstate,
|
||||
freq3 => $Zfreq,
|
||||
step3 => $Zstep,
|
||||
sequence => $sequence,
|
||||
arrivalplanified => $arrivalplanified,
|
||||
status => $status,
|
||||
biblioid => $perioid,
|
||||
notes => $notes,
|
||||
suscr => $id,);
|
||||
|
||||
|
||||
$template->param(
|
||||
"frequency$frequency" => 1,
|
||||
"Xstate$Xstate" => 1,
|
||||
"Ystate$Ystate" => 1,
|
||||
"Zstate$Zstate" => 1,
|
||||
"arrival$dow" => 1,
|
||||
);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$sth = $dbh->prepare('select * from subscription where subscriptionid = ?');
|
||||
$id = $query->param('suscr');
|
||||
$sth->execute($id);
|
||||
$subs = $sth->fetchrow_hashref;
|
||||
$sth->finish;
|
||||
&modsubscription($auser,$aqbooksellerid,$cost,$aqbudgetid,$startdate,
|
||||
$periodicity,$dow,$numberlength,$weeklength,$monthlength,
|
||||
$seqnum1,$startseqnum1,$seqtype1,$freq1,$step1,
|
||||
$seqnum2,$startseqnum2,$seqtype2,$freq2,$step2,
|
||||
$seqnum3,$startseqnum3,$seqtype3,$freq3,$step3,
|
||||
$numberingmethod, $arrivalplanified, $status, $biblionumber, $notes, $subscriptionid);
|
||||
|
||||
} else {
|
||||
my $subs = &getsubscription($subscriptionid);
|
||||
$auser = $subs->{'user'};
|
||||
$librarian => $subs->{'librarian'},
|
||||
$cost = $subs->{'cost'};
|
||||
$aqbooksellerid = $subs->{'aqbooksellerid'};
|
||||
$aqbooksellername = $subs->{'aqbooksellername'};
|
||||
$bookfundid = $subs->{'bookfundid'};
|
||||
$aqbudgetid = $subs->{'aqbudgetid'};
|
||||
$startdate = $subs->{'startdate'};
|
||||
$periodicity = $subs->{'periodicity'};
|
||||
$dow = $subs->{'dow'};
|
||||
$numberlength = $subs->{'numberlength'};
|
||||
$weeklength = $subs->{'weeklength'};
|
||||
$monthlength = $subs->{'monthlength'};
|
||||
$seqnum1 = $subs->{'seqnum1'};
|
||||
$startseqnum1 = $subs->{'startseqnum1'};
|
||||
$seqtype1 = $subs->{'seqtype1'};
|
||||
$freq1 = $subs->{'freq1'};
|
||||
$step1 = $subs->{'step1'};
|
||||
$seqnum2 = $subs->{'seqnum2'};
|
||||
$startseqnum2 = $subs->{'startseqnum2'};
|
||||
$seqtype2 = $subs->{'seqtype2'};
|
||||
$freq2 = $subs->{'freq2'};
|
||||
$step2 = $subs->{'step2'};
|
||||
$seqnum3 = $subs->{'seqnum3'};
|
||||
$startseqnum3 = $subs->{'startseqnum3'};
|
||||
$seqtype3 = $subs->{'seqtype3'};
|
||||
$freq3 = $subs->{'freq3'};
|
||||
$step3 = $subs->{'step3'};
|
||||
$numberingmethod = $subs->{'numberingmethod'};
|
||||
$arrivalplanified = $subs->{'arrivalplanified'};
|
||||
$status = $subs->{status};
|
||||
$biblionumber = $subs->{'biblionumber'};
|
||||
$bibliotitle = $subs->{'bibliotitle'},
|
||||
$notes = $subs->{'notes'};
|
||||
|
||||
}
|
||||
|
||||
($template, $loggedinuser, $cookie)
|
||||
= get_template_and_user({template_name => "bull/subscription-detail.tmpl",
|
||||
|
|
@ -126,56 +113,53 @@ if ($op eq 'modsubscription')
|
|||
debug => 1,
|
||||
});
|
||||
|
||||
# }
|
||||
my ($user, $cookie, $sessionID, $flags)
|
||||
= checkauth($query, 0, {catalogue => 1}, "intranet");
|
||||
$template->param(
|
||||
user => $user,
|
||||
);
|
||||
$template->param(librarian => $subs->{'librarian'},
|
||||
aqbooksellerid => $subs->{'aqbooksellerid'},
|
||||
cost => $subs->{'cost'},
|
||||
aqbudgetid => $subs->{'aqbudgetid'},
|
||||
startdate => $subs->{'startdate'},
|
||||
frequency => $subs->{'periodicity'},
|
||||
arrival => $subs->{'dow'},
|
||||
numberlength => $subs->{'numberlength'},
|
||||
weeklength => $subs->{'weeklength'},
|
||||
monthlength => $subs->{'monthlength'},
|
||||
seqnum1 => $subs->{'seqnum1'},
|
||||
startseqnum1 => $subs->{'startseqnum1'},
|
||||
seqtype1 => $subs->{'seqtype1'},
|
||||
freq1 => $subs->{'freq1'},
|
||||
step1 => $subs->{'step1'},
|
||||
seqnum2 => $subs->{'seqnum2'},
|
||||
startseqnum2 => $subs->{'startseqnum2'},
|
||||
seqtype2 => $subs->{'seqtype2'},
|
||||
freq2 => $subs->{'freq2'},
|
||||
step2 => $subs->{'step2'},
|
||||
seqnum3 => $subs->{'seqnum3'},
|
||||
startseqnum3 => $subs->{'startseqnum3'},
|
||||
seqtype3 => $subs->{'seqtype3'},
|
||||
freq3 => $subs->{'freq3'},
|
||||
step3 => $subs->{'step3'},
|
||||
sequence => $subs->{'numberingmethod'},
|
||||
arrivalplanified => $subs->{'arrivalplanified'},
|
||||
status => $subs->{'status'},
|
||||
biblioid => $subs->{'perioid'},
|
||||
notes => $subs->{'notes'},
|
||||
suscr => $id,
|
||||
);
|
||||
my ($user, $cookie, $sessionID, $flags)
|
||||
= checkauth($query, 0, {catalogue => 1}, "intranet");
|
||||
|
||||
$template->param(
|
||||
$template->param(
|
||||
user => $auser,
|
||||
librarian => $librarian,
|
||||
aqbooksellerid => $aqbooksellerid,
|
||||
aqbooksellername => $aqbooksellername,
|
||||
cost => $cost,
|
||||
aqbudgetid => $aqbudgetid,
|
||||
bookfundid => $bookfundid,
|
||||
startdate => $startdate,
|
||||
periodicity => $periodicity,
|
||||
dow => $dow,
|
||||
numberlength => $numberlength,
|
||||
weeklength => $weeklength,
|
||||
monthlength => $monthlength,
|
||||
seqnum1 =>$seqnum1,
|
||||
startseqnum1 =>$startseqnum1,
|
||||
seqtype1 =>$seqtype1,
|
||||
freq1 =>$freq1,
|
||||
step1 =>$step1,
|
||||
seqnum2 => $seqnum2,
|
||||
startseqnum2 => $startseqnum2,
|
||||
seqtype2 => $seqtype2,
|
||||
freq2 => $freq2,
|
||||
step2 => $step2,
|
||||
seqnum3 => $seqnum3,
|
||||
startseqnum3 => $startseqnum3,
|
||||
seqtype3 => $seqtype3,
|
||||
freq3 => $freq3,
|
||||
step3 => $step3,
|
||||
numberingmethod => $numberingmethod,
|
||||
arrivalplanified => $arrivalplanified,
|
||||
status => $status,
|
||||
biblionumber => $biblionumber,
|
||||
bibliotitle => $bibliotitle,
|
||||
notes => $notes,
|
||||
subscriptionid => $subscriptionid
|
||||
);
|
||||
$template->param(
|
||||
"periodicity$periodicity" => 1,
|
||||
"seqtype1$seqtype1" => 1,
|
||||
"seqtype2$seqtype2" => 1,
|
||||
"seqtype3$seqtype3" => 1,
|
||||
"arrival$dow" => 1,
|
||||
);
|
||||
|
||||
"frequency$subs->{'periodicity'}" => 1,
|
||||
"Xstate$subs->{'seqtype1'}" => 1,
|
||||
"Ystate$subs->{'seqtype2'}" => 1,
|
||||
"Zstate$subs->{'seqtype3'}" => 1,
|
||||
"arrival$subs->{'dow'}" => 1,
|
||||
);
|
||||
|
||||
}
|
||||
# }
|
||||
# my $sth=$dbh->prepare("insert into subscription (librarian, aqbooksellerid,cost,aqbudgetid,startdate, periodicity,dow,numberlength,weeklength,monthlength,seqnum1,startseqnum1,seqtype1,freq1,step1,seqnum2,startseqnum2,seqtype2,freq2, step2, seqnum3,startseqnum3,seqtype3, freq3, step3,numberingmethod, arrivalplanified, status, perioid, notes) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
|
||||
|
||||
output_html_with_http_headers $query, $cookie, $template->output;
|
||||
|
|
|
|||
|
|
@ -1,21 +1,41 @@
|
|||
<!-- TMPL_INCLUDE NAME="bull-top.inc" -->
|
||||
<!--------------------------MAIN BODY OF PAGE-------------------------->
|
||||
<div id="mainbloc">
|
||||
<h1>Serial</h1>
|
||||
<ul>
|
||||
|
||||
|
||||
|
||||
<div align="center"><font color="black"><b> Serial Main menu</b> </div></font>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<li><a href="/cgi-bin/koha/bull/subscription.pl">Subscription:</a> Add a new subscription or watch each collection's informations</li>
|
||||
<li><a href="/cgi-bin/koha/bull/receipt.pl">Receipt:</a> Use this menu to change status of serials and watch state of collection</li>
|
||||
|
||||
</ul>
|
||||
<h1 class="bull">Serials subscriptions</h1>
|
||||
<table>
|
||||
<tr>
|
||||
<th class="bull">Title</th>
|
||||
<th class="bull">ISSN</th>
|
||||
<th class="bull" colspan=2> </th>
|
||||
</tr>
|
||||
<tr>
|
||||
<form action="bull-home.pl" method="post">
|
||||
<td>
|
||||
<input type="text" size=40 maxlength=40 name="title" value="<!-- TMPL_VAR name="title" -->">
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" size=11 maxlength=11 name="ISSN" value="<!-- TMPL_VAR name="ISSN" -->">
|
||||
</td>
|
||||
<td colspan=3>
|
||||
<input type="submit" value="filter" class="button bull">
|
||||
</td>
|
||||
</tr>
|
||||
<!-- TMPL_LOOP name="subscriptions" -->
|
||||
<tr>
|
||||
<td>
|
||||
<!-- TMPL_VAR name="title" -->
|
||||
</td>
|
||||
<td>
|
||||
<!-- TMPL_VAR name="ISSN" -->
|
||||
</td>
|
||||
<td>
|
||||
<a href="bull/subscription-detail.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->" class="button bull">Detail</a>
|
||||
<a href="bull/statecollection.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->" class="button bull">Recieve</a>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- /TMPL_LOOP -->
|
||||
</table>
|
||||
<a href="/cgi-bin/koha/bull/subscription-add.pl" class="button bull">Add subscription</a>
|
||||
</div>
|
||||
<!-- TMPL_INCLUDE NAME="bull-bottom.inc" -->
|
||||
|
||||
|
|
|
|||
|
|
@ -1,65 +1,38 @@
|
|||
<!-- TMPL_INCLUDE name="neutral-top.inc" -->
|
||||
<!-- TMPL_INCLUDE name="popup-top.inc" -->
|
||||
<div id="mainbloc">
|
||||
<h1 class="acquisition">Supplier Search Results</h1>
|
||||
<h1 class="bull">Supplier Search Results</h1>
|
||||
<div id="bloc100">
|
||||
<h2 class="acquisition">You searched on <b>supplier <!-- TMPL_VAR name="supplier" -->,</b> <!-- TMPL_VAR name="count" --> results found</h2>
|
||||
<h2 class="bull">You searched on <b>supplier <!-- TMPL_VAR name="supplier" -->,</b> <!-- TMPL_VAR name="count" --> results found</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th class="acquisition">Order</th>
|
||||
<th class="acquisition">Receive</th>
|
||||
<th class="acquisition">Get it!!</th>
|
||||
<th class="acquisition">Company</th>
|
||||
<th class="acquisition">
|
||||
<table class="noborder">
|
||||
<tr>
|
||||
<th class="acquisition">Basket</th>
|
||||
<th class="acquisition">Items</th>
|
||||
<th class="acquisition">Staff</th>
|
||||
<th class="acquisition">Date</th>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<th class="acquisition">Supplier</th>
|
||||
<th class="acquisition">Select</th>
|
||||
</tr>
|
||||
|
||||
<!-- TMPL_LOOP name="loop_suppliers" -->
|
||||
<tr valign=top bgcolor=<!-- TMPL_VAR name="color" -->>
|
||||
<tr bgcolor=<!-- TMPL_VAR name="color" -->>
|
||||
<td>
|
||||
<!-- TMPL_IF name="active" -->
|
||||
<a href="basket.pl?id=<!-- TMPL_VAR name=id -->"><img src="<!-- TMPL_VAR NAME='interface' -->/<!-- TMPL_VAR name="theme" -->/images/mail_send.png" title="Add order" ALT="Add" BORDER=0 ></a>
|
||||
<!-- TMPL_ELSE -->
|
||||
Inactive
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_VAR name="name" -->
|
||||
</td>
|
||||
<td>
|
||||
<a href="recieveorder.pl?id=<!-- TMPL_VAR name=id -->"><img src="<!-- TMPL_VAR NAME='interface' -->/<!-- TMPL_VAR name="theme" -->/images/mail_get.png" title="receive" ALT="Add" BORDER=0 ></a>
|
||||
<a href="#" onClick="GetIdInOpener('<!-- TMPL_VAR name=id -->')">
|
||||
<img src="<!-- TMPL_VAR NAME='interface' -->/<!-- TMPL_VAR name="theme" -->/images/arrow.gif" title="select this supplier" BORDER=0 height=40 width=40>
|
||||
</a>
|
||||
</td>
|
||||
<td><a href="#" onClick="GetIdInOpener('<!-- TMPL_VAR name=id -->')"> <img src="<!-- TMPL_VAR NAME='interface' -->/<!-- TMPL_VAR name="theme" -->/images/arrow.gif" title="receive" BORDER=0 height=40 width=40></a></td>
|
||||
<td><a href="supplier.pl?id=<!-- TMPL_VAR name=id -->"><!-- TMPL_VAR name="name" --></a></td>
|
||||
<td>
|
||||
<table width="100%" cellspacing=0 cellpadding=5 border=0>
|
||||
<!-- TMPL_LOOP name="loop_basket" -->
|
||||
<tr>
|
||||
<td width="15%"><a href="/cgi-bin/koha/acqui/basket.pl?basket=<!-- TMPL_VAR name="basketno" -->"><!-- TMPL_VAR name="basketno" --></a></td>
|
||||
<td width="15%"><TMPl_VAR name="total"></td>
|
||||
<td width="40%"><!-- TMPL_VAR name="authorisedby" --></td>
|
||||
<td width="30%"><!-- TMPL_VAR name="entrydate" --></td>
|
||||
</tr>
|
||||
<!-- /TMPL_LOOP -->
|
||||
</table>
|
||||
</tr>
|
||||
<!-- /TMPL_LOOP -->
|
||||
</table>
|
||||
</CENTER>
|
||||
<br>
|
||||
<a class="button acquisition" href="supplier.pl?id=0">Add supplier</a>
|
||||
<a class="button bull" href="supplier.pl?id=0">Add supplier</a>
|
||||
|
||||
|
||||
<script language="javascript">
|
||||
|
||||
function GetIdInOpener(value)
|
||||
{
|
||||
opener.document.f.supplier.value = value;
|
||||
opener.document.f.aqbooksellerid.value = value;
|
||||
self.close();
|
||||
}
|
||||
|
||||
</script>
|
||||
</script>
|
||||
<!-- TMPL_INCLUDE name="popup-bottom.inc" -->
|
||||
|
|
|
|||
|
|
@ -38,19 +38,12 @@
|
|||
<img src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR name="theme" -->/images/fileopen.png" width="32" hspace="0" vspace="0" border="0" alt="Authority number <!-- TMPL_VAR name="authid" -->" title="Serial number<!-- TMPL_VAR name="subscriptionid" -->">
|
||||
</a> </div>
|
||||
</td>
|
||||
<td><div align="center"><a href="statecollection.pl?subsid=<!-- TMPL_VAR name="subscriptionid" -->&serial=<!-- TMPL_VAR name="serial" -->">
|
||||
<td><div align="center"><a href="statecollection.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->&serial=<!-- TMPL_VAR name="serial" -->">
|
||||
|
||||
<img src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR name="theme" -->/images/Fleche.jpg" width="32" hspace="0" vspace="0" border="0" alt="Subscribtion serial<!-- TMPL_VAR name="subscriptionid" -->" title="Serial number<!-- TMPL_VAR name="subscriptionid" -->">
|
||||
|
||||
|
||||
</a></td></div>
|
||||
<td><div align="center">
|
||||
<!-- TMPL_UNLESS name="used" -->
|
||||
<a href="javascript:do_delete('authorities-home.pl?op=delete&suscrid=<!-- TMPL_VAR name="subscriptionid" -->')">
|
||||
<img src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR name="theme" -->/images/edittrash.png" width="32" hspace="0" vspace="0" border="0">
|
||||
</a>
|
||||
<!-- /TMPL_UNLESS -->
|
||||
</div> </td>
|
||||
</tr>
|
||||
<!-- /TMPL_LOOP -->
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@
|
|||
|
||||
function GetIt(bibno)
|
||||
{
|
||||
opener.document.f.biblioid.value = bibno;
|
||||
opener.document.f.perioid.value = bibno;
|
||||
self.close();
|
||||
}
|
||||
</script>
|
||||
|
|
@ -1,12 +1,11 @@
|
|||
<!-- TMPL_INCLUDE name="neutral-top.inc" -->
|
||||
<!-- TMPL_INCLUDE name="popup-top.inc" -->
|
||||
|
||||
<div id="mainbloc">
|
||||
|
||||
<h1 class="acquisition">Acquisitions</h1>
|
||||
<h1 class="bull">Search supplier for serial subscription</h1>
|
||||
<div id="bloc25">
|
||||
<h2 class="acquisition">Start, receive, modify order</h2>
|
||||
<form action="/cgi-bin/koha/bull/order.pl" method=post>
|
||||
Supplier name : <input type="text" size="25" name="supplier">
|
||||
<input type="submit" class="button acquisition" value="OK">
|
||||
</form>
|
||||
<form action="/cgi-bin/koha/bull/order.pl" method=post>
|
||||
Supplier name : <input type="text" size="25" name="supplier">
|
||||
<input type="submit" class="button bull" value="OK">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- TMPL_INCLUDE name="popup-bottom.inc" -->
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
<!-- TMPL_INCLUDE NAME="neutral-top.inc" -->
|
||||
<!-- TMPL_INCLUDE NAME="popup-top.inc" -->
|
||||
<div id="mainbloc">
|
||||
|
||||
<h1 class="catalogue">Catalogue search</h1>
|
||||
|
|
|
|||
|
|
@ -1,243 +1,91 @@
|
|||
|
||||
<!-- TMPL_INCLUDE NAME="bull-top.inc" -->
|
||||
<!-- TMPL_INCLUDE name="bull-top.inc" -->
|
||||
<!--------------------------MAIN BODY OF PAGE-------------------------->
|
||||
<div id="mainbloc">
|
||||
<h1>Collections</h1>
|
||||
<ul>
|
||||
<h1 class="bull">Subscription for XXX <!-- TMPL_VAR name="serial" --></h1>
|
||||
|
||||
<div id="bloc25">
|
||||
<h2 class="bull">Subscription summary</h2>
|
||||
<form method="post" name="f" action="statecollection.pl">
|
||||
<input type="hidden" name="op" value="modsubscriptionhistory">
|
||||
<input type="hidden" name="serial" value="<!-- TMPL_VAR name="serial" -->">
|
||||
<input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->">
|
||||
<input type="hidden" name="user" value="<!-- TMPL_VAR name="user" -->">
|
||||
<p><label>Librarian</label><!-- TMPL_VAR name="user" --></p>
|
||||
<p><label>Beginnning date (*)</label><input type="text" name="startdate" value="<!-- TMPL_VAR name="startdate" -->"></p>
|
||||
<p><label>End date</label><input type="text" name="enddate" value="<!-- TMPL_VAR name="enddate" -->"></p>
|
||||
<p>Arrived Numbers</p>
|
||||
<p> <textarea name="recievedlist" COLS=60 ROWS=5><!-- TMPL_VAR name="recievedlist" --></textarea></p>
|
||||
<p>Gapped Numbers</p>
|
||||
<p> <textarea name="missinglist" COLS=60 ROWS=2><!-- TMPL_VAR name="missinglist" --></textarea></p>
|
||||
<p>Opac's note</p>
|
||||
<p> <textarea name="opacnote" COLS=60 ROWS=5><!-- TMPL_VAR name="opacnote" --></textarea></p>
|
||||
<p>Intra's note</p>
|
||||
<p> <textarea name="librariannote" COLS=60 ROWS=5><!-- TMPL_VAR name="librariannote" --></textarea></p>
|
||||
<input type="submit" value="Save changes" class="button bull">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
<div align="center"><font color="black" size="+1"><b><!-- TMPL_VAR name="serial" --> Collection's states</b> </div></font>
|
||||
<table>
|
||||
<form method="post" name="f">
|
||||
<tr>
|
||||
<td>
|
||||
<div align="center"> </div>
|
||||
<input type="hidden" name="op" value="modsubscriptionhistory">
|
||||
<input type="hidden" name="serial" value="<!-- TMPL_VAR name="serial" -->">
|
||||
<input type="hidden" name="subsid" value="<!-- TMPL_VAR name="sid" -->">
|
||||
<input type="hidden" name="user" value="<!-- TMPL_VAR name="user" -->">
|
||||
Librarian identity :</td><td> <!-- TMPL_VAR name="user" --></td></tr>
|
||||
|
||||
<tr><td>
|
||||
Beginnning date (*) :</td>
|
||||
<td> <input type="text" name="begin" value="<!-- TMPL_VAR name="begin" -->"></td>
|
||||
<td>
|
||||
Enddate date (*) :</td>
|
||||
<td> <input type="text" name="end" value="<!-- TMPL_VAR name="end" -->"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> Arrived Numbers : </td><td><TEXTAREA NAME="arrived" COLS=25 ROWS=2><!-- TMPL_VAR name="arrived" --></TEXTAREA> </td>
|
||||
<td> Gapped Numbers : </td><td><TEXTAREA NAME="gapped" COLS=25 ROWS=2><!-- TMPL_VAR name="gapped" --></TEXTAREA></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> Opac's note : </td><td><TEXTAREA NAME="opac" COLS=30 ROWS=2><!-- TMPL_VAR name="opac" --></TEXTAREA></td>
|
||||
<td> Intra's note : </td><td><TEXTAREA NAME="intra" COLS=30 ROWS=2><!-- TMPL_VAR name="intra" --></TEXTAREA></td>
|
||||
</tr>
|
||||
</table><br><table>
|
||||
<tr>
|
||||
<td>
|
||||
Waited number :
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="waited" value="<!-- TMPL_VAR name="waited" -->">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Status :
|
||||
</td>
|
||||
<td>
|
||||
<select name="status" size="1">
|
||||
<option value="">None</option>
|
||||
<option value="1" selected>Waited</option>
|
||||
<option value="2">Arrived</option>
|
||||
<option value="3">Late</option>
|
||||
<div id="bloc25">
|
||||
<h2 class="bull">waited or late numbers</h2>
|
||||
<form method="post" name="f" action="statecollection.pl">
|
||||
<input type="hidden" name="op" value="serialchangestatus">
|
||||
<input type="hidden" name="serial" value="<!-- TMPL_VAR name="serial" -->">
|
||||
<input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->">
|
||||
<input type="hidden" name="user" value="<!-- TMPL_VAR name="user" -->">
|
||||
<table class="small">
|
||||
<tr>
|
||||
<th class="bull">
|
||||
Numbered
|
||||
</th>
|
||||
<th class="bull">
|
||||
planned for
|
||||
</th>
|
||||
<th class="bull">
|
||||
Status
|
||||
</th>
|
||||
</tr>
|
||||
<!-- TMPL_LOOP name="serialslist" -->
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" name="serialseq" value="<!-- TMPL_VAR name="serialseq" -->" size=50 maxlength=100>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="planneddate" value="<!-- TMPL_VAR name="planneddate" -->" size=10 maxlength=15>
|
||||
</td>
|
||||
<td>
|
||||
<input type="hidden" name="serialid" value="<!-- TMPL_VAR name="serialid" -->">
|
||||
<select name="status" size="1">
|
||||
<option value="">None</option>
|
||||
<!--TMPL_IF name="status1" -->
|
||||
<option value="1" selected>Waited</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="1" >Waited</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="status2" -->
|
||||
<option value="2" selected>Arrived</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="2">Arrived</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="status3" -->
|
||||
<option value="3" selected>Late</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="3">Late</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="status4" -->
|
||||
<option value="4" selected>Missing</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="4">Missing</option>
|
||||
<!-- /TMPL_IF -->
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<td>
|
||||
<bR>
|
||||
<input type="button" value="Save this new exemplary state" onclick="Check(this.form)" accesskey="w" class="button catalogue">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- /TMPL_LOOP -->
|
||||
</table>
|
||||
<input type="submit" value="Save changes" accesskey="w" class="button bull">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</table>
|
||||
<!-- TMPL_INCLUDE NAME="bull-bottom.inc" -->
|
||||
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
|
||||
select(0, 'X');
|
||||
select(0, 'Y');
|
||||
select(0, 'Z');
|
||||
|
||||
function Plugin(f)
|
||||
{
|
||||
window.open("subscription-bib-search.pl","Find a bib index",'width=500,height=400,toolbar=false,scrollbars=yes');
|
||||
}
|
||||
|
||||
function FindAcqui(f)
|
||||
{
|
||||
window.open("acqui-search.pl","Find a supplier",'width=500,height=400,toolbar=false,scrollbars=yes');
|
||||
}
|
||||
|
||||
|
||||
function Check(f)
|
||||
{
|
||||
document.f.submit();
|
||||
return false;
|
||||
}
|
||||
|
||||
function Help()
|
||||
{
|
||||
window.open("subscription-add-help.pl","Add subscription help page",'width=500,height=400,toolbar=false,scrollbars=yes');
|
||||
}
|
||||
|
||||
function select(reponse, type)
|
||||
{
|
||||
if (type == 'X')
|
||||
{
|
||||
if (reponse == 0)
|
||||
{
|
||||
document.f.Xstep.style.backgroundColor="#DCDCDC";
|
||||
document.f.Xstep.value = "";
|
||||
document.f.Xstep.disabled = true;
|
||||
document.f.Xfreq.style.backgroundColor="#DCDCDC";
|
||||
document.f.Xfreq.value = "";
|
||||
document.f.Xfreq.disabled = true;
|
||||
document.f.X.style.backgroundColor="#DCDCDC";
|
||||
document.f.X.value = "";
|
||||
document.f.X.disabled = true;
|
||||
|
||||
}
|
||||
if (reponse == 1)
|
||||
{
|
||||
document.f.Xstep.style.backgroundColor="#FFFFFF";
|
||||
document.f.Xstep.disabled = false;
|
||||
document.f.Xfreq.style.backgroundColor="#DCDCDC";
|
||||
document.f.Xfreq.value = "";
|
||||
document.f.Xfreq.disabled = true;
|
||||
document.f.X.style.backgroundColor="#FFFFFF";
|
||||
document.f.X.disabled = false;
|
||||
}
|
||||
if (reponse == 2)
|
||||
{
|
||||
document.f.Xstep.style.backgroundColor="#FFFFFF";
|
||||
document.f.Xstep.disabled = false;
|
||||
document.f.Xfreq.style.backgroundColor="#FFFFFF";
|
||||
document.f.Xfreq.disabled = false;
|
||||
document.f.X.style.backgroundColor="#FFFFFF";
|
||||
document.f.X.disabled = false;
|
||||
}
|
||||
if (reponse == 3)
|
||||
{
|
||||
document.f.Xstep.style.backgroundColor="#DCDCDC";
|
||||
document.f.Xstep.value = "";
|
||||
document.f.Xstep.disabled = true;
|
||||
document.f.Xfreq.style.backgroundColor="#DCDCDC";
|
||||
document.f.Xfreq.value = "";
|
||||
document.f.Xfreq.disabled = true;
|
||||
document.f.X.style.backgroundColor="#FFFFFF";
|
||||
document.f.X.disabled = false;
|
||||
}
|
||||
}
|
||||
if (type == 'Y')
|
||||
{
|
||||
if (reponse == 0)
|
||||
{
|
||||
document.f.Ystep.style.backgroundColor="#DCDCDC";
|
||||
document.f.Ystep.value = "";
|
||||
document.f.Ystep.disabled = true;
|
||||
document.f.Yfreq.style.backgroundColor="#DCDCDC";
|
||||
document.f.Yfreq.value = "";
|
||||
document.f.Yfreq.disabled = true;
|
||||
document.f.Y.style.backgroundColor="#DCDCDC";
|
||||
document.f.Y.value = "";
|
||||
document.f.Y.disabled = true;
|
||||
|
||||
}
|
||||
if (reponse == 1)
|
||||
{
|
||||
document.f.Ystep.style.backgroundColor="#FFFFFF";
|
||||
document.f.Ystep.disabled = false;
|
||||
document.f.Yfreq.style.backgroundColor="#DCDCDC";
|
||||
document.f.Yfreq.value = "";
|
||||
document.f.Yfreq.disabled = true;
|
||||
document.f.Y.style.backgroundColor="#FFFFFF";
|
||||
document.f.Y.disabled = false;
|
||||
}
|
||||
if (reponse == 2)
|
||||
{
|
||||
document.f.Ystep.style.backgroundColor="#FFFFFF";
|
||||
document.f.Ystep.disabled = false;
|
||||
document.f.Yfreq.style.backgroundColor="#FFFFFF";
|
||||
document.f.Yfreq.disabled = false;
|
||||
document.f.Y.style.backgroundColor="#FFFFFF";
|
||||
document.f.Y.disabled = false;
|
||||
}
|
||||
if (reponse == 3)
|
||||
{
|
||||
document.f.Ystep.style.backgroundColor="#DCDCDC";
|
||||
document.f.Ystep.value = "";
|
||||
document.f.Ystep.disabled = true;
|
||||
document.f.Yfreq.style.backgroundColor="#DCDCDC";
|
||||
document.f.Yfreq.value = "";
|
||||
document.f.Yfreq.disabled = true;
|
||||
document.f.Y.style.backgroundColor="#FFFFFF";
|
||||
document.f.Y.disabled = false;
|
||||
}
|
||||
|
||||
}
|
||||
if (type == 'Z')
|
||||
{
|
||||
if (reponse == 0)
|
||||
{
|
||||
document.f.Zstep.style.backgroundColor="#DCDCDC";
|
||||
document.f.Zstep.value = "";
|
||||
document.f.Zstep.disabled = true;
|
||||
document.f.Zfreq.style.backgroundColor="#DCDCDC";
|
||||
document.f.Zfreq.value = "";
|
||||
document.f.Zfreq.disabled = true;
|
||||
document.f.Z.style.backgroundColor="#DCDCDC";
|
||||
document.f.Z.value = "";
|
||||
document.f.Z.disabled = true;
|
||||
|
||||
}
|
||||
if (reponse == 1)
|
||||
{
|
||||
document.f.Zstep.style.backgroundColor="#FFFFFF";
|
||||
document.f.Zstep.disabled = false;
|
||||
document.f.Zfreq.style.backgroundColor="#DCDCDC";
|
||||
document.f.Zfreq.value = "";
|
||||
document.f.Zfreq.disabled = true;
|
||||
document.f.Z.style.backgroundColor="#FFFFFF";
|
||||
document.f.Z.disabled = false;
|
||||
}
|
||||
if (reponse == 2)
|
||||
{
|
||||
document.f.Zstep.style.backgroundColor="#FFFFFF";
|
||||
document.f.Zstep.disabled = false;
|
||||
document.f.Zfreq.style.backgroundColor="#FFFFFF";
|
||||
document.f.Zfreq.disabled = false;
|
||||
document.f.Z.style.backgroundColor="#FFFFFF";
|
||||
document.f.Z.disabled = false;
|
||||
}
|
||||
if (reponse == 3)
|
||||
{
|
||||
document.f.Zstep.style.backgroundColor="#DCDCDC";
|
||||
document.f.Zstep.value = "";
|
||||
document.f.Zstep.disabled = true;
|
||||
document.f.Zfreq.style.backgroundColor="#DCDCDC";
|
||||
document.f.Zfreq.value = "";
|
||||
document.f.Zfreq.disabled = true;
|
||||
document.f.Z.style.backgroundColor="#FFFFFF";
|
||||
document.f.Z.disabled = false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<!-- TMPL_INCLUDE name="bull-bottom.inc" -->
|
||||
|
|
@ -1,170 +1,246 @@
|
|||
<!-- TMPL_INCLUDE NAME="bull-top.inc" -->
|
||||
<!--------------------------MAIN BODY OF PAGE-------------------------->
|
||||
<div id="mainbloc">
|
||||
<h1>Subscription</h1>
|
||||
<ul>
|
||||
|
||||
|
||||
|
||||
<div align="center"><font color="black"><b>Add a new subscription </b> </div></font>
|
||||
<table>
|
||||
<form method="post" name="f">
|
||||
<tr>
|
||||
<td>
|
||||
<div align="center"> </div>
|
||||
<input type="hidden" name="op" value="addsubscription">
|
||||
<input type="hidden" name="user" value="<!-- TMPL_VAR name="user" -->">
|
||||
Librarian identity :</td><td> <!-- TMPL_VAR name="user" --></td></tr>
|
||||
<tr><br><br>
|
||||
<td>Supplier (*) :</td>
|
||||
<td> <input type="text" name="supplier" value=""><a href="#" OnClick="FindAcqui()">...</td></a></tr>
|
||||
<tr><td>
|
||||
Cost :</td>
|
||||
<td> <input type="text" name="cost" value=""></td>
|
||||
<td>
|
||||
Suscribtion's budget :</td>
|
||||
<td> <input type="text" name="budget" value=""></td></tr>
|
||||
<tr><td>
|
||||
Beginnning date (*) :</td>
|
||||
<td> <input type="text" name="begin" value=""></td>
|
||||
|
||||
<td>
|
||||
Frequency (*) :</td>
|
||||
<td> <select name="frequency" size="1">
|
||||
<!-- TMPL_IF name="mod" -->
|
||||
<h1 class="bull">Modify subscription</h1>
|
||||
<form method="post" name="f" action="subscription-detail.pl">
|
||||
<input type="hidden" name="op" value="modsubscription">
|
||||
<input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->">
|
||||
<!-- TMPL_ELSE -->
|
||||
<h1 class="bull">Add a subscription</h1>
|
||||
<form method="post" name="f">
|
||||
<!-- /TMPL_IF -->
|
||||
<div id="bloc25">
|
||||
<h2 class="bull">Subscription information</h2>
|
||||
<input type="hidden" name="op" value="addsubscription">
|
||||
<input type="hidden" name="user" value="<!-- TMPL_VAR name="user" -->">
|
||||
<p>Librarian</td><td> <!-- TMPL_VAR name="user" --></p>
|
||||
<p><label>Supplier (*):</label><input type="text" name="aqbooksellerid" value="<!-- TMPL_VAR name="aqbooksellerid"-->"><a href="#" OnClick="FindAcqui()">...</a></p>
|
||||
<p><label>Cost</label><input type="text" name="cost" value="<!-- TMPL_VAR name="cost" -->"></label></p>
|
||||
<p><label>Budget</label><input type="text" name="aqbudgetid" value="<!-- TMPL_VAR name="aqbudgetid" -->"></p>
|
||||
<p><label>Biblio</label><input type="text" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->"> <a href="#" onClick="Plugin(f)">...</a></p>
|
||||
<p><label>Notes</label><TEXTAREA NAME="notes" COLS=30 ROWS=2><!-- TMPL_VAR name="notes" --></TEXTAREA></p>
|
||||
</div>
|
||||
<div id="bloc25">
|
||||
<h2 class="bull">Planning</h2>
|
||||
<p><label class="label100">Beginnning date:</label> <input type="text" name="startdate" value="<!-- TMPL_VAR name="startdate" -->"></p>
|
||||
<p><label class="label100">Frequency (*)</label>
|
||||
<select name="periodicity" size="1">
|
||||
<option value="" selected>None</option>
|
||||
<option value="1">1/day</option>
|
||||
<option value="2">1 week</option>
|
||||
<option value="3">2 weeks</option>
|
||||
<option value="4">3 weeks</option>
|
||||
<option value="5">1 month</option>
|
||||
<option value="6">2 months</option>
|
||||
<option value="7">3 months</option>
|
||||
<option value="8">1 quarter</option>
|
||||
<option value="9">2 quarters</option>
|
||||
<option value="10">1 year</option>
|
||||
<option value="11">2 years</option>
|
||||
</select></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
Arrival week's day (*) :
|
||||
</td>
|
||||
<td>
|
||||
<select name="arrival" size="1">
|
||||
<option value="" selected>None</option>
|
||||
<option value="1">Monday</option>
|
||||
<option value="2">Tuesday</option>
|
||||
<option value="3">Wednesday</option>
|
||||
<option value="4">Thursday</option>
|
||||
<option value="5">Friday</option>
|
||||
<option value="6">Saturday</option>
|
||||
<option value="7">Sunday</option>
|
||||
<!-- TMPL_IF name="periodicity1" -->
|
||||
<option value="1" selected>1/day</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="1">1/day</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="periodicity2" -->
|
||||
<option value="2" selected>1 week</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="2">1 week</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="periodicity3" -->
|
||||
<option value="3" selected>2 weeks</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="3">2 weeks</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="periodicity4" -->
|
||||
<option value="4" selected>3 weeks</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="4">3 weeks</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="periodicity5" -->
|
||||
<option value="5" selected>1 month</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="5">1 month</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="periodicity6" -->
|
||||
<option value="6" selected>2 months</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="6">2 months</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="periodicity7" -->
|
||||
<option value="7" selected>3 months</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="7">3 months</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="periodicity8" -->
|
||||
<option value="8" selected>1 quarter</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="8">1 quarter</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="periodicity9" -->
|
||||
<option value="9" selected>2 quarters</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="9">2 quarters</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="periodicity10" -->
|
||||
<option value="10" selected>1 year</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="10">1 year</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="periodicity11" -->
|
||||
<option value="11" selected>2 years</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="11">2 years</option>
|
||||
<!-- /TMPL_IF -->
|
||||
</select>
|
||||
</p>
|
||||
<p><label class="label100">Arrives on</label>
|
||||
<select name="dow" size="1">
|
||||
<option value="">None</option>
|
||||
<!-- TMPL_IF name="dow1" -->
|
||||
<option value="1" selected>Monday</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="1">Monday</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="dow2" -->
|
||||
<option value="2" selected>Tuesday</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="2">Tuesday</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="dow3" -->
|
||||
<option value="3" selected>Wednesday</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="3">Wednesday</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="dow4" -->
|
||||
<option value="4" selected>Thursday</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="4">Thursday</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="dow5" -->
|
||||
<option value="5" selected>Friday</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="5">Friday</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="dow6" -->
|
||||
<option value="6" selected>Saturday</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="6">Saturday</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="dow7" -->
|
||||
<option value="7" selected>Sunday</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="7">Sunday</option>
|
||||
<!-- /TMPL_IF -->
|
||||
</select>
|
||||
</div>
|
||||
<div id="bloc25">
|
||||
<h2 class="bull">Subscription length</h2>
|
||||
<p><label class="label100">Number of num</label><input type="text" name="numberlength" value="<!-- TMPL_VAR name="numberlength" -->"></p>
|
||||
<p><label class="label100">Number of weeks</label><input type="text" name="weeklength" value="<!-- TMPL_VAR name="weeklength" -->"></p>
|
||||
<p><label class="label100">Number of months</label><input type="text" name="monthlength" value="<!-- TMPL_VAR name="monthlength" -->"></p>
|
||||
|
||||
|
||||
</select>
|
||||
</td>
|
||||
<td>Number of num</td><td> <input type="text" name="numberlength" value=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Number of weeks</td><td> <input type="text" name="weeklength" value=""></td>
|
||||
<td>Number of months</td><td> <input type="text" name="monthlength" value=""></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td>X:</td><td> <input type="text" name="X" value="">
|
||||
</td>
|
||||
<td>
|
||||
Evolution :
|
||||
</td>
|
||||
<td>
|
||||
<select name="Xstate" size="1" onChange="select(this[this.selectedIndex].value, 'X')">
|
||||
<option value="" selected>None</option>
|
||||
<option value="1">Added</option>
|
||||
<option value="2">Reinitialize each</option>
|
||||
<option value="3">Constant</option>
|
||||
</select>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> Xfrequency:</td><td> <input type="text" name="Xfreq" value=""></td>
|
||||
<td> Xstep:</td><td> <input type="text" name="Xstep" value=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> Y:</td><td> <input type="text" name="Y" value="">
|
||||
</td><td>
|
||||
Evolution :
|
||||
</td>
|
||||
<td>
|
||||
<select name="Ystate" size="1" onChange="select(this[this.selectedIndex].value, 'Y')">
|
||||
<option value="" selected>None</option>
|
||||
<option value="1">Added each</option>
|
||||
<option value="2">Reinitialize each</option>
|
||||
<option value="3">Constant</option>
|
||||
</select>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> Yfrequency:</td><td> <input type="text" name="Yfreq" value=""></td>
|
||||
<td> Ystep:</td><td> <input type="text" name="Ystep" value=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> Z:</td><td> <input type="text" name="Z" value="">
|
||||
</td><td>
|
||||
Evolution :
|
||||
</td>
|
||||
<td>
|
||||
<select name="Zstate" size="1" onChange="select(this[this.selectedIndex].value, 'Z')">
|
||||
<option value="" selected>None</option>
|
||||
<option value="1">Added each</option>
|
||||
<option value="2">Reinitialize each</option>
|
||||
<option value="3">Constant</option>
|
||||
</select>
|
||||
|
||||
</td></tr>
|
||||
<tr>
|
||||
<td> Zfrequency:</td><td> <input type="text" name="Zfreq" value=""></td>
|
||||
<td> Zstep:</td><td> <input type="text" name="Zstep" value=""></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
Sequencial phrase (*):
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="sequence" value="">
|
||||
|
||||
<input type="button" value="help" onclick="Help()" accesskey="h" class="button catalogue">
|
||||
</td>
|
||||
<td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> Notes : </td><td><TEXTAREA NAME="notes" COLS=30 ROWS=2></TEXTAREA></td>
|
||||
<td>Arrival date : </td><td> <input type="text" name="arrivalplanified" value="">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Bib number : </td><td> <input type="text" name="biblioid" value=""> <a href="#" onClick="Plugin(f)">...</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<bR>
|
||||
<input type="button" value="Add Subscription" onclick="Check(this.form)" accesskey="w" class="button catalogue">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</div>
|
||||
<div id="bloc25">
|
||||
<h2 class="bull">Numbering calculation</h2>
|
||||
<p>
|
||||
<p>Numbering formula: <input type="text" name="numberingmethod" value="<!-- TMPL_VAR name="numberingmethod" -->"></p>
|
||||
<table class="small">
|
||||
<tr>
|
||||
<th class="bull"> </th>
|
||||
<th class="bull">X</th>
|
||||
<th class="bull">Y</th>
|
||||
<th class="bull">Z</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bull">Evolution</td>
|
||||
<td>
|
||||
<select name="seqtype1" size="1" onChange="select(this[this.selectedIndex].value, 'X')">
|
||||
<option value="">None</option>
|
||||
<!-- TMPL_IF name="seqtype11" -->
|
||||
<option value="1" selected>Added each</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="1">Added each</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="seqtype12" -->
|
||||
<option value="2" selected>Reinitialize each</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="2">Reinitialize each</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="seqtype13" -->
|
||||
<option value="3" selected>Constant</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="3">Constant</option>
|
||||
<!-- /TMPL_IF -->
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<select name="seqtype2" size="1" onChange="select(this[this.selectedIndex].value, 'Y')">
|
||||
<option value="" selected>None</option>
|
||||
<!-- TMPL_IF name="seqtype21" -->
|
||||
<option value="1" selected>Added each</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="1">Added each</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="seqtype22" -->
|
||||
<option value="2" selected>Reinitialize each</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="2">Reinitialize each</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="seqtype23" -->
|
||||
<option value="3" selected>Constant</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="3">Constant</option>
|
||||
<!-- /TMPL_IF -->
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<select name="seqtype3" size="1" onChange="select(this[this.selectedIndex].value, 'Z')">
|
||||
<option value="" selected>None</option>
|
||||
<!-- TMPL_IF name="seqtype31" -->
|
||||
<option value="1" selected>Added each</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="1">Added each</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="seqtype32" -->
|
||||
<option value="2" selected>Reinitialize each</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="2">Reinitialize each</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="seqtype33" -->
|
||||
<option value="3" selected>Constant</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="3">Constant</option>
|
||||
<!-- /TMPL_IF -->
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bull">Value</td>
|
||||
<td><input type="text" name="seqnum1" value="<!-- TMPL_VAR name="seqnum1" -->"></td>
|
||||
<td><input type="text" name="seqnum2" value="<!-- TMPL_VAR name="seqnum2" -->"></td>
|
||||
<td><input type="text" name="seqnum3" value="<!-- TMPL_VAR name="seqnum3" -->"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bull">Frequency</td>
|
||||
<td><input type="text" name="freq1" value="<!-- TMPL_VAR name="freq1" -->"></td>
|
||||
<td><input type="text" name="freq2" value="<!-- TMPL_VAR name="freq2" -->"></td>
|
||||
<td><input type="text" name="freq3" value="<!-- TMPL_VAR name="freq3" -->"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bull">Step</td>
|
||||
<td><input type="text" name="step1" value="<!-- TMPL_VAR name="step1" -->"></td>
|
||||
<td><input type="text" name="step2" value="<!-- TMPL_VAR name="step2" -->"></td>
|
||||
<td><input type="text" name="step3" value="<!-- TMPL_VAR name="step3" -->"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<td>Arrival date : </td><td> <input type="text" name="arrivalplanified" value="<!-- TMPL_VAR name="arrivalplanified" -->">
|
||||
</div>
|
||||
<!-- TMPL_IF name="mod" -->
|
||||
<input type="button" value="Save subscription" onclick="Check(this.form)" accesskey="w" class="button bull">
|
||||
<!-- TMPL_ELSE -->
|
||||
<input type="button" value="Add subscription" onclick="Check(this.form)" accesskey="w" class="button bull">
|
||||
<!-- /TMPL_IF -->
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</table>
|
||||
<!-- TMPL_INCLUDE NAME="bull-bottom.inc" -->
|
||||
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
|
||||
select(0, 'X');
|
||||
select(0, 'Y');
|
||||
select(0, 'Z');
|
||||
select(<!--TMPL_VAR name="seqtype1"-->, 'X');
|
||||
select(<!--TMPL_VAR name="seqtype2"-->, 'Y');
|
||||
select(<!--TMPL_VAR name="seqtype3"-->, 'Z');
|
||||
|
||||
function Plugin(f)
|
||||
{
|
||||
|
|
@ -179,11 +255,11 @@ function FindAcqui(f)
|
|||
|
||||
function Check(f)
|
||||
{
|
||||
if (f.supplier.value.length != 0 && f.arrival.value.length != 0
|
||||
&& f.begin.value.length != 0 && f.sequence.value.length != 0
|
||||
&& f.frequency.value.length != 0)
|
||||
if (f.aqbooksellerid.value.length != 0 && f.dow.value.length != 0
|
||||
&& f.startdate.value.length != 0 && f.dow.value.length != 0
|
||||
&& f.periodicity.value.length != 0)
|
||||
{
|
||||
alert('subscription ok');
|
||||
// alert('subscription ok');
|
||||
document.f.submit();
|
||||
}
|
||||
else
|
||||
|
|
@ -193,101 +269,96 @@ else
|
|||
return false;
|
||||
}
|
||||
|
||||
function Help()
|
||||
{
|
||||
window.open("subscription-add-help.pl","Add subscription help page",'width=500,height=400,toolbar=false,scrollbars=yes');
|
||||
}
|
||||
|
||||
function select(reponse, type)
|
||||
{
|
||||
if (type == 'X')
|
||||
{
|
||||
if (reponse == 0)
|
||||
{
|
||||
document.f.Xstep.style.backgroundColor="#DCDCDC";
|
||||
document.f.Xstep.value = "";
|
||||
document.f.Xstep.disabled = true;
|
||||
document.f.Xfreq.style.backgroundColor="#DCDCDC";
|
||||
document.f.Xfreq.value = "";
|
||||
document.f.Xfreq.disabled = true;
|
||||
document.f.X.style.backgroundColor="#DCDCDC";
|
||||
document.f.X.value = "";
|
||||
document.f.X.disabled = true;
|
||||
document.f.step1.style.backgroundColor="#DCDCDC";
|
||||
document.f.step1.value = "";
|
||||
document.f.step1.disabled = true;
|
||||
document.f.freq1.style.backgroundColor="#DCDCDC";
|
||||
document.f.freq1.value = "";
|
||||
document.f.freq1.disabled = true;
|
||||
document.f.seqnum1.style.backgroundColor="#DCDCDC";
|
||||
document.f.seqnum1.value = "";
|
||||
document.f.seqnum1.disabled = true;
|
||||
|
||||
}
|
||||
if (reponse == 1)
|
||||
{
|
||||
document.f.Xstep.style.backgroundColor="#FFFFFF";
|
||||
document.f.Xstep.disabled = false;
|
||||
document.f.Xfreq.style.backgroundColor="#DCDCDC";
|
||||
document.f.Xfreq.value = "";
|
||||
document.f.Xfreq.disabled = true;
|
||||
document.f.X.style.backgroundColor="#FFFFFF";
|
||||
document.f.X.disabled = false;
|
||||
document.f.step1.style.backgroundColor="#FFFFFF";
|
||||
document.f.step1.disabled = false;
|
||||
document.f.freq1.style.backgroundColor="#DCDCDC";
|
||||
document.f.freq1.value = "";
|
||||
document.f.freq1.disabled = true;
|
||||
document.f.seqnum1.style.backgroundColor="#FFFFFF";
|
||||
document.f.seqnum1.disabled = false;
|
||||
}
|
||||
if (reponse == 2)
|
||||
{
|
||||
document.f.Xstep.style.backgroundColor="#FFFFFF";
|
||||
document.f.Xstep.disabled = false;
|
||||
document.f.Xfreq.style.backgroundColor="#FFFFFF";
|
||||
document.f.Xfreq.disabled = false;
|
||||
document.f.X.style.backgroundColor="#FFFFFF";
|
||||
document.f.X.disabled = false;
|
||||
document.f.step1.style.backgroundColor="#FFFFFF";
|
||||
document.f.step1.disabled = false;
|
||||
document.f.freq1.style.backgroundColor="#FFFFFF";
|
||||
document.f.freq1.disabled = false;
|
||||
document.f.seqnum1.style.backgroundColor="#FFFFFF";
|
||||
document.f.seqnum1.disabled = false;
|
||||
}
|
||||
if (reponse == 3)
|
||||
{
|
||||
document.f.Xstep.style.backgroundColor="#DCDCDC";
|
||||
document.f.Xstep.value = "";
|
||||
document.f.Xstep.disabled = true;
|
||||
document.f.Xfreq.style.backgroundColor="#DCDCDC";
|
||||
document.f.Xfreq.value = "";
|
||||
document.f.Xfreq.disabled = true;
|
||||
document.f.X.style.backgroundColor="#FFFFFF";
|
||||
document.f.X.disabled = false;
|
||||
document.f.step1.style.backgroundColor="#DCDCDC";
|
||||
document.f.step1.value = "";
|
||||
document.f.step1.disabled = true;
|
||||
document.f.freq1.style.backgroundColor="#DCDCDC";
|
||||
document.f.freq1.value = "";
|
||||
document.f.freq1.disabled = true;
|
||||
document.f.seqnum1.style.backgroundColor="#FFFFFF";
|
||||
document.f.seqnum1.disabled = false;
|
||||
}
|
||||
}
|
||||
if (type == 'Y')
|
||||
{
|
||||
if (reponse == 0)
|
||||
{
|
||||
document.f.Ystep.style.backgroundColor="#DCDCDC";
|
||||
document.f.Ystep.value = "";
|
||||
document.f.Ystep.disabled = true;
|
||||
document.f.Yfreq.style.backgroundColor="#DCDCDC";
|
||||
document.f.Yfreq.value = "";
|
||||
document.f.Yfreq.disabled = true;
|
||||
document.f.Y.style.backgroundColor="#DCDCDC";
|
||||
document.f.Y.value = "";
|
||||
document.f.Y.disabled = true;
|
||||
document.f.step2.style.backgroundColor="#DCDCDC";
|
||||
document.f.step2.value = "";
|
||||
document.f.step2.disabled = true;
|
||||
document.f.freq2.style.backgroundColor="#DCDCDC";
|
||||
document.f.freq2.value = "";
|
||||
document.f.freq2.disabled = true;
|
||||
document.f.seqnum2.style.backgroundColor="#DCDCDC";
|
||||
document.f.seqnum2.value = "";
|
||||
document.f.seqnum2.disabled = true;
|
||||
|
||||
}
|
||||
if (reponse == 1)
|
||||
{
|
||||
document.f.Ystep.style.backgroundColor="#FFFFFF";
|
||||
document.f.Ystep.disabled = false;
|
||||
document.f.Yfreq.style.backgroundColor="#DCDCDC";
|
||||
document.f.Yfreq.value = "";
|
||||
document.f.Yfreq.disabled = true;
|
||||
document.f.Y.style.backgroundColor="#FFFFFF";
|
||||
document.f.Y.disabled = false;
|
||||
document.f.step2.style.backgroundColor="#FFFFFF";
|
||||
document.f.step2.disabled = false;
|
||||
document.f.freq2.style.backgroundColor="#DCDCDC";
|
||||
document.f.freq2.value = "";
|
||||
document.f.freq2.disabled = true;
|
||||
document.f.seqnum2.style.backgroundColor="#FFFFFF";
|
||||
document.f.seqnum2.disabled = false;
|
||||
}
|
||||
if (reponse == 2)
|
||||
{
|
||||
document.f.Ystep.style.backgroundColor="#FFFFFF";
|
||||
document.f.Ystep.disabled = false;
|
||||
document.f.Yfreq.style.backgroundColor="#FFFFFF";
|
||||
document.f.Yfreq.disabled = false;
|
||||
document.f.Y.style.backgroundColor="#FFFFFF";
|
||||
document.f.Y.disabled = false;
|
||||
document.f.step2.style.backgroundColor="#FFFFFF";
|
||||
document.f.step2.disabled = false;
|
||||
document.f.freq2.style.backgroundColor="#FFFFFF";
|
||||
document.f.freq2.disabled = false;
|
||||
document.f.seqnum2.style.backgroundColor="#FFFFFF";
|
||||
document.f.seqnum2.disabled = false;
|
||||
}
|
||||
if (reponse == 3)
|
||||
{
|
||||
document.f.Ystep.style.backgroundColor="#DCDCDC";
|
||||
document.f.Ystep.value = "";
|
||||
document.f.Ystep.disabled = true;
|
||||
document.f.Yfreq.style.backgroundColor="#DCDCDC";
|
||||
document.f.Yfreq.value = "";
|
||||
document.f.Yfreq.disabled = true;
|
||||
document.f.step2.style.backgroundColor="#DCDCDC";
|
||||
document.f.step2.value = "";
|
||||
document.f.step2.disabled = true;
|
||||
document.f.freq2.style.backgroundColor="#DCDCDC";
|
||||
document.f.freq2.value = "";
|
||||
document.f.freq2.disabled = true;
|
||||
document.f.Y.style.backgroundColor="#FFFFFF";
|
||||
document.f.Y.disabled = false;
|
||||
}
|
||||
|
|
@ -297,46 +368,46 @@ function select(reponse, type)
|
|||
{
|
||||
if (reponse == 0)
|
||||
{
|
||||
document.f.Zstep.style.backgroundColor="#DCDCDC";
|
||||
document.f.Zstep.value = "";
|
||||
document.f.Zstep.disabled = true;
|
||||
document.f.Zfreq.style.backgroundColor="#DCDCDC";
|
||||
document.f.Zfreq.value = "";
|
||||
document.f.Zfreq.disabled = true;
|
||||
document.f.Z.style.backgroundColor="#DCDCDC";
|
||||
document.f.Z.value = "";
|
||||
document.f.Z.disabled = true;
|
||||
document.f.step3.style.backgroundColor="#DCDCDC";
|
||||
document.f.step3.value = "";
|
||||
document.f.step3.disabled = true;
|
||||
document.f.freq3.style.backgroundColor="#DCDCDC";
|
||||
document.f.freq3.value = "";
|
||||
document.f.freq3.disabled = true;
|
||||
document.f.seqnum3.style.backgroundColor="#DCDCDC";
|
||||
document.f.seqnum3.value = "";
|
||||
document.f.seqnum3.disabled = true;
|
||||
|
||||
}
|
||||
if (reponse == 1)
|
||||
{
|
||||
document.f.Zstep.style.backgroundColor="#FFFFFF";
|
||||
document.f.Zstep.disabled = false;
|
||||
document.f.Zfreq.style.backgroundColor="#DCDCDC";
|
||||
document.f.Zfreq.value = "";
|
||||
document.f.Zfreq.disabled = true;
|
||||
document.f.Z.style.backgroundColor="#FFFFFF";
|
||||
document.f.Z.disabled = false;
|
||||
document.f.step3.style.backgroundColor="#FFFFFF";
|
||||
document.f.step3.disabled = false;
|
||||
document.f.freq3.style.backgroundColor="#DCDCDC";
|
||||
document.f.freq3.value = "";
|
||||
document.f.freq3.disabled = true;
|
||||
document.f.seqnum3.style.backgroundColor="#FFFFFF";
|
||||
document.f.seqnum3.disabled = false;
|
||||
}
|
||||
if (reponse == 2)
|
||||
{
|
||||
document.f.Zstep.style.backgroundColor="#FFFFFF";
|
||||
document.f.Zstep.disabled = false;
|
||||
document.f.Zfreq.style.backgroundColor="#FFFFFF";
|
||||
document.f.Zfreq.disabled = false;
|
||||
document.f.Z.style.backgroundColor="#FFFFFF";
|
||||
document.f.Z.disabled = false;
|
||||
document.f.step3.style.backgroundColor="#FFFFFF";
|
||||
document.f.step3.disabled = false;
|
||||
document.f.freq3.style.backgroundColor="#FFFFFF";
|
||||
document.f.freq3.disabled = false;
|
||||
document.f.seqnum3.style.backgroundColor="#FFFFFF";
|
||||
document.f.seqnum3.disabled = false;
|
||||
}
|
||||
if (reponse == 3)
|
||||
{
|
||||
document.f.Zstep.style.backgroundColor="#DCDCDC";
|
||||
document.f.Zstep.value = "";
|
||||
document.f.Zstep.disabled = true;
|
||||
document.f.Zfreq.style.backgroundColor="#DCDCDC";
|
||||
document.f.Zfreq.value = "";
|
||||
document.f.Zfreq.disabled = true;
|
||||
document.f.Z.style.backgroundColor="#FFFFFF";
|
||||
document.f.Z.disabled = false;
|
||||
document.f.step3.style.backgroundColor="#DCDCDC";
|
||||
document.f.step3.value = "";
|
||||
document.f.step3.disabled = true;
|
||||
document.f.freq3.style.backgroundColor="#DCDCDC";
|
||||
document.f.freq3.value = "";
|
||||
document.f.freq3.disabled = true;
|
||||
document.f.seqnum3.style.backgroundColor="#FFFFFF";
|
||||
document.f.seqnum3.disabled = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,463 +1,155 @@
|
|||
|
||||
<!-- TMPL_INCLUDE NAME="bull-top.inc" -->
|
||||
<!--------------------------MAIN BODY OF PAGE-------------------------->
|
||||
<div id="mainbloc">
|
||||
<h1>Subscription</h1>
|
||||
<ul>
|
||||
|
||||
|
||||
|
||||
<div align="center"><font color="black"><b>View an actual subscription</b> </div></font>
|
||||
<table>
|
||||
<h1 class="bull">Subscription</h1>
|
||||
<a href="subscription-add.pl?op=mod&subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->" class="button bull">Edit</a>
|
||||
<a href="statecollection.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->" class="button bull">Recieve</a>
|
||||
<form method="post" name="f">
|
||||
<tr>
|
||||
<td>
|
||||
<div align="center"> </div>
|
||||
<input type="hidden" name="op" value="modsubscription">
|
||||
<input type="hidden" name="suscr" value="<!-- TMPL_VAR name="suscr" -->">
|
||||
<input type="hidden" name="user" value="<!-- TMPL_VAR name="librarian" -->">
|
||||
Librarian identity :</td><td> <!-- TMPL_VAR name="user" --></td></tr>
|
||||
<tr><br><br>
|
||||
<td>Supplier (*) :</td>
|
||||
<td> <input type="text" name="supplier" value="<!-- TMPL_VAR name="aqbooksellerid" -->"><a href="#" OnClick="FindAcqui()">...</td></a></tr>
|
||||
<tr><td>
|
||||
Cost :</td>
|
||||
<td> <input type="text" name="cost" value="<!-- TMPL_VAR name="cost" -->"></td>
|
||||
<td>
|
||||
Suscribtion's budget :</td>
|
||||
<td> <input type="text" name="budget" value="<!-- TMPL_VAR name="aqbudgetid" -->"></td></tr>
|
||||
<tr><td>
|
||||
Beginnning date (*) :</td>
|
||||
<td> <input type="text" name="begin" value="<!-- TMPL_VAR name="startdate" -->"></td>
|
||||
|
||||
<td>
|
||||
Frequency (*) :</td>
|
||||
<td> <select name="frequency" size="1" value="2">
|
||||
<option value="">None</option>
|
||||
<!--TMPL_IF name="frequency1" -->
|
||||
<option value="1" selected>1/day</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="1">1/day</option>
|
||||
<div id="bloc25">
|
||||
<h2 class="bull">Subscription information</h2>
|
||||
<p>Librarian identity :</td><td> <!-- TMPL_VAR name="librarian" --></p>
|
||||
<p><label>Supplier </label><!-- TMPL_VAR name="aqbooksellername" --></p>
|
||||
<p><label>Cost</label><!-- TMPL_VAR name="cost" --></p>
|
||||
<p><label>Budget </label><!-- TMPL_VAR name="bookfundid" --></p>
|
||||
<p><label class="label100">Biblio</label><!-- TMPL_VAR name="bibliotitle" --></p>
|
||||
<p><label class="label100">Notes:</label><!-- TMPL_VAR name="notes" --></p>
|
||||
</div>
|
||||
<div id="bloc25">
|
||||
<h2 class="bull">Planning</h2>
|
||||
<p><label class="label100">Beginnning date:</label> <!-- TMPL_VAR name="startdate" --></p>
|
||||
<p><label class="label100">Frequency (*):</label>
|
||||
<!--TMPL_IF name="periodicity1" -->
|
||||
1/day
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="frequency2" -->
|
||||
<option value="2" selected>1/week</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="2">1/week</option>
|
||||
<!--TMPL_IF name="periodicity2" -->
|
||||
1/week
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="frequency3" -->
|
||||
<option value="3" selected>2/weeks</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="3">2/weeks</option>
|
||||
<!--TMPL_IF name="periodicity3" -->
|
||||
2/weeks
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="frequency4" -->
|
||||
<option value="4" selected>3/weeks</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="4">3/weeks</option>
|
||||
<!--TMPL_IF name="periodicity4" -->
|
||||
3/weeks
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="frequency5" -->
|
||||
<option value="5" selected>1 Month</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="5">1 Month</option>
|
||||
<!--TMPL_IF name="periodicity5" -->
|
||||
1/Month
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="frequency6" -->
|
||||
<option value="6" selected>2 Monthes</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="6">2 Monthes</option>
|
||||
<!--TMPL_IF name="periodicity6" -->
|
||||
1/2 Monthes
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="frequency7" -->
|
||||
<option value="7" selected>3 Monthes</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="7">3 Monthes</option>
|
||||
<!--TMPL_IF name="periodicity7" -->
|
||||
1/3 Monthes
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="frequency8" -->
|
||||
<option value="8" selected>1 quarter</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="8">1 quarter</option>
|
||||
<!--TMPL_IF name="periodicity8" -->
|
||||
1/quarter
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="frequency9" -->
|
||||
<option value="9" selected>2 quarters</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="9">2 quarters</option>
|
||||
<!--TMPL_IF name="periodicity9" -->
|
||||
2 quarters
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="frequency10" -->
|
||||
<option value="10" selected>1 year</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="10">1 year</option>
|
||||
<!--TMPL_IF name="periodicity10" -->
|
||||
1 year
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="frequency11" -->
|
||||
<option value="11" selected>2 years</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="11">2 years</option>
|
||||
<!--TMPL_IF name="periodicity11" -->
|
||||
2 years
|
||||
<!-- /TMPL_IF -->
|
||||
</select></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
Arrival week's day (*) :
|
||||
</td>
|
||||
<td>
|
||||
<select name="arrival" size="1">
|
||||
<option value="" selected>None</option>
|
||||
</p>
|
||||
<p><label class="label100">Arrives on:</label>
|
||||
<!--TMPL_IF name="arrival1" -->
|
||||
<option value="1" SELECTED>Monday</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="1">Monday</option>
|
||||
|
||||
Monday
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="arrival2" -->
|
||||
<option value="2" SELECTED>Tuesday</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="2">Tuesday</option>
|
||||
|
||||
Tuesday
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="arrival3" -->
|
||||
<option value="3" SELECTED>Wednesday</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="3">Wednesday</option>
|
||||
|
||||
Wednesday
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="arrival4" -->
|
||||
<option value="4" SELECTED>Thursday</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="4">Thursday</option>
|
||||
|
||||
Thursday
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="arrival5" -->
|
||||
<option value="5" SELECTED>Friday</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="5">Friday</option>
|
||||
|
||||
Friday
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="arrival6" -->
|
||||
<option value="6" SELECTED>Saturday</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="6">Saturday</option>
|
||||
|
||||
Saturday
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="arrival7" -->
|
||||
<option value="7" SELECTED>Sunday</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="7">Sunday</option>
|
||||
|
||||
Sunday
|
||||
<!-- /TMPL_IF -->
|
||||
</div>
|
||||
<div id="bloc25">
|
||||
<h2 class="bull">Subscription length</h2>
|
||||
<p><label class="label100">Number of num</label><!-- TMPL_VAR name="numberlength" --></p>
|
||||
<p><label class="label100">Number of weeks</label><!-- TMPL_VAR name="weeklength" --></p>
|
||||
<p><label class="label100">Number of months</label><!-- TMPL_VAR name="monthlength" --></p>
|
||||
|
||||
</select>
|
||||
</td>
|
||||
<td>Number of num</td><td> <input type="text" name="numberlength" value="<!-- TMPL_VAR name="numberlength" -->"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Number of weeks</td><td> <input type="text" name="weeklength" value="<!-- TMPL_VAR name="weeklength" -->"></td>
|
||||
<td>Number of months</td><td> <input type="text" name="monthlength" value="<!-- TMPL_VAR name="monthlength" -->"></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td>X:</td><td> <input type="text" name="X" value="<!-- TMPL_VAR name="seqnum1" -->">
|
||||
</td>
|
||||
<td>
|
||||
Evolution :
|
||||
</td>
|
||||
<td>
|
||||
<select name="Xstate" size="1" onChange="select(this[this.selectedIndex].value, 'X')">
|
||||
<option value="" selected>None</option>
|
||||
<!-- TMPL_IF NAME="Xstate1" -->
|
||||
<option value="1" SELECTED>Added</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="1" > Added </option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF NAME="Xstate2" -->
|
||||
<option value="2" SELECTED>Reinitialize each</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="2" >Reinitialize each</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF NAME="Xstate3" -->
|
||||
<option value="3" SELECTED>Constant</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="3" > Constant </option>
|
||||
<!-- /TMPL_IF -->
|
||||
</select>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> Xfrequency:</td><td> <input type="text" name="Xfreq" value="<!-- TMPL_VAR name="freq1" -->"></td>
|
||||
<td> Xstep:</td><td> <input type="text" name="Xstep" value="<!-- TMPL_VAR name="step1" -->"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> Y:</td><td> <input type="text" name="Y" value="<!-- TMPL_VAR name="seqnum2" -->">
|
||||
</td><td>
|
||||
Evolution :
|
||||
</td>
|
||||
<td>
|
||||
<select name="Ystate" size="1" onChange="select(this[this.selectedIndex].value, 'Y')">
|
||||
<option value="" selected>None</option>
|
||||
<!-- TMPL_IF NAME="Ystate1" -->
|
||||
<option value="1" SELECTED>Added</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="1" > Added </option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF NAME="Ystate2" -->
|
||||
<option value="2" SELECTED>Reinitialize each</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="2" >Reinitialize each</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF NAME="Ystate3" -->
|
||||
<option value="3" SELECTED>Constant</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="3" > Constant </option>
|
||||
<!-- /TMPL_IF -->
|
||||
</select>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> Yfrequency:</td><td> <input type="text" name="Yfreq" value="<!-- TMPL_VAR name="freq2" -->"></td>
|
||||
<td> Ystep:</td><td> <input type="text" name="Ystep" value="<!-- TMPL_VAR name="step2" -->"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> Z:</td><td> <input type="text" name="Z" value="<!-- TMPL_VAR name="seqnum3" -->">
|
||||
</td><td>
|
||||
Evolution :
|
||||
</td>
|
||||
<td>
|
||||
<select name="Zstate" size="1" onChange="select(this[this.selectedIndex].value, 'Z')">
|
||||
<option value="" selected>None</option>
|
||||
<!-- TMPL_IF NAME="Zstate1" -->
|
||||
<option value="1" SELECTED>Added</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="1" > Added </option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF NAME="Zstate2" -->
|
||||
<option value="2" SELECTED>Reinitialize each</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="2" >Reinitialize each</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF NAME="Zstate3" -->
|
||||
<option value="3" SELECTED>Constant</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="3" > Constant </option>
|
||||
<!-- /TMPL_IF -->
|
||||
</select>
|
||||
</select>
|
||||
|
||||
</td></tr>
|
||||
<tr>
|
||||
<td> Zfrequency:</td><td> <input type="text" name="Zfreq" value="<!-- TMPL_VAR name="freq3" -->"></td>
|
||||
<td> Zstep:</td><td> <input type="text" name="Zstep" value="<!-- TMPL_VAR name="step3" -->"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
Sequencial phrase (*):
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="sequence" value="<!-- TMPL_VAR name="sequence" -->">
|
||||
|
||||
<input type="button" value="help" onclick="Help()" accesskey="h" class="button catalogue">
|
||||
</td>
|
||||
<td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> Notes : </td><td><TEXTAREA NAME="notes" COLS=30 ROWS=2 value="<!-- TMPL_VAR name="notes" -->"></TEXTAREA></td>
|
||||
<td>Arrival date : </td><td> <input type="text" name="arrivalplanified" value="<!-- TMPL_VAR name="arrivalplanified" -->">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Bib number : </td><td> <input type="text" name="biblioid" value="<!-- TMPL_VAR name="biblioid" -->"> <a href="#" onClick="Plugin(f)">...</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<bR>
|
||||
<input type="button" value="Mod Subscription" onclick="Check(this.form)" accesskey="w" class="button catalogue">
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</div>
|
||||
<div id="bloc25">
|
||||
<h2 class="bull">Numbering calculation</h2>
|
||||
<p>
|
||||
<p>Numbering formula: <!-- TMPL_VAR name="numberingmethod" --></p>
|
||||
<table class="small">
|
||||
<tr>
|
||||
<th class="bull"> </th>
|
||||
<th class="bull">X</th>
|
||||
<th class="bull">Y</th>
|
||||
<th class="bull">Z</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bull">Evolution</td>
|
||||
<td>
|
||||
<!-- TMPL_IF NAME="seqtype11" -->
|
||||
Added
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF NAME="seqtype12" -->
|
||||
Reinitialize each
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF NAME="seqtype13" -->
|
||||
Constant
|
||||
<!-- /TMPL_IF -->
|
||||
</td>
|
||||
<td>
|
||||
<!-- TMPL_IF NAME="seqtype21" -->
|
||||
Added
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF NAME="seqtype22" -->
|
||||
Reinitialize each
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF NAME="seqtype23" -->
|
||||
Constant
|
||||
<!-- /TMPL_IF -->
|
||||
</td>
|
||||
<td>
|
||||
<!-- TMPL_IF NAME="seqtype31" -->
|
||||
Added
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF NAME="seqtype32" -->
|
||||
Reinitialize each
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF NAME="seqtype33" -->
|
||||
Constant
|
||||
<!-- /TMPL_IF -->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bull">Value</td>
|
||||
<td><!-- TMPL_VAR name="seqnum1" --></td>
|
||||
<td><!-- TMPL_VAR name="seqnum2" --></td>
|
||||
<td><!-- TMPL_VAR name="seqnum3" --></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bull">Frequency</td>
|
||||
<td><!-- TMPL_VAR name="freq1" --></td>
|
||||
<td><!-- TMPL_VAR name="freq2" --></td>
|
||||
<td><!-- TMPL_VAR name="freq3" --></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bull">Step</td>
|
||||
<td><!-- TMPL_VAR name="step1" --></td>
|
||||
<td><!-- TMPL_VAR name="step2" --></td>
|
||||
<td><!-- TMPL_VAR name="step3" --></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- TMPL_INCLUDE NAME="bull-bottom.inc" -->
|
||||
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
select(document.f.Xstate[document.f.Xstate.selectedIndex].value, 'X');
|
||||
select(document.f.Ystate[document.f.Xstate.selectedIndex].value, 'Y');
|
||||
select(document.f.Zstate[document.f.Xstate.selectedIndex].value, 'Z');
|
||||
|
||||
function Plugin(f)
|
||||
{
|
||||
window.open("subscription-bib-search.pl","Find a bib index",'width=500,height=400,toolbar=false,scrollbars=yes');
|
||||
}
|
||||
|
||||
function FindAcqui(f)
|
||||
{
|
||||
window.open("acqui-search.pl","Find a supplier",'width=500,height=400,toolbar=false,scrollbars=yes');
|
||||
}
|
||||
|
||||
|
||||
function Check(f)
|
||||
{
|
||||
if (f.supplier.value.length != 0 && f.arrival.value.length != 0
|
||||
&& f.begin.value.length != 0 && f.sequence.value.length != 0
|
||||
&& f.frequency.value.length != 0)
|
||||
{
|
||||
alert('subscription ok');
|
||||
document.f.submit();
|
||||
}
|
||||
else
|
||||
{
|
||||
alert('field marked with * are mandatory');
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function Help()
|
||||
{
|
||||
window.open("subscription-add-help.pl","Add subscription help page",'width=500,height=400,toolbar=false,scrollbars=yes');
|
||||
}
|
||||
|
||||
function select(reponse, type)
|
||||
{
|
||||
if (type == 'X')
|
||||
{
|
||||
if (reponse == 0)
|
||||
{
|
||||
document.f.Xstep.style.backgroundColor="#DCDCDC";
|
||||
document.f.Xstep.value = "";
|
||||
document.f.Xstep.disabled = true;
|
||||
document.f.Xfreq.style.backgroundColor="#DCDCDC";
|
||||
document.f.Xfreq.value = "";
|
||||
document.f.Xfreq.disabled = true;
|
||||
document.f.X.style.backgroundColor="#DCDCDC";
|
||||
document.f.X.value = "";
|
||||
document.f.X.disabled = true;
|
||||
|
||||
}
|
||||
if (reponse == 1)
|
||||
{
|
||||
document.f.Xstep.style.backgroundColor="#FFFFFF";
|
||||
document.f.Xstep.disabled = false;
|
||||
document.f.Xfreq.style.backgroundColor="#DCDCDC";
|
||||
document.f.Xfreq.value = "";
|
||||
document.f.Xfreq.disabled = true;
|
||||
document.f.X.style.backgroundColor="#FFFFFF";
|
||||
document.f.X.disabled = false;
|
||||
}
|
||||
if (reponse == 2)
|
||||
{
|
||||
document.f.Xstep.style.backgroundColor="#FFFFFF";
|
||||
document.f.Xstep.disabled = false;
|
||||
document.f.Xfreq.style.backgroundColor="#FFFFFF";
|
||||
document.f.Xfreq.disabled = false;
|
||||
document.f.X.style.backgroundColor="#FFFFFF";
|
||||
document.f.X.disabled = false;
|
||||
}
|
||||
if (reponse == 3)
|
||||
{
|
||||
document.f.Xstep.style.backgroundColor="#DCDCDC";
|
||||
document.f.Xstep.value = "";
|
||||
document.f.Xstep.disabled = true;
|
||||
document.f.Xfreq.style.backgroundColor="#DCDCDC";
|
||||
document.f.Xfreq.value = "";
|
||||
document.f.Xfreq.disabled = true;
|
||||
document.f.X.style.backgroundColor="#FFFFFF";
|
||||
document.f.X.disabled = false;
|
||||
}
|
||||
}
|
||||
if (type == 'Y')
|
||||
{
|
||||
if (reponse == 0)
|
||||
{
|
||||
document.f.Ystep.style.backgroundColor="#DCDCDC";
|
||||
document.f.Ystep.value = "";
|
||||
document.f.Ystep.disabled = true;
|
||||
document.f.Yfreq.style.backgroundColor="#DCDCDC";
|
||||
document.f.Yfreq.value = "";
|
||||
document.f.Yfreq.disabled = true;
|
||||
document.f.Y.style.backgroundColor="#DCDCDC";
|
||||
document.f.Y.value = "";
|
||||
document.f.Y.disabled = true;
|
||||
|
||||
}
|
||||
if (reponse == 1)
|
||||
{
|
||||
document.f.Ystep.style.backgroundColor="#FFFFFF";
|
||||
document.f.Ystep.disabled = false;
|
||||
document.f.Yfreq.style.backgroundColor="#DCDCDC";
|
||||
document.f.Yfreq.value = "";
|
||||
document.f.Yfreq.disabled = true;
|
||||
document.f.Y.style.backgroundColor="#FFFFFF";
|
||||
document.f.Y.disabled = false;
|
||||
}
|
||||
if (reponse == 2)
|
||||
{
|
||||
document.f.Ystep.style.backgroundColor="#FFFFFF";
|
||||
document.f.Ystep.disabled = false;
|
||||
document.f.Yfreq.style.backgroundColor="#FFFFFF";
|
||||
document.f.Yfreq.disabled = false;
|
||||
document.f.Y.style.backgroundColor="#FFFFFF";
|
||||
document.f.Y.disabled = false;
|
||||
}
|
||||
if (reponse == 3)
|
||||
{
|
||||
document.f.Ystep.style.backgroundColor="#DCDCDC";
|
||||
document.f.Ystep.value = "";
|
||||
document.f.Ystep.disabled = true;
|
||||
document.f.Yfreq.style.backgroundColor="#DCDCDC";
|
||||
document.f.Yfreq.value = "";
|
||||
document.f.Yfreq.disabled = true;
|
||||
document.f.Y.style.backgroundColor="#FFFFFF";
|
||||
document.f.Y.disabled = false;
|
||||
}
|
||||
|
||||
}
|
||||
if (type == 'Z')
|
||||
{
|
||||
if (reponse == 0)
|
||||
{
|
||||
document.f.Zstep.style.backgroundColor="#DCDCDC";
|
||||
document.f.Zstep.value = "";
|
||||
document.f.Zstep.disabled = true;
|
||||
document.f.Zfreq.style.backgroundColor="#DCDCDC";
|
||||
document.f.Zfreq.value = "";
|
||||
document.f.Zfreq.disabled = true;
|
||||
document.f.Z.style.backgroundColor="#DCDCDC";
|
||||
document.f.Z.value = "";
|
||||
document.f.Z.disabled = true;
|
||||
|
||||
}
|
||||
if (reponse == 1)
|
||||
{
|
||||
document.f.Zstep.style.backgroundColor="#FFFFFF";
|
||||
document.f.Zstep.disabled = false;
|
||||
document.f.Zfreq.style.backgroundColor="#DCDCDC";
|
||||
document.f.Zfreq.value = "";
|
||||
document.f.Zfreq.disabled = true;
|
||||
document.f.Z.style.backgroundColor="#FFFFFF";
|
||||
document.f.Z.disabled = false;
|
||||
}
|
||||
if (reponse == 2)
|
||||
{
|
||||
document.f.Zstep.style.backgroundColor="#FFFFFF";
|
||||
document.f.Zstep.disabled = false;
|
||||
document.f.Zfreq.style.backgroundColor="#FFFFFF";
|
||||
document.f.Zfreq.disabled = false;
|
||||
document.f.Z.style.backgroundColor="#FFFFFF";
|
||||
document.f.Z.disabled = false;
|
||||
}
|
||||
if (reponse == 3)
|
||||
{
|
||||
document.f.Zstep.style.backgroundColor="#DCDCDC";
|
||||
document.f.Zstep.value = "";
|
||||
document.f.Zstep.disabled = true;
|
||||
document.f.Zfreq.style.backgroundColor="#DCDCDC";
|
||||
document.f.Zfreq.value = "";
|
||||
document.f.Zfreq.disabled = true;
|
||||
document.f.Z.style.backgroundColor="#FFFFFF";
|
||||
document.f.Z.disabled = false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<!-- TMPL_INCLUDE NAME="bull-bottom.inc" -->
|
||||
Loading…
Reference in New Issue