From 449b31777f0ddbe9e1cbbf0ed2f303ed875e3ec7 Mon Sep 17 00:00:00 2001 From: tipaul Date: Wed, 2 Aug 2006 10:16:40 +0000 Subject: [PATCH] (kados should be insterested by this commit) BUGFIX in receive : all pending orders where grouped in getallorders, only 1 line was shown in pending orders for each basket, instead of X + some minor changes in receive : - adding the date to the template - better counting & showing of pending orders --- C4/Acquisition.pm | 6 +-- acqui/receive.pl | 2 + .../default/en/acqui/recieve.tmpl | 48 +++++++++---------- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index 97eef08d73..cf22042627 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -503,8 +503,8 @@ sub getallorders { my ($supplierid)=@_; my $dbh = C4::Context->dbh; my @results = (); - my $strsth ="Select count(*),authorisedby,creationdate,aqbasket.basketno, -closedate,surname,firstname,aqorders.biblionumber,aqorders.title, aqorders.ordernumber + my $strsth ="Select authorisedby,creationdate,aqbasket.basketno, +closedate,surname,firstname,aqorders.biblionumber,aqorders.title,aqorders.author,aqorders.isbn, aqorders.ordernumber, quantity, quantityreceived from aqorders left join aqbasket on aqbasket.basketno=aqorders.basketno left join borrowers on aqbasket.authorisedby=borrowers.borrowernumber @@ -517,7 +517,7 @@ quantityreceived is NULL) and datecancellationprinted is NULL "; $strsth .= " and (borrowers.branchcode = '".$userenv->{branch}."' or borrowers.branchcode ='')"; } } - $strsth.=" group by basketno order by aqbasket.basketno"; + $strsth.=" order by aqbasket.basketno"; my $sth=$dbh->prepare($strsth); $sth->execute($supplierid); while (my $data=$sth->fetchrow_hashref){ diff --git a/acqui/receive.pl b/acqui/receive.pl index d9f875dced..3fbc215803 100755 --- a/acqui/receive.pl +++ b/acqui/receive.pl @@ -31,6 +31,7 @@ use CGI; use C4::Interface::CGI::Output; use C4::Database; use HTML::Template; +use C4::Date; use strict; my $input=new CGI; @@ -123,6 +124,7 @@ $tototal=$tototal+$freight; $template->param(invoice => $invoice, datereceived => $date, + formatteddatereceived => format_date($date), name => $booksellers[0]->{'name'}, supplierid => $supplierid, gst => $gst, diff --git a/koha-tmpl/intranet-tmpl/default/en/acqui/recieve.tmpl b/koha-tmpl/intranet-tmpl/default/en/acqui/recieve.tmpl index aa08abe15f..3b9937d1ee 100644 --- a/koha-tmpl/intranet-tmpl/default/en/acqui/recieve.tmpl +++ b/koha-tmpl/intranet-tmpl/default/en/acqui/recieve.tmpl @@ -2,12 +2,12 @@

- Receipt Summary for Invoice + Receipt parcel for

- Invoice:
- +

+

@@ -30,35 +30,29 @@ "> &biblio=&invoice=&gst=&freight=&supplierid=&catview=yes&datereceived="> - - + + - - - + + + - - - - - - - - - - - + HELP

The total at the bottom of the page should be within a few cents of the total for the invoice.

- GST - + GST + - - TOTAL - + + FREIGHT + + + + TOTAL +
@@ -80,13 +74,17 @@ Basket Title + Ordered + Received - + lines "> + + &biblio=&invoice=&gst=&freight=&supplierid=&datereceived=&catview=yes" class="button acquisition">Recieve -- 2.39.5