[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/acqui basket.pl,1.24.2.2,1.24.2.3
From: |
Paul POULAIN |
Subject: |
[Koha-cvs] CVS: koha/acqui basket.pl,1.24.2.2,1.24.2.3 |
Date: |
Tue, 07 Jun 2005 04:03:54 -0700 |
Update of /cvsroot/koha/koha/acqui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23970/acqui
Modified Files:
Tag: rel_2_2
basket.pl
Log Message:
adding total to calculate rrp & est prices separately
Index: basket.pl
===================================================================
RCS file: /cvsroot/koha/koha/acqui/basket.pl,v
retrieving revision 1.24.2.2
retrieving revision 1.24.2.3
diff -C2 -r1.24.2.2 -r1.24.2.3
*** basket.pl 14 Apr 2005 20:31:38 -0000 1.24.2.2
--- basket.pl 7 Jun 2005 11:03:52 -0000 1.24.2.3
***************
*** 56,59 ****
--- 56,61 ----
my ($count2,@booksellers)=bookseller($booksellerid);
+ # get librarian branch...
+
# if new basket, pre-fill infos
$basket->{creationdate} = "" unless ($basket->{creationdate});
***************
*** 66,69 ****
--- 68,76 ----
my $grand_total; # $subttotal + $gist
+ # my $line_total_est; # total of each line
+ my $sub_total_est; # total of line totals
+ my $gist_est; # GST
+ my $grand_total_est; # $subttotal + $gist
+
my @books_loop;
for (my $i=0;$i<$count;$i++){
***************
*** 71,74 ****
--- 78,82 ----
$rrp=curconvert($results[$i]->{'currency'},$rrp);
+ $sub_total_est+=$results[$i]->{'quantity'}*$results[$i]->{'rrp'};
$line_total=$results[$i]->{'quantity'}*$results[$i]->{'ecost'};
$sub_total+=$line_total;
***************
*** 99,102 ****
--- 107,112 ----
$gist=sprintf("%.2f",$sub_total*$prefgist);
$grand_total=$sub_total+$gist;
+ $grand_total_est = $sub_total_est+sprintf("%.2f",$sub_total_est*$prefgist);
+ $gist_est = sprintf("%.2f",$sub_total_est*$prefgist);
$template->param(basketno => $basketno,
creationdate => $basket->{creationdate},
***************
*** 107,110 ****
--- 117,124 ----
booksellerid=> $booksellers[0]->{'id'},
name => $booksellers[0]->{'name'},
+ address1 => $booksellers[0]->{'address1'},
+ address2 => $booksellers[0]->{'address2'},
+ address3 => $booksellers[0]->{'address3'},
+ address4 => $booksellers[0]->{'address4'},
entrydate =>
format_date($results[0]->{'entrydate'}),
books_loop => address@hidden,
***************
*** 113,116 ****
--- 127,133 ----
gist => $gist,
grand_total =>$grand_total,
+ sub_total_est => $sub_total_est,
+ gist_est => $gist_est,
+ grand_total_est =>$grand_total_est,
currency => $booksellers[0]->{'listprice'},
);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/acqui basket.pl,1.24.2.2,1.24.2.3,
Paul POULAIN <=
- Prev by Date:
[Koha-cvs] CVS: koha/koha-tmpl/opac-tmpl/css/en opac-dictionary.tmpl,NONE,1.1.2.1 opac-search.tmpl,1.11.2.7,1.11.2.8
- Next by Date:
[Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/en/acqui basket.tmpl,1.15.2.5,1.15.2.6
- Previous by thread:
[Koha-cvs] CVS: koha/koha-tmpl/opac-tmpl/css/en opac-dictionary.tmpl,NONE,1.1.2.1 opac-search.tmpl,1.11.2.7,1.11.2.8
- Next by thread:
[Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/en/acqui basket.tmpl,1.15.2.5,1.15.2.6
- Index(es):