#if it doesnt create it
$bibnum = &newbiblio({ title => $title?$title:"",
author => $author?$author:"",
- copyright => $copyright?$copyright:"" });
+ copyright => $copyright?$copyright:"",
+ series => $series?$series:"",
+
+
+ });
$bibitemnum = &newbiblioitem({ biblionumber => $bibnum,
itemtype => $itemtype?$itemtype:"",
- isben => $isbn?$isbn:"" });
+ isbn => $isbn?$isbn:""
+ });
if ($title) {
newsubtitle($bibnum,$title);
}
- modbiblio({ biblionumber => $bibnum,
- title => $title?$title:"",
- author => $author?$author:"",
- copyrightdate => $copyright?$copyright:"",
- series => $series?$series:"" });
+#unuseful (already added 4 line before
+# modbiblio({ biblionumber => $bibnum,
+# title => $title?$title:"",
+# author => $author?$author:"",
+# copyrightdate => $copyright?$copyright:"",
+# series => $series?$series:"" });
} else {
$bibnum=$input->param('biblio');
$bibitemnum=$input->param('bibitemnum');
if ($bibitemnum eq '' || $itemtype ne $oldtype){
$bibitemnum= &newbiblioitem({ biblionumber => $bibnum,
itemtype => $itemtype?$itemtype:"",
- isben => $isbn?$isbn:"" });
+ isbn => $isbn?$isbn:"" });
}
&modbiblio({
biblionumber => $bibnum,
my $biblio=$input->param('biblio');
my $data;
my $new;
+
if ($ordnum eq ''){
$new='yes';
$ordnum=newordernum;
}else {
$data=getsingleorder($ordnum);
$biblio=$data->{'biblionumber'};
-}
+}
print startpage;
// rrp=f.rrp.value
// ecost=f.ecost.value //budgetted cost
// GST=f.GST.value
- // total=f.total.value
- //make useful constants out of the above
- exchangerate=f.elements[currency].value //get exchange rate
+ // total=f.total.value
+ //make useful constants out of the above
+ exchangerate=f.elements[currency].value //get exchange rate
gst_on=(!listinc && applygst);
- //do real stuff
+ //do real stuff
rrp=listprice*exchangerate;
ecost=rrp*(100-discount)/100
GST=0;
rrp=rrp*1.125;
GST=ecost*0.125
}
-
+
total=(ecost+GST)*quantity
-
-
+
+
f.rrp.value=display(rrp)
f.ecost.value=display(ecost)
f.GST.value=display(GST)
f.total.value=display(total)
-
+
}
-
+
function messenger(X,Y,etc){
print "<input type=hidden name=orderexists value=yes>\n";
}
print <<printend
-<a href=basket.pl?basket=$basket><img src=/images/view-basket.gif width=187 heigth=42 border=0 align=right alt="View Basket"></a>
+<a href=basket.pl?basket=$basket><img src=/images/view-basket.gif width=187 heigth=42 border=0 align=right alt="View Basket"></a>
<FONT SIZE=6><em>$ordnum - Order Details </em></FONT><br>
Shopping Basket For: $booksellers[0]->{'name'}
<P>
my $sth=$dbh->prepare($query);
$sth->execute;
print "<option value=\"\">Please choose:\n";
-while (my $data=$sth->fetchrow_hashref){
- print "<option value=\"" . $data->{'itemtype'} . "\">" . $data->{'description'} . "\n";
+while (my $data2=$sth->fetchrow_hashref){
+ if ($data2->{'itemtype'} eq $data->{'itemtype'}) {
+ print "<option value=\"" . $data2->{'itemtype'} . "\" SELECTED>" . $data2->{'description'} . "\n";
+ } else {
+ print "<option value=\"" . $data2->{'itemtype'} . "\">" . $data2->{'description'} . "\n";
+ }
}
$sth->finish;
$dbh->disconnect;