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>
This commit is contained in:
Mathieu Saby 2013-12-18 22:09:50 +01:00 committed by Galen Charlton
parent daebb78b4e
commit 4d80cc0ec7
2 changed files with 16 additions and 7 deletions

View File

@ -2096,6 +2096,9 @@ sub GetLateOrders {
SELECT aqbasket.basketno,
aqorders.ordernumber,
DATE(aqbasket.closedate) AS orderdate,
aqbasket.basketname AS basketname,
aqbasket.basketgroupid AS basketgroupid,
aqbasketgroups.name AS basketgroupname,
aqorders.rrp AS unitpricesupplier,
aqorders.ecost AS unitpricelib,
aqorders.claims_count AS claims_count,
@ -2116,6 +2119,7 @@ sub GetLateOrders {
LEFT JOIN aqbudgets ON aqorders.budget_id = aqbudgets.budget_id,
aqbasket LEFT JOIN borrowers ON aqbasket.authorisedby = borrowers.borrowernumber
LEFT JOIN aqbooksellers ON aqbasket.booksellerid = aqbooksellers.id
LEFT JOIN aqbasketgroups ON aqbasket.basketgroupid = aqbasketgroups.id
WHERE aqorders.basketno = aqbasket.basketno
AND ( datereceived = ''
OR datereceived IS NULL

View File

@ -117,6 +117,9 @@ $(document).ready(function() {
<th>Information</th>
<th>Total cost</th>
<th>Basket</th>
<th>Basket group</th>
<th>Branch</th>
<th>Fund</th>
<th>Claims count</th>
<th>Claimed date</th>
</tr>
@ -154,14 +157,16 @@ $(document).ready(function() {
<td>
[% lateorder.unitpricesupplier %]x[% lateorder.quantity %] =
[% lateorder.subtotal %]
<p title="budget">[% lateorder.budget %]</p>
</td>
<td>
<p><a href="basket.pl?basketno=[% lateorder.basketno %]" title="basket">
[% lateorder.basketno %]
</a>
</p>
<p title="branch">[% lateorder.branch %]</p>
<a href="basket.pl?basketno=[% lateorder.basketno %]" title="basket">[% lateorder.basketname %] ([% lateorder.basketno %])</a>
</td>
<td>
<a href="basketgroup.pl?op=add&booksellerid=[% lateorder.supplierid %]&basketgroupid=[% lateorder.basketgroupid %]" title="basketgroup">[% lateorder.basketgroupname %] ([% lateorder.basketgroupid %])</a>
</td>
<td>[% lateorder.branch %]
</td>
<td>[% lateorder.budget %]
</td>
<td>[% lateorder.claims_count %]</td>
<td>[% lateorder.claimed_date %]</td>
@ -172,7 +177,7 @@ $(document).ready(function() {
<tr>
<th colspan="5">Total</th>
<th>[% total %]</th>
<th colspan="3">&nbsp;</th>
<th colspan="6">&nbsp;</th>
</tr>
</tfoot>
</table>