[Koha-cvs] CVS: koha/acqui newbiblio.pl,1.3,1.4 addorder.pl,1.6,1.7
Paul POULAIN
tipaul at users.sourceforge.net
Wed May 15 16:32:51 CEST 2002
Update of /cvsroot/koha/koha/acqui
In directory usw-pr-cvs1:/tmp/cvs-serv5579/acqui
Modified Files:
newbiblio.pl addorder.pl
Log Message:
smalll bugfixes and code cleaning. See mail in koha-devel for remaining questions
Index: newbiblio.pl
===================================================================
RCS file: /cvsroot/koha/koha/acqui/newbiblio.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** newbiblio.pl 15 May 2002 08:17:59 -0000 1.3
--- newbiblio.pl 15 May 2002 14:32:48 -0000 1.4
***************
*** 22,25 ****
--- 22,26 ----
my $data;
my $new;
+
if ($ordnum eq ''){
$new='yes';
***************
*** 36,40 ****
$data=getsingleorder($ordnum);
$biblio=$data->{'biblionumber'};
! }
print startpage;
--- 37,41 ----
$data=getsingleorder($ordnum);
$biblio=$data->{'biblionumber'};
! }
print startpage;
***************
*** 62,70 ****
// 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
gst_on=(!listinc && applygst);
! //do real stuff
rrp=listprice*exchangerate;
ecost=rrp*(100-discount)/100
--- 63,71 ----
// 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
gst_on=(!listinc && applygst);
! //do real stuff
rrp=listprice*exchangerate;
ecost=rrp*(100-discount)/100
***************
*** 74,88 ****
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)
!
}
!
--- 75,89 ----
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)
!
}
!
***************
*** 129,133 ****
}
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>
<FONT SIZE=6><em>$ordnum - Order Details </em></FONT><br>
Shopping Basket For: $booksellers[0]->{'name'}
--- 130,134 ----
}
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>
<FONT SIZE=6><em>$ordnum - Order Details </em></FONT><br>
Shopping Basket For: $booksellers[0]->{'name'}
***************
*** 163,168 ****
$sth->execute;
print "<option value=\"\">Please choose:\n";
! while (my $data=$sth->fetchrow_hashref){
! print "<option value=\"" . $data->{'itemtype'} . "\">" . $data->{'description'} . "\n";
}
$sth->finish;
--- 164,173 ----
$sth->execute;
print "<option value=\"\">Please choose:\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;
Index: addorder.pl
===================================================================
RCS file: /cvsroot/koha/koha/acqui/addorder.pl,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** addorder.pl 15 May 2002 07:52:01 -0000 1.6
--- addorder.pl 15 May 2002 14:32:48 -0000 1.7
***************
*** 44,59 ****
$bibnum = &newbiblio({ title => $title?$title:"",
author => $author?$author:"",
! copyright => $copyright?$copyright:"" });
$bibitemnum = &newbiblioitem({ biblionumber => $bibnum,
itemtype => $itemtype?$itemtype:"",
! isben => $isbn?$isbn:"" });
if ($title) {
newsubtitle($bibnum,$title);
}
! modbiblio({ biblionumber => $bibnum,
! title => $title?$title:"",
! author => $author?$author:"",
! copyrightdate => $copyright?$copyright:"",
! series => $series?$series:"" });
} else {
$bibnum=$input->param('biblio');
--- 44,65 ----
$bibnum = &newbiblio({ title => $title?$title:"",
author => $author?$author:"",
! copyright => $copyright?$copyright:"",
! series => $series?$series:"",
!
!
! });
$bibitemnum = &newbiblioitem({ biblionumber => $bibnum,
itemtype => $itemtype?$itemtype:"",
! isbn => $isbn?$isbn:""
! });
if ($title) {
newsubtitle($bibnum,$title);
}
! #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');
***************
*** 63,67 ****
$bibitemnum= &newbiblioitem({ biblionumber => $bibnum,
itemtype => $itemtype?$itemtype:"",
! isben => $isbn?$isbn:"" });
}
&modbiblio({
--- 69,73 ----
$bibitemnum= &newbiblioitem({ biblionumber => $bibnum,
itemtype => $itemtype?$itemtype:"",
! isbn => $isbn?$isbn:"" });
}
&modbiblio({
More information about the Koha-cvs
mailing list