Bug 12906: Show shipment date in invoice search result list
authorKatrin Fischer <Katrin.Fischer.83@web.de>
Mon, 8 Jun 2015 02:28:50 +0000 (04:28 +0200)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 24 Jul 2015 16:53:29 +0000 (13:53 -0300)
Patch adds the shipment as a new separate column to the
search results of the invoices search.

To test:
- Search for invoices in the acquisition module
- Verify the results table shows the shipment date
- Verify that sorting works correctly

Signed-off-by: Marc VĂ©ron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt

index 8cd41fa..cb3d9f5 100644 (file)
@@ -12,7 +12,7 @@ $(document).ready(function() {
     var resultst = $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, {
         bPaginate: false,
         aoColumnDefs: [
-            { "bSortable": false, "aTargets": [1, 8] },
+            { "bSortable": false, "aTargets": [1, 9] },
             { "bVisible": false, "aTargets": [0] },
             { "sType": "title-string", "aTargets" : [ "title-string" ] }
         ]
@@ -106,6 +106,7 @@ $(document).ready(function() {
                 <th>&nbsp;</th>
                 <th>Invoice no.</th>
                 <th>Vendor</th>
+                <th class="title-string">Shipment date</th>
                 <th class="title-string">Billing date</th>
                 <th>Received biblios</th>
                 <th>Received items</th>
@@ -120,6 +121,13 @@ $(document).ready(function() {
                   <td><input type="checkbox" class="select-invoice" value="[% invoice.invoiceid %]" /></td>
                   <td><a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% invoice.invoiceid %]">[% invoice.invoicenumber %]</a></td>
                   <td><a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% invoice.booksellerid %]">[% invoice.suppliername %]</a></td>
+                  <td>
+                    [% IF invoice.shipmentdate %]
+                      <span title="[% invoice.shipmentdate %]">[% invoice.shipmentdate | $KohaDates %]</span>
+                    [% ELSE %]
+                      <span title="0000-00-00"></span>
+                    [% END %]
+                  </td>
                   <td>
                     [% IF invoice.billingdate %]
                       <span title="[% invoice.billingdate %]">[% invoice.billingdate | $KohaDates %]</span>