View | Details | Raw Unified | Return to bug 23767
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt (-10 / +2 lines)
Lines 145-155 Link Here
145
                </td>
145
                </td>
146
                <td>[% Branches.GetName( loop_budge.budget_branchcode ) | html %]</td>
146
                <td>[% Branches.GetName( loop_budge.budget_branchcode ) | html %]</td>
147
                <td class="data">
147
                <td class="data">
148
                    [% IF loop_budge.budget_parent_id %]
148
                    <span class="total_amount" data-parent_id="[% loop_budge.budget_parent_id | html %]" data-self_id="[% loop_budge.budget_id | html %]">[% loop_budge.budget_amount | $Price %]</span>
149
                        [% loop_budge.budget_amount | $Price %]
150
                    [% ELSE %]
151
                        <span class="total_amount">[% loop_budge.budget_amount | $Price %]</span>
152
                    [% END %]
153
                </td>
149
                </td>
154
                <td class="data">
150
                <td class="data">
155
                    <a href="ordered.pl?fund=[% loop_budge.budget_id | uri %]&amp;fund_code=[% loop_budge.budget_code | uri %]">
151
                    <a href="ordered.pl?fund=[% loop_budge.budget_id | uri %]&amp;fund_code=[% loop_budge.budget_code | uri %]">
Lines 162-172 Link Here
162
                    </a>
158
                    </a>
163
                </td>
159
                </td>
164
                <td class="data">
160
                <td class="data">
165
                    [% IF loop_budge.budget_parent_id %]
161
                    <span class="total_amount" data-parent_id="[% loop_budge.budget_parent_id | html %]" data-self_id="[% loop_budge.budget_id | html %]">[% loop_budge.budget_avail | $Price %]</span>
166
                        [% loop_budge.budget_avail | $Price %]
167
                    [% ELSE %]
168
                        <span class="total_amount">[% loop_budge.budget_avail | $Price %]</span>
169
                    [% END %]
170
                </td>
162
                </td>
171
            </tr>
163
            </tr>
172
        [% END %]
164
        [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt (-22 / +8 lines)
Lines 103-113 Link Here
103
    <td>[% budget.budget_code | html %]</td>
103
    <td>[% budget.budget_code | html %]</td>
104
    <td>[% budget.budget_name | html %]</td>
104
    <td>[% budget.budget_name | html %]</td>
105
    <td class="data">
105
    <td class="data">
106
      [% IF budget.budget_parent_id %]
106
        <span class="total_amount" data-parent_id="[% budget.budget_parent_id | html %]" data-self_id="[% budget.budget_id | html %]">[% budget.budget_amount | $Price %]</span>
107
        <span class="child_fund_amount">[% budget.budget_amount | $Price %]</span>
108
      [% ELSE %]
109
        <span class="total_amount">[% budget.budget_amount | $Price %]</span>
110
      [% END %]
111
    </td>
107
    </td>
112
    <td class="data">
108
    <td class="data">
113
      [% IF budget.budget_parent_id %]
109
      [% IF budget.budget_parent_id %]
Lines 140-163 Link Here
140
136
141
137
142
    [% BLOCK colorcellvalue %]
138
    [% BLOCK colorcellvalue %]
143
        [% IF parent %]
139
        [% IF (value > 0) %]
144
            [% IF (value > 0) %]
140
            <span class="total_amount" data-parent_id="[% budget.budget_parent_id | html %]" data-self_id="[% budget.budget_id | html %]" style="color: green;">
145
                <span class="child_fund_amount" style="color: green;">
141
        [% ELSIF (value < 0) %]
146
            [% ELSIF (value < 0) %]
142
            <span class="total_amount" style="color: red;">
147
                <span class="child_fund_amount" style="color: red;">
143
        [% ELSE %]
148
            [% ELSE %]
144
            <span class="totalamount">
149
                <span class="child_fund_amount">
150
            [% END %]
151
         [% ELSE %]
152
            [% IF (value > 0) %]
153
                <span class="total_amount" style="color: green;">
154
            [% ELSIF (value < 0) %]
155
                <span class="total_amount" style="color: red;">
156
            [% ELSE %]
157
                <span class="totalamount">
158
            [% END %]
159
        [% END %]
145
        [% END %]
160
            [% value | $Price %]
146
        [% value | $Price %]
161
        </span>
147
        </span>
162
    [% END %]
148
    [% END %]
163
    <td class="data">
149
    <td class="data">
(-)a/koha-tmpl/intranet-tmpl/prog/js/datatables.js (-2 / +8 lines)
Lines 485-492 function footer_column_sum( api, column_numbers ) { Link Here
485
485
486
        var total = 0;
486
        var total = 0;
487
        var cells = api.column( column_number, { page: 'current' } ).nodes().to$().find("span.total_amount");
487
        var cells = api.column( column_number, { page: 'current' } ).nodes().to$().find("span.total_amount");
488
        var budgets_totaled = [];
489
        $(cells).each(function(){ budgets_totaled.push( $(this).data('self_id') ); });
488
        $(cells).each(function(){
490
        $(cells).each(function(){
489
            total += intVal( $(this).html() );
491
            if( $(this).data('parent_id') && $.inArray( $(this).data('parent_id'), budgets_totaled) > -1 ){
492
                return;
493
            } else {
494
                total += intVal( $(this).html() );
495
            }
496
490
        });
497
        });
491
        total /= 100; // Hard-coded decimal precision
498
        total /= 100; // Hard-coded decimal precision
492
499
493
- 

Return to bug 23767