Bugzilla – Attachment 33894 Details for
Bug 13333
Basket group is not displayed for already received orders
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13333: Fix Display basket group for already received orders
Bug-13333-Fix-Display-basket-group-for-already-rec.patch (text/plain), 2.55 KB, created by
Jonathan Druart
on 2014-11-25 11:25:55 UTC
(
hide
)
Description:
Bug 13333: Fix Display basket group for already received orders
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-11-25 11:25:55 UTC
Size:
2.55 KB
patch
obsolete
>From bb69cb3b425eed957126fee27b4a6000fb876920 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Tue, 25 Nov 2014 12:23:45 +0100 >Subject: [PATCH] Bug 13333: Fix Display basket group for already received > orders > >Bug 11111 adds a basket group column on the parcel page. >But it seems that the already received orders never contain the value >(always 'no basket group'). > >Test plan: >Receive an order which is in a basket group and verify the basket group >column is correctly filled. >--- > C4/Acquisition.pm | 7 ++++++- > t/db_dependent/Acquisition/Invoices.t | 12 ++++++------ > 2 files changed, 12 insertions(+), 7 deletions(-) > >diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm >index f9e8c49..f699777 100644 >--- a/C4/Acquisition.pm >+++ b/C4/Acquisition.pm >@@ -2657,9 +2657,14 @@ sub GetInvoiceDetails { > my $invoice = $sth->fetchrow_hashref; > > $query = q{ >- SELECT aqorders.*, biblio.*, aqbasket.basketname >+ SELECT aqorders.*, >+ biblio.*, >+ aqbasket.basketname, >+ aqbasketgroups.id AS basketgroupid, >+ aqbasketgroups.name AS basketgroupname > FROM aqorders > LEFT JOIN aqbasket ON aqorders.basketno = aqbasket.basketno >+ LEFT JOIN aqbasketgroups ON aqbasket.basketgroupid = aqbasketgroups.id > LEFT JOIN biblio ON aqorders.biblionumber = biblio.biblionumber > WHERE invoiceid = ? > }; >diff --git a/t/db_dependent/Acquisition/Invoices.t b/t/db_dependent/Acquisition/Invoices.t >index eac6a23..99b542e 100644 >--- a/t/db_dependent/Acquisition/Invoices.t >+++ b/t/db_dependent/Acquisition/Invoices.t >@@ -1,17 +1,13 @@ > #!/usr/bin/perl >-# >-# This Koha test module is a stub! >-# Add more tests here!!! > >-use strict; >-use warnings; >+use Modern::Perl; > > use C4::Bookseller qw( GetBookSellerFromId ); > use C4::Biblio qw( AddBiblio ); > > use Koha::Acquisition::Order; > >-use Test::More tests => 22; >+use Test::More tests => 24; > > BEGIN { > use_ok('C4::Acquisition'); >@@ -134,6 +130,10 @@ my $invoice2 = GetInvoiceDetails($invoiceid2); > is(scalar @{$invoice1->{'orders'}}, 1, 'Invoice1 has only one order'); > is(scalar @{$invoice2->{'orders'}}, 2, 'Invoice2 has only two orders'); > >+my $orders = $invoice1->{orders}; >+ok( exists( @$orders[0]->{basketgroupid} ), "GetInvoiceDetails: The basketgroupid key exists" ); >+ok( exists( @$orders[0]->{basketgroupname} ), "GetInvoiceDetails: The basketgroupname key exists" ); >+ > my @invoices = GetInvoices(); > cmp_ok(scalar @invoices, '>=', 2, 'GetInvoices returns at least two invoices'); > >-- >2.1.0
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 13333
:
33894
|
34069
|
34152
|
35439