Bug 6613: CSV basket export columns misaligned
commita15becb9d110a7a70aa00aed77f3dcb07a29ccc9
authorIan Walls <ian.walls@bywatersolutions.com>
Wed, 20 Jul 2011 15:41:12 +0000 (20 11:41 -0400)
committerChris Nighswonger <chris.nighswonger@gmail.com>
Fri, 22 Jul 2011 20:30:42 +0000 (22 16:30 -0400)
tree96b4261fea5b14054cbc4d2b9b51e39d01fa27b8
parent383ac1483bab794eecdbce55d12aff1953c20edb
Bug 6613: CSV basket export columns misaligned

Removes 'line' heading, since it does not correspond to any existing field name, and it pushes the fields
over by one ('ordernumber' is used to denote the ordernumber).

This patch also optimizes the GetBasketAsCSV subroutine a bit; it removes an unnecessary call to GetBiblioData,
since the order information retrieved from GetOrders already contains every field in koha.biblio and koha.biblioitems

This patch also removes the explicit sort done by publishercode, since the information returned by GetOrders is
already ORDER BY'ed, first by publishercode, then by title (there was a FIXME note in GetBasketAsCSV to do this, but
it's already done, so... :) )

To Test:
1.  Create a basket with at least three orders:  one from one publishercode, and two from another
2.  Be sure to leave out any "\n" in your Order Notes, lest you fall prey to bug 6614!
3.  Export the basket
4.  You should see the orders sorted first by publishercode, then by title
5.  Columns should line up correct all the way through

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit c414c11d64d2071b3b8ee597807ddd939de0c6ed)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
C4/Acquisition.pm