From 8cd909ead8fa851797d3876f92370a28c7b77375 Mon Sep 17 00:00:00 2001 From: tipaul Date: Wed, 15 May 2002 14:32:48 +0000 Subject: [PATCH] smalll bugfixes and code cleaning. See mail in koha-devel for remaining questions --- acqui/addorder.pl | 22 ++++++++++++++-------- acqui/newbiblio.pl | 31 ++++++++++++++++++------------- 2 files changed, 32 insertions(+), 21 deletions(-) diff --git a/acqui/addorder.pl b/acqui/addorder.pl index 1e00b8a9c3..75e9d40637 100755 --- a/acqui/addorder.pl +++ b/acqui/addorder.pl @@ -43,18 +43,24 @@ if ($quantity ne '0'){ #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'); @@ -62,7 +68,7 @@ if ($quantity ne '0'){ if ($bibitemnum eq '' || $itemtype ne $oldtype){ $bibitemnum= &newbiblioitem({ biblionumber => $bibnum, itemtype => $itemtype?$itemtype:"", - isben => $isbn?$isbn:"" }); + isbn => $isbn?$isbn:"" }); } &modbiblio({ biblionumber => $bibnum, diff --git a/acqui/newbiblio.pl b/acqui/newbiblio.pl index 104a1af9b2..98212a9736 100755 --- a/acqui/newbiblio.pl +++ b/acqui/newbiblio.pl @@ -21,6 +21,7 @@ my $ordnum=$input->param('ordnum'); my $biblio=$input->param('biblio'); my $data; my $new; + if ($ordnum eq ''){ $new='yes'; $ordnum=newordernum; @@ -35,7 +36,7 @@ if ($ordnum eq ''){ }else { $data=getsingleorder($ordnum); $biblio=$data->{'biblionumber'}; -} +} print startpage; @@ -61,11 +62,11 @@ function update(f){ // 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; @@ -73,17 +74,17 @@ function update(f){ 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){ @@ -128,7 +129,7 @@ if ($new ne 'yes'){ print "\n"; } print <View Basket +View Basket $ordnum - Order Details
Shopping Basket For: $booksellers[0]->{'name'}

@@ -162,8 +163,12 @@ my $query="Select itemtype,description from itemtypes order by description"; my $sth=$dbh->prepare($query); $sth->execute; print "