Bugzilla – Attachment 16691 Details for
Bug 7298
export late orders, with # of claims and claim dates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 7298: Followup FIX the field list to return in GetOrder
PASSED-QA-Bug-7298-Followup-FIX-the-field-list-to-.patch (text/plain), 3.88 KB, created by
Paul Poulain
on 2013-03-21 22:29:10 UTC
(
hide
)
Description:
[PASSED QA] Bug 7298: Followup FIX the field list to return in GetOrder
Filename:
MIME Type:
Creator:
Paul Poulain
Created:
2013-03-21 22:29:10 UTC
Size:
3.88 KB
patch
obsolete
>From 0ba6018c4798e9e1f8d3c3ff0cb868c7339d3b4b Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Mon, 15 Oct 2012 17:25:51 +0200 >Subject: [PATCH] [PASSED QA] Bug 7298: Followup FIX the field list to return > in GetOrder > >Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr> > >Signed-off-by: Paul Poulain <paul.poulain@biblibre.com> >--- > C4/Acquisition.pm | 17 +++++++++++++---- > acqui/lateorders-export.pl | 16 ++++++++-------- > 2 files changed, 21 insertions(+), 12 deletions(-) > >diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm >index 76a50a3..a9300ab 100644 >--- a/C4/Acquisition.pm >+++ b/C4/Acquisition.pm >@@ -992,10 +992,19 @@ C<$order> are fields from the biblio, biblioitems, aqorders tables of the Koha d > sub GetOrder { > my ($ordernumber) = @_; > my $dbh = C4::Context->dbh; >- my $query = qq{SELECT biblio.*,biblioitems.*, >+ my $query = qq{SELECT > aqorders.*, >- aqbudgets.*, >- aqbasket.*, >+ biblio.title, >+ biblio.author, >+ aqbasket.basketname, >+ borrowers.branchcode, >+ biblioitems.publicationyear, >+ biblio.copyrightdate, >+ biblioitems.editionstatement, >+ biblioitems.isbn, >+ biblioitems.ean, >+ biblio.seriestitle, >+ biblioitems.publishercode, > aqorders.rrp AS unitpricesupplier, > aqorders.ecost AS unitpricelib, > aqorders.claims_count AS claims_count, >@@ -1006,7 +1015,7 @@ sub GetOrder { > biblioitems.publishercode AS publisher, > ADDDATE(aqbasket.closedate, INTERVAL aqbooksellers.deliverytime DAY) AS estimateddeliverydate, > DATE(aqbasket.closedate) AS orderdate, >- aqorders.quantity - COALESCE(aqorders.quantityreceived,0) AS quantity, >+ aqorders.quantity - COALESCE(aqorders.quantityreceived,0) AS quantity_to_receive, > (aqorders.quantity - COALESCE(aqorders.quantityreceived,0)) * aqorders.rrp AS subtotal, > DATEDIFF(CURDATE( ),closedate) AS latesince > FROM aqorders LEFT JOIN biblio ON biblio.biblionumber = aqorders.biblionumber >diff --git a/acqui/lateorders-export.pl b/acqui/lateorders-export.pl >index e3bf603..f328eac 100755 >--- a/acqui/lateorders-export.pl >+++ b/acqui/lateorders-export.pl >@@ -48,14 +48,14 @@ print "ORDER DATE,ESTIMATED DELIVERY DATE,VENDOR,INFORMATION,TOTAL COST,BASKET,C > for my $ordernumber ( @ordernumbers ) { > my $order = GetOrder $ordernumber; > $csv->combine( >- "(" . $$order{supplierid} . ") " . $$order{orderdate} . " (" . $$order{latesince} . " days)", >- $$order{estimateddeliverydate}, >- $$order{supplier}, >- $$order{title} . ( $$order{author} ? " Author: $$order{author}" : "" ) . ( $$order{publisher} ? " Published by: $$order{publisher}" : "" ), >- $$order{unitpricesupplier} . "x" . $$order{quantity} . " = " . $$order{subtotal} . " (" . $$order{budget} . ")", >- $$order{basketname} . " (" . $$order{basketno} . ")", >- $$order{claims_count}, >- $$order{claimed_date} >+ "(" . $order->{supplierid} . ") " . $order->{orderdate} . " (" . $order->{latesince} . " days)", >+ $order->{estimateddeliverydate}, >+ $order->{supplier}, >+ $order->{title} . ( $order->{author} ? " Author: $order->{author}" : "" ) . ( $order->{publisher} ? " Published by: $order->{publisher}" : "" ), >+ $order->{unitpricesupplier} . "x" . $order->{quantity_to_receive} . " = " . $order->{subtotal} . " (" . $order->{budget} . ")", >+ $order->{basketname} . " (" . $order->{basketno} . ")", >+ $order->{claims_count}, >+ $order->{claimed_date} > ); > my $string = $csv->string; > print $string, "\n"; >-- >1.7.9.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 7298
:
7809
|
7891
|
7946
|
8333
|
10426
|
11713
|
11717
|
11721
|
11722
|
12624
|
12817
|
12818
|
15027
|
15028
|
15037
|
15038
|
15039
|
15040
|
16688
|
16689
|
16690
|
16691
|
16692
|
16956
|
19819
|
20313
|
20314
|
20315
|
20471
|
20472
|
20473
|
20474
|
21339
|
21383
|
21384
|
21385
|
21386
|
21387
|
21398
|
21523
|
22617
|
22618
|
22619
|
22620
|
22621
|
22622