[Koha-cvs] CVS: koha/acqui basket.pl,1.13,1.14 newbiblio.pl,1.12,1.13

Paul POULAIN tipaul at users.sourceforge.net
Mon Jul 7 16:11:18 CEST 2003


Update of /cvsroot/koha/koha/acqui
In directory sc8-pr-cvs1:/tmp/cvs-serv30909/acqui

Modified Files:
	basket.pl newbiblio.pl 
Log Message:
fixing bug #526 : gst rate is now calculated through systempref gist entry.
Before this fix :
* was harcoded to 12,5%
* some bugs in template parameters prevented the javascript to work.
* some bugs prevented some calculations to be done properly.

Index: basket.pl
===================================================================
RCS file: /cvsroot/koha/koha/acqui/basket.pl,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** basket.pl	24 Jun 2003 09:02:15 -0000	1.13
--- basket.pl	7 Jul 2003 14:11:16 -0000	1.14
***************
*** 69,74 ****
  	$line_total=$results[$i]->{'quantity'}*$results[$i]->{'ecost'};
  	$sub_total+=$line_total;
- 	$gist=sprintf("%.2f",$sub_total*0.125);
- 	$grand_total=$sub_total+$gist;
  	my %line;
  	if ($toggle==0){
--- 69,72 ----
***************
*** 93,96 ****
--- 91,97 ----
  	push @books_loop, \%line;
  }
+ $gist=sprintf("%.2f",$sub_total*C4::Context->preference("gist"));
+ $grand_total=$sub_total+$gist;
+ 
  $template->param(basket => $basket,
  						authorisedby => $results[0]->{'authorisedby'},

Index: newbiblio.pl
===================================================================
RCS file: /cvsroot/koha/koha/acqui/newbiblio.pl,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** newbiblio.pl	27 Feb 2003 16:54:10 -0000	1.12
--- newbiblio.pl	7 Jul 2003 14:11:16 -0000	1.13
***************
*** 30,34 ****
  use C4::Search;
  use C4::Auth;
- use C4::Biblio;
  use C4::Output;
  use C4::Interface::CGI::Output;
--- 30,33 ----
***************
*** 50,54 ****
  if ($ordnum eq ''){
  	$new='yes';
- 	warn "NEW : YES";
  	$ordnum=newordernum;
  	if ($biblio) {
--- 49,52 ----
***************
*** 154,161 ****
  						itemtype => $data->{'itemtype'},
  						discount => $booksellers[0]->{'discount'},
!       					listingcst => $booksellers[0]->{'listincgst'},
  						listprice => $booksellers[0]->{'listprice'},
  						gstreg => $booksellers[0]->{'gstreg'},
  						name => $booksellers[0]->{'name'},
  						loop_currencies => \@loop_currency,
  						orderexists => ($new eq 'yes')?0:1,
--- 152,161 ----
  						itemtype => $data->{'itemtype'},
  						discount => $booksellers[0]->{'discount'},
!       					listincgst => $booksellers[0]->{'listincgst'},
  						listprice => $booksellers[0]->{'listprice'},
  						gstreg => $booksellers[0]->{'gstreg'},
  						name => $booksellers[0]->{'name'},
+ 						currency => $booksellers[0]->{'listprice'},
+ 						gstrate => C4::Context->preference("gist") ,
  						loop_currencies => \@loop_currency,
  						orderexists => ($new eq 'yes')?0:1,





More information about the Koha-cvs mailing list