From 2b3c5c3fd4aa630d1c0dae105d4c77c4272e3cee Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 5 Mar 2014 12:06:47 +0100 Subject: [PATCH] Bug 11755: SearchOrders does not return booksellerid The SearchOrders routine should return the booksellerid. Booksellerid was returned before bug 10723. Quick test plan: Go on orderreceive.pl and verify that the vendor link is correct. --- C4/Acquisition.pm | 1 + t/db_dependent/Acquisition.t | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index b848c73..6186255 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -1664,6 +1664,7 @@ sub SearchOrders { biblioitems.isbn, biblioitems.biblioitemnumber, aqbasket.authorisedby, + aqbasket.booksellerid, aqbasket.closedate, aqbasket.creationdate, aqbasket.basketname, diff --git a/t/db_dependent/Acquisition.t b/t/db_dependent/Acquisition.t index 1cb6d4b..3b18ced 100755 --- a/t/db_dependent/Acquisition.t +++ b/t/db_dependent/Acquisition.t @@ -8,7 +8,7 @@ use POSIX qw(strftime); use C4::Bookseller qw( GetBookSellerFromId ); -use Test::More tests => 63; +use Test::More tests => 64; BEGIN { use_ok('C4::Acquisition'); @@ -90,6 +90,8 @@ is(scalar(@$orders), 3, 'retrieved 3 pending orders'); ok( exists( @$orders[0]->{basketgroupid} ), "SearchOrder: The basketgroupid key exists" ); ok( exists( @$orders[0]->{basketgroupname} ), "SearchOrder: The basketgroupname key exists" ); ok( exists( @$orders[0]->{authorisedby} ), "SearchOrders: The authorised key exists (bug 11777)" ); +# Regression test for bug 11755 +ok( exists( @$orders[0]->{booksellerid} ), "SearchOrder: The booksellerid key exists" ); ok( GetBudgetByOrderNumber($ordernumber1)->{'budget_id'} eq $budgetid, "GetBudgetByOrderNumber returns expected budget" ); -- 1.7.10.4