From 2dbb086c46c307f3c18f69cf4838d75e510f1370 Mon Sep 17 00:00:00 2001 From: hdl Date: Wed, 24 Aug 2005 08:49:03 +0000 Subject: [PATCH] Adding a note field in serial table. This will allow librarian to mention a note on a peculiar waiting serial number. --- C4/Bull.pm | 9 +++++---- bull/statecollection.pl | 3 ++- .../default/en/bull/statecollection.tmpl | 8 +++++++- updater/updatedatabase | 14 ++++++++++++++ 4 files changed, 28 insertions(+), 6 deletions(-) diff --git a/C4/Bull.pm b/C4/Bull.pm index 17434bdd32..ccca9f8e18 100755 --- a/C4/Bull.pm +++ b/C4/Bull.pm @@ -360,7 +360,8 @@ 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 and status <>5"); + my $sth=$dbh->prepare("select serialid,serialseq, status, planneddate, notes from serial where subscriptionid = ? and status <>2 and status <>4 and status <>5"); + $sth->execute($subscriptionid); my @serials; while(my $line = $sth->fetchrow_hashref) { @@ -395,7 +396,7 @@ sub getlatestserials{ } sub serialchangestatus { - my ($serialid,$serialseq,$planneddate,$status)=@_; + my ($serialid,$serialseq,$planneddate,$status,$note)=@_; # 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=?"); @@ -405,8 +406,8 @@ sub serialchangestatus { if ($status eq 6){ delissue($serialseq, $subscriptionid) }else{ - $sth = $dbh->prepare("update serial set serialseq=?,planneddate=?,status=? where serialid = ?"); - $sth->execute($serialseq,$planneddate,$status,$serialid); + $sth = $dbh->prepare("update serial set serialseq=?,planneddate=?,status=?, notes=? where serialid = ?"); + $sth->execute($serialseq,$planneddate,$status,$note,$serialid); $sth = $dbh->prepare("select missinglist,recievedlist from subscriptionhistory where subscriptionid=?"); $sth->execute($subscriptionid); my ($missinglist,$recievedlist) = $sth->fetchrow; diff --git a/bull/statecollection.pl b/bull/statecollection.pl index b49bc6114f..79d70e3ce2 100755 --- a/bull/statecollection.pl +++ b/bull/statecollection.pl @@ -24,6 +24,7 @@ my $librariannote = $query->param('librariannote'); my @serialids = $query->param('serialid'); my @serialseqs = $query->param('serialseq'); my @planneddates = $query->param('planneddate'); +my @notes = $query->param('notes'); my @status = $query->param('status'); my ($template, $loggedinuser, $cookie) @@ -46,7 +47,7 @@ if ($op eq 'serialchangestatus') { $sth->execute($serialids[$i]); my ($oldstatus) = $sth->fetchrow; if ($serialids[$i]) { - serialchangestatus($serialids[$i],$serialseqs[$i],format_date_in_iso($planneddates[$i]),$status[$i]) unless ($hassubscriptionexpired && $oldstatus == 1); + serialchangestatus($serialids[$i],$serialseqs[$i],format_date_in_iso($planneddates[$i]),$status[$i],$notes[$i]) unless ($hassubscriptionexpired && $oldstatus == 1); } else { # add a special issue if ($serialseqs[$i]) { diff --git a/koha-tmpl/intranet-tmpl/default/en/bull/statecollection.tmpl b/koha-tmpl/intranet-tmpl/default/en/bull/statecollection.tmpl index 5defdf30e1..8e6d44d17e 100644 --- a/koha-tmpl/intranet-tmpl/default/en/bull/statecollection.tmpl +++ b/koha-tmpl/intranet-tmpl/default/en/bull/statecollection.tmpl @@ -25,6 +25,9 @@ Status + + Notes + @@ -67,6 +70,9 @@ + + " size=10 maxlength=15> + @@ -128,4 +134,4 @@ function popup() } - \ No newline at end of file + diff --git a/updater/updatedatabase b/updater/updatedatabase index 886c0183ed..189eb2f242 100755 --- a/updater/updatedatabase +++ b/updater/updatedatabase @@ -167,6 +167,16 @@ my %fielddefinitions = ( # default => '' # }, # ], + serial => [ + { + field => 'notes', + type => 'TEXT', + null => 'NULL', + key => '', + default => '', + extra => '' + }, + ], ); #------------------- @@ -609,6 +619,10 @@ sub MARCgetitem { exit; # $Log$ +# Revision 1.121 2005/08/24 08:49:03 hdl +# Adding a note field in serial table. +# This will allow librarian to mention a note on a peculiar waiting serial number. +# # Revision 1.120 2005/08/09 14:10:32 tipaul # 1st commit to go to zebra. # don't update your cvs if you want to have a working head... -- 2.39.5