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
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');
$sub_total+=$line_total;
my %line;
if ($toggle==0){
- $line{color}='#ffffcc';
+ $line{color}='#EEEEEE';
$toggle=1;
} else {
$line{color}='white';
$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,
use CGI;
use C4::Context;
use C4::Catalogue;
-use C4::Biblio;
-use C4::Output;
use C4::Search;
use C4::Auth;
use C4::Output;
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'},
use C4::Interface::CGI::Output;
use C4::Database;
use HTML::Template;
-use C4::Catalogue;
use strict;
my $input=new CGI;
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';