Bug 11578: (follow-up) fix JavaScript error
authorGalen Charlton <gmc@esilibrary.com>
Sat, 3 May 2014 18:32:34 +0000 (18:32 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Sat, 3 May 2014 18:32:34 +0000 (18:32 +0000)
Fix error that can occur when using the DataTable filter
to filter the table down to just one fund.

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

index 3ff18ce..3f50901 100644 (file)
@@ -160,7 +160,7 @@ var MSG_PARENT_BENEATH_BUDGET = "- " + _("New budget-parent is beneath budget")
                 }
 
                 var nTrs = $('#budgeth tbody tr');
-                var iColspan = nTrs[1].getElementsByTagName('td').length;
+                var iColspan = nTrs[0].getElementsByTagName('td').length;
                 var sLastGroup = "";
                 for ( var i=0 ; i<nTrs.length ; i++ )
                 {