From 609779490f92624228dbbca857c635c0149e91df Mon Sep 17 00:00:00 2001
From: Jonathan Druart
Date: Mon, 24 Mar 2014 14:48:29 +0100
Subject: [PATCH] [PASSED QA] Bug 11988: Display aqbasketgroup.closeddate on late orders table
Test plan:
Display the late orders table and verify the basket group close date is
correctly displayed.
Signed-off-by: David Cook
Signed-off-by: Kyle M Hall
---
C4/Acquisition.pm | 1 +
acqui/lateorders.pl | 6 ++++--
.../prog/en/modules/acqui/lateorders.tt | 8 +++++++-
3 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm
index 33aa8e3..8d827ee 100644
--- a/C4/Acquisition.pm
+++ b/C4/Acquisition.pm
@@ -2022,6 +2022,7 @@ sub GetLateOrders {
my @query_params = ();
my $select = "
SELECT aqbasket.basketno,
+ aqbasket.basketgroupid,
aqorders.ordernumber,
DATE(aqbasket.closedate) AS orderdate,
aqorders.rrp AS unitpricesupplier,
diff --git a/acqui/lateorders.pl b/acqui/lateorders.pl
index 1a64a4c..680f997 100755
--- a/acqui/lateorders.pl
+++ b/acqui/lateorders.pl
@@ -155,8 +155,10 @@ if ($estimateddeliverydateto_dt) {
my @lateorders = GetLateOrders( @parameters );
my $total;
-foreach (@lateorders){
- $total += $_->{subtotal};
+for my $order ( @lateorders ) {
+ $total += $order->{subtotal};
+ $order->{basketgroup} = GetBasketgroup( $order->{basketgroupid} )
+ if $order->{basketgroupid};
}
my @letters;
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt
index c76cf2d..68e6290 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt
@@ -117,6 +117,7 @@ $(document).ready(function() {
Information |
Total cost |
Basket |
+ Basket group |
Claims count |
Claimed date |
@@ -163,6 +164,11 @@ $(document).ready(function() {
[% lateorder.branch %]
+
+ [% IF lateorder.basketgroup.id %]
+ [% lateorder.basketgroup.name %] ([% lateorder.basketgroup.id %]) [% IF lateorder.basketgroup.closeddate %]closed on [% lateorder.basketgroup.closeddate | $KohaDates %].[% END %]
+ [% END %]
+ |
[% lateorder.claims_count %] |
[% lateorder.claimed_date %] |
@@ -172,7 +178,7 @@ $(document).ready(function() {
Total |
[% total %] |
- |
+ |
--
1.7.2.5