Browse Source

Fixed the holding branch insertion code. It was inserting the correct

homebranch but was still inserting the wrong home branch
3.0.x
rangi 23 years ago
parent
commit
6b341d91ab
  1. 10
      acqui.simple/addbooks.pl
  2. 2
      acqui.simple/addbookslccn.pl

10
acqui.simple/addbooks.pl

@ -261,10 +261,12 @@ sub newitem {
my @datearr=localtime(time);
my $date=(1900+$datearr[5])."-".($datearr[4]+1)."-".$datearr[3];
my $q_homebranch=$dbh->quote($input->param('homebranch'));
$sth=$dbh->prepare("insert into items (itemnumber, biblionumber,
my $query="insert into items (itemnumber, biblionumber,
biblioitemnumber,barcode, itemnotes, holdingbranch, homebranch, dateaccessioned, replacementprice) values ($itemnumber,
$biblionumber, $biblioitemnumber, $barcode, $q_itemnotes, 'STWE', $q_homebranch, '$date', $replacementprice)");
$biblionumber, $biblioitemnumber, $barcode, $q_itemnotes, $q_homebranch, $q_homebranch, '$date', $replacementprice)";
$sth=$dbh->prepare($query);
$sth->execute;
# print $query;
}
if ($isbn) {
@ -321,9 +323,7 @@ EOF
my $branches=getbranches();
foreach my $key (sort(keys %$branches)) {
print "<option value=\"$key\">$branches->{$key}->{'branchname'}</option>";
# $key, '=', $branches->{$key}, "\n";
}
# <option value='STWE'>Stewart Elementary<option value='MEZ'>Meziadin Elementary
}
print << "EOF";
</select></td></tr>
</tr><td colspan=2>Replacement Price: <input name=replacementprice size=10></td></tr>

2
acqui.simple/addbookslccn.pl

@ -259,7 +259,7 @@ sub newitem {
my $q_homebranch=$dbh->quote($input->param('homebranch'));
$sth=$dbh->prepare("insert into items (itemnumber, biblionumber,
biblioitemnumber,barcode, itemnotes, holdingbranch, homebranch, dateaccessioned, replacementprice) values ($itemnumber,
$biblionumber, $biblioitemnumber, $barcode, $q_itemnotes, 'STWE', $q_homebranch, '$date', $replacementprice)");
$biblionumber, $biblioitemnumber, $barcode, $q_itemnotes, $q_homebranch, $q_homebranch, '$date', $replacementprice)");
$sth->execute;
}

Loading…
Cancel
Save