From b81f961b7f528c2a54bd05433bf4faf3270f12f3 Mon Sep 17 00:00:00 2001 From: Paul POULAIN Date: Wed, 26 Sep 2007 12:26:36 +0200 Subject: [PATCH] acquisition, parcel recieve : Changing column order & title and adding totals Signed-off-by: Chris Cormack --- acqui/parcel.pl | 48 +++++++++++-------- .../prog/en/modules/acqui/parcel.tmpl | 21 ++++---- 2 files changed, 40 insertions(+), 29 deletions(-) diff --git a/acqui/parcel.pl b/acqui/parcel.pl index 1d0ee1f2cf..cbc0b5e389 100755 --- a/acqui/parcel.pl +++ b/acqui/parcel.pl @@ -119,6 +119,9 @@ for (my $i=0;$i<$countlines;$i++){ my $pendingorders = GetPendingOrders($supplierid); my $countpendings = scalar @$pendingorders; +# pending orders totals +my ($totalPunitprice,$totalPquantity,$totalPecost); + my @loop_orders = (); for (my $i=0;$i<$countpendings;$i++){ my %line; @@ -130,6 +133,9 @@ for (my $i=0;$i<$countpendings;$i++){ $toggle=0; } %line = %{$pendingorders->[$i]}; + $totalPunitprice += $line{unitprice}; + $totalPquantity +=$line{quantity}; + $totalPecost += $line{ecost}; $line{ecost} = sprintf("%.2f",$line{ecost}); $line{unitprice} = sprintf("%.2f",$line{unitprice}); $line{invoice} = $invoice; @@ -143,25 +149,25 @@ $totalfreight=$freight; $tototal=$tototal+$freight; $template->param(invoice => $invoice, - datereceived => $datereceived, - formatteddatereceived => format_date($datereceived), - name => $booksellers[0]->{'name'}, - supplierid => $supplierid, - gst => $gst, - freight => $freight, - invoice => $invoice, - countreceived => $countlines, - loop_received => \@loop_received, - countpending => $countpendings, - loop_orders => \@loop_orders, - totalprice => $totalprice, - totalfreight => $totalfreight, - totalquantity => $totalquantity, - tototal => $tototal, - gst => $gst, - grandtot => $tototal+$gst, - intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"), - intranetstylesheet => C4::Context->preference("intranetstylesheet"), - IntranetNav => C4::Context->preference("IntranetNav"), - ); + datereceived => $datereceived, + formatteddatereceived => format_date($datereceived), + name => $booksellers[0]->{'name'}, + supplierid => $supplierid, + gst => $gst, + freight => $freight, + invoice => $invoice, + countreceived => $countlines, + loop_received => \@loop_received, + countpending => $countpendings, + loop_orders => \@loop_orders, + totalprice => $totalprice, + totalfreight => $totalfreight, + totalquantity => $totalquantity, + tototal => $tototal, + gst => $gst, + grandtot => $tototal+$gst, + totalPunitprice => sprintf("%.2f",$totalPunitprice), + totalPquantity => $totalPquantity, + totalPecost => sprintf("%.2f",$totalPecost), + ); output_html_with_http_headers $input, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tmpl index 63eddaf856..a2af92ebd5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tmpl @@ -98,11 +98,10 @@ BASKET Summary - Est. Cost - P&P - QTY Ordered - QTY - TOTAL + Order qty + Order cost + Recieved qty + Recieved cost @@ -113,13 +112,19 @@
author :
Publisher : - - - + + + + TOTAL + + + + + -- 2.39.5