koha-cvs
[Top][All Lists]
Advanced

[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'},
                                );




reply via email to

[Prev in Thread] Current Thread [Next in Thread]