@@ -, +, @@
---
.../prog/en/modules/acqui/acqui-home.tt | 12 ++-------
.../prog/en/modules/admin/aqbudgets.tt | 30 ++++++----------------
koha-tmpl/intranet-tmpl/prog/js/datatables.js | 9 ++++++-
3 files changed, 18 insertions(+), 33 deletions(-)
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt
@@ -145,11 +145,7 @@
[% Branches.GetName( loop_budge.budget_branchcode ) | html %] |
- [% IF loop_budge.budget_parent_id %]
- [% loop_budge.budget_amount | $Price %]
- [% ELSE %]
- [% loop_budge.budget_amount | $Price %]
- [% END %]
+ [% loop_budge.budget_amount | $Price %]
|
@@ -162,11 +158,7 @@
|
- [% IF loop_budge.budget_parent_id %]
- [% loop_budge.budget_avail | $Price %]
- [% ELSE %]
- [% loop_budge.budget_avail | $Price %]
- [% END %]
+ [% loop_budge.budget_avail | $Price %]
|
[% END %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt
@@ -103,11 +103,7 @@
[% budget.budget_code | html %] |
[% budget.budget_name | html %] |
- [% IF budget.budget_parent_id %]
- [% budget.budget_amount | $Price %]
- [% ELSE %]
- [% budget.budget_amount | $Price %]
- [% END %]
+ [% budget.budget_amount | $Price %]
|
[% IF budget.budget_parent_id %]
@@ -140,24 +136,14 @@
[% BLOCK colorcellvalue %]
- [% IF parent %]
- [% IF (value > 0) %]
-
- [% ELSIF (value < 0) %]
-
- [% ELSE %]
-
- [% END %]
- [% ELSE %]
- [% IF (value > 0) %]
-
- [% ELSIF (value < 0) %]
-
- [% ELSE %]
-
- [% END %]
+ [% IF (value > 0) %]
+
+ [% ELSIF (value < 0) %]
+
+ [% ELSE %]
+
[% END %]
- [% value | $Price %]
+ [% value | $Price %]
[% END %]
|
--- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js
+++ a/koha-tmpl/intranet-tmpl/prog/js/datatables.js
@@ -485,8 +485,15 @@ function footer_column_sum( api, column_numbers ) {
var total = 0;
var cells = api.column( column_number, { page: 'current' } ).nodes().to$().find("span.total_amount");
+ var budgets_totaled = [];
+ $(cells).each(function(){ budgets_totaled.push( $(this).data('self_id') ); });
$(cells).each(function(){
- total += intVal( $(this).html() );
+ if( $(this).data('parent_id') && $.inArray( $(this).data('parent_id'), budgets_totaled) > -1 ){
+ return;
+ } else {
+ total += intVal( $(this).html() );
+ }
+
});
total /= 100; // Hard-coded decimal precision
--
|