Bug 10794: fix sorting on billing date column in invoices table
This patch adds the sorting by title string option to the table of invoices. This allows column data to be sorted based on the ISO-formatted date rather than the formatted-for-display date. A "blank" (0000-00-00) date is added to cells which contain no date data. To test, view the Acquisitions Invoices page (acqui/invoices.pl) and confirm that the "Billing date" column is sorted correctly regardless of the dateformat system preference. Signed-off-by: Srdjan <srdjan@catalyst.net.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Template only change, passes all tests and QA script. Sorting of the billing column now works as expected. Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This commit is contained in:
parent
7edaaf407d
commit
70f322bd86
1 changed files with 6 additions and 7 deletions
|
@ -9,14 +9,11 @@
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
//<![CDATA[
|
//<![CDATA[
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
[% IF (dateformat == 'metric') %]
|
|
||||||
dt_add_type_uk_date();
|
|
||||||
[% END %]
|
|
||||||
$("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, {
|
$("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, {
|
||||||
bInfo: false,
|
|
||||||
bPaginate: false,
|
|
||||||
bFilter: false,
|
|
||||||
sDom: "t",
|
sDom: "t",
|
||||||
|
"aoColumns": [
|
||||||
|
null,null,{ "sType": "title-string" },null,null,null,null
|
||||||
|
],
|
||||||
aoColumnDefs: [
|
aoColumnDefs: [
|
||||||
{ "bSortable": false, "aTargets": [6] }
|
{ "bSortable": false, "aTargets": [6] }
|
||||||
]
|
]
|
||||||
|
@ -59,7 +56,9 @@ $(document).ready(function() {
|
||||||
<td><a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% invoice.booksellerid %]">[% invoice.suppliername %]</a></td>
|
<td><a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% invoice.booksellerid %]">[% invoice.suppliername %]</a></td>
|
||||||
<td>
|
<td>
|
||||||
[% IF invoice.billingdate %]
|
[% IF invoice.billingdate %]
|
||||||
[% invoice.billingdate | $KohaDates %]
|
<span title="[% invoice.billingdate %]">[% invoice.billingdate | $KohaDates %]</span>
|
||||||
|
[% ELSE %]
|
||||||
|
<span title="0000-00-00"></span>
|
||||||
[% END %]
|
[% END %]
|
||||||
</td>
|
</td>
|
||||||
<td>[% invoice.receivedbiblios %]</td>
|
<td>[% invoice.receivedbiblios %]</td>
|
||||||
|
|
Loading…
Reference in a new issue