Bug 11171: Display basket group name on the supplier list page
authorJonathan Druart <jonathan.druart@biblibre.com>
Wed, 30 Oct 2013 14:48:10 +0000 (15:48 +0100)
committerGalen Charlton <gmc@esilibrary.com>
Wed, 27 Nov 2013 18:02:21 +0000 (18:02 +0000)
Test plan:

Search supplier and verify the basket group column is filled.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
acqui/booksellers.pl
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt

index 80a42f1..04aa2b8 100755 (executable)
@@ -136,6 +136,12 @@ for my $vendor (@suppliers) {
                 $basket->{authorisedby_firstname} = $member->{firstname};
                 $basket->{authorisedby_surname} = $member->{surname};
             }
+            if ($basket->{basketgroupid}) {
+                my $basketgroup = C4::Acquisition::GetBasketgroup($basket->{basketgroupid});
+                if ($basketgroup) {
+                    $basket->{basketgroup} = $basketgroup;
+                }
+            }
             push @{$loop_basket}, $basket; 
         }
     }
index 3dae586..5ee7352 100644 (file)
@@ -102,6 +102,7 @@ $(document).ready(function() {
                                     <th>Items expected</th>
                                     <th>Created by</th>
                                     <th>Date</th>
+                                    <th>Basket group</th>
                                     <th>Closed</th>
                                     <th>&nbsp;</th>
                                 </tr>
@@ -124,6 +125,16 @@ $(document).ready(function() {
                                         </td>
                                         <td><span title="[% basket.creationdate %]">[% basket.creationdate | $KohaDates %]</span></td>
                                         <td>
+                                          [% IF basket.basketgroup %]
+                                            [% basketgroup = basket.basketgroup %]
+                                            [% IF basketgroup.closed %]
+                                              [% basketgroup.name %] (closed)
+                                            [% ELSE %]
+                                              <a href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid=[% basket.booksellerid %]&basketgroupid=[% basketgroup.id %]">[% basketgroup.name %]</a>
+                                            [% END %]
+                                          [% END %]
+                                        </td>
+                                        <td>
                                             [% IF ( basket.closedate ) %]
                                                 <span title="[% basket.closedate %]">[% basket.closedate | $KohaDates %]</span>
                                             [% ELSE %]