Bug 6613: CSV basket export columns misaligned
authorIan Walls <ian.walls@bywatersolutions.com>
Wed, 20 Jul 2011 15:41:12 +0000 (11:41 -0400)
committerChris Cormack <chrisc@catalyst.net.nz>
Wed, 20 Jul 2011 21:56:33 +0000 (09:56 +1200)
commitc414c11d64d2071b3b8ee597807ddd939de0c6ed
tree01ea8b503d793a4bc58101a0529115684928a6a0
parent0699c8af84f7e3c13c0a48197b581a5375f4f039
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>
C4/Acquisition.pm