From e9ae9ce9f4d989d925c9a98a2e9ce251c9d25b02 Mon Sep 17 00:00:00 2001 From: cauchoip Date: Tue, 8 Jul 2003 16:20:15 +0000 Subject: [PATCH] invoice number problems fixed, "fast receive" now works --- acqui/addorder.pl | 8 ++++++-- acqui/basket.pl | 5 +++-- acqui/newbiblio.pl | 4 +--- acqui/order.pl | 4 ++-- acqui/receive.pl | 5 ++--- acqui/recieveorder.pl | 6 +++++- 6 files changed, 19 insertions(+), 13 deletions(-) diff --git a/acqui/addorder.pl b/acqui/addorder.pl index 2397f4ba0e..30b63e301a 100755 --- a/acqui/addorder.pl +++ b/acqui/addorder.pl @@ -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'); diff --git a/acqui/basket.pl b/acqui/basket.pl index 204813971d..6e2da7fe93 100755 --- a/acqui/basket.pl +++ b/acqui/basket.pl @@ -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, diff --git a/acqui/newbiblio.pl b/acqui/newbiblio.pl index cdb5c5f221..b45b804d03 100755 --- a/acqui/newbiblio.pl +++ b/acqui/newbiblio.pl @@ -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'}, diff --git a/acqui/order.pl b/acqui/order.pl index 4970f10a0a..33ce8e883c 100755 --- a/acqui/order.pl +++ b/acqui/order.pl @@ -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'; diff --git a/acqui/receive.pl b/acqui/receive.pl index 98a90def8a..38fc6cc8ea 100755 --- a/acqui/receive.pl +++ b/acqui/receive.pl @@ -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'; diff --git a/acqui/recieveorder.pl b/acqui/recieveorder.pl index 02083b3ec4..aefd861f72 100755 --- a/acqui/recieveorder.pl +++ b/acqui/recieveorder.pl @@ -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; -- 2.39.5