invoice number problems fixed, "fast receive" now works
authorcauchoip <cauchoip>
Tue, 8 Jul 2003 16:20:15 +0000 (16:20 +0000)
committercauchoip <cauchoip>
Tue, 8 Jul 2003 16:20:15 +0000 (16:20 +0000)
acqui/addorder.pl
acqui/basket.pl
acqui/newbiblio.pl
acqui/order.pl
acqui/receive.pl
acqui/recieveorder.pl

index 2397f4b..30b63e3 100755 (executable)
@@ -71,6 +71,10 @@ my $rrp=$input->param('rrp');
 my $ecost=$input->param('ecost');
 my $gst=$input->param('GST');
 my $orderexists=$input->param('orderexists');
+my $budget=$input->param('budget');
+my $cost=$input->param('cost');
+my$sub=$input->param('sub');
+my $invoice=$input->param('invoice');
 
 if ($quantity ne '0'){
        #check to see if biblio exists
@@ -105,9 +109,9 @@ if ($quantity ne '0'){
                        series        => $series?$series:"" });
        }
        if ($orderexists ne '') {
-               modorder($title,$ordnum,$quantity,$listprice,$bibnum,$basketno,$supplier,$who,$notes,$bookfund,$bibitemnum,$rrp,$ecost,$gst);
+               modorder($title,$ordnum,$quantity,$listprice,$bibnum,$basketno,$supplier,$who,$notes,$bookfund,$bibitemnum,$rrp,$ecost,$gst,$budget,$cost,$sub,$invoice);
        }else {
-               neworder($bibnum,$title,$ordnum,$basketno,$quantity,$listprice,$supplier,$who,$notes,$bookfund,$bibitemnum,$rrp,$ecost,$gst);
+               neworder($bibnum,$title,$ordnum,$basketno,$quantity,$listprice,$supplier,$who,$notes,$bookfund,$bibitemnum,$rrp,$ecost,$gst,$budget,$cost,$sub,$invoice);
        }
 } else {
        $bibnum=$input->param('biblio');
index 2048139..6e2da7f 100755 (executable)
@@ -70,7 +70,7 @@ for (my $i=0;$i<$count;$i++){
        $sub_total+=$line_total;
        my %line;
        if ($toggle==0){
-               $line{color}='#ffffcc';
+               $line{color}='#EEEEEE';
                $toggle=1;
        } else {
                $line{color}='white';
@@ -90,7 +90,8 @@ for (my $i=0;$i<$count;$i++){
        $line{biblionumber} = $results[$i]->{'biblionumber'};
        push @books_loop, \%line;
 }
-$gist=sprintf("%.2f",$sub_total*C4::Context->preference("gist"));
+my $prefgist =C4::Context->preference("gist");
+$gist=sprintf("%.2f",$sub_total*$prefgist);
 $grand_total=$sub_total+$gist;
 
 $template->param(basket => $basket,
index cdb5c5f..b45b804 100755 (executable)
@@ -25,8 +25,6 @@ use strict;
 use CGI;
 use C4::Context;
 use C4::Catalogue;
-use C4::Biblio;
-use C4::Output;
 use C4::Search;
 use C4::Auth;
 use C4::Output;
@@ -151,7 +149,7 @@ $template->param( existing => $biblio,
                                                biblioitemnumber => $data->{'biblioitemnumber'},
                                                itemtype => $data->{'itemtype'},
                                                discount => $booksellers[0]->{'discount'},
-                                       listincgst => $booksellers[0]->{'listincgst'},
+                                               listincgst => $booksellers[0]->{'listincgst'},
                                                listprice => $booksellers[0]->{'listprice'},
                                                gstreg => $booksellers[0]->{'gstreg'},
                                                name => $booksellers[0]->{'name'},
index 4970f10..33ce8e8 100755 (executable)
@@ -48,14 +48,14 @@ my ($template, $loggedinuser, $cookie)
 my $supplier=$query->param('supplier');
 my ($count,@suppliers)=bookseller($supplier);
 
-my $colour='#ffffcc';
+my $colour='#EEEEEE';
 my $toggle=0;
 my @loop_suppliers;
 for (my $i=0; $i<$count; $i++) {
        my ($ordcount,$orders)=getorders($suppliers[$i]->{'id'});
        my %line;
        if ($toggle==0){
-               $line{color}='#ffffcc';
+               $line{color}='#EEEEEE';
                $toggle=1;
        } else {
                $line{color}='white';
index 98a90de..38fc6cc 100755 (executable)
@@ -31,7 +31,6 @@ use CGI;
 use C4::Interface::CGI::Output;
 use C4::Database;
 use HTML::Template;
-use C4::Catalogue;
 use strict;
 
 my $input=new CGI;
@@ -64,11 +63,11 @@ my $tototal;
 my $toggle;
 my @loop_orders = ();
 for (my$i=0;$i<$count;$i++){
-       $total=($results[$i]->{'unitprice'} + $results[$i]->{'freight'}) * $results[$i]->{'quantityreceived'};
+       $total=($results[$i]->{'unitprice'} + $results[$i]->{'freight'}) * $results[$i]->{'quantityreceived'};   #weird, are the freight fees counted by book? (pierre)
        $results[$i]->{'unitprice'}+=0;
        my %line;
        if ($toggle==0){
-               $line{color}='#ffffcc';
+               $line{color}='#EEEEEE';
                $toggle=1;
        } else {
                $line{color}='white';
index 02083b3..aefd861 100755 (executable)
@@ -43,6 +43,10 @@ my ($template, $loggedinuser, $cookie)
                             flagsrequired => {acquisition => 1},
                             debug => 1,
                             });
-$template->param(name => $booksellers[0]->{'name'},id => $id,);
+
+$template->param(
+               name => $booksellers[0]->{'name'},
+               id => $id,
+               );
 
 output_html_with_http_headers $input, $cookie, $template->output;