Bug 11027: Add a column for basketgroups in late orders table and improve other columns

This patch makes 4 changes in late orders page :
- adding a new column for basketgroup, displaying
  the name and number of the basketgroup
- displaying the name of the basket as well as its
  number, with a hyperlink to this basket
- displaying fund in a separate column to make
  sorting easier, and renaming it from "budget" to
  "fund" (the confusion can be found elsewhere in Koha...)
- displaying branch in a separate column to make
  sorting easier (this column could be improved later,
  by getting branch from basketgroup if there is one)

For that, in Aquisition.pm, I made some changes to GetLateOrders:
- 3 new columns in SELECT
- 1 new join

To test :
1. Display the list of late orders of your instance.
2. Check you have 3 new columns for basketgroups, fund and branch
3. In basketgroup column you should have "name of basket group (number)"
4. In basket column you should have "name of basket (number)"
5. Check the links for basketgroups. They should send you to the
   page displaying information for each basketgroup
   (without possibiliy of editing them if they are closed)

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Patches pass QA script and all tests.
Works as described. Also checked sorting and orders which
are not in a basketgroup display correctly.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11027: (follow-up) Create link to baskets/basketgroups only if user have required permissions

With this followup, a user without order_manage permission won't be able
to cick on a basket and a user without group_manage permission won't be
able to click on a basketgroup

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11027: (follow-up) hide link if no basketgroup and use real branch name

This patch is a answer to remarks made by QA:
- if there is no basketgroup for an order, the basketgroup
  column in lastorders.pl is now blank (instead of parentheses)
- the name of the branch is used instead of its code in the
  branch column

To test: check late orders, included and not included into basketgroup

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11027: (follow-up) change label "Branch" to "Library"

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11027: (follow-up) update unit test to reflect new columns returned by GetLateOrders

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11864: (code cleanup) re-indent parcel.tt and rename a variable

Signed-off-by: remy juliette <juliette.levast@iepg.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixed 2 additional tabs.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11864: Show parent order line in received orders table

Test plan:
1/ Go to the receipt page of a bookseller
2/ Choose an invoice for which you have already partially
   received some orders (or create an order an receive it
   partially)
3/ In the received orders table, under column Order line,
   you should now see the parent order line number in
   parenthesis

Signed-off-by: remy juliette <juliette.levast@iepg.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>