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

(-)a/acqui/acqui-home.pl (-1 / +3 lines)
Lines 90-95 foreach my $budget ( @{$budget_arr} ) { Link Here
90
90
91
    $budget->{'budget_ordered'} = GetBudgetOrdered( $budget->{'budget_id'} );
91
    $budget->{'budget_ordered'} = GetBudgetOrdered( $budget->{'budget_id'} );
92
    $budget->{'budget_spent'}   = GetBudgetSpent( $budget->{'budget_id'} );
92
    $budget->{'budget_spent'}   = GetBudgetSpent( $budget->{'budget_id'} );
93
    $budget->{'total_spent'} = GetBudgetHierarchySpent( $budget->{'budget_id'} ) // 0;
94
    $budget->{'total_ordered'} = GetBudgetHierarchyOrdered( $budget->{'budget_id'} ) // 0;
93
    if ( !defined $budget->{budget_spent} ) {
95
    if ( !defined $budget->{budget_spent} ) {
94
        $budget->{budget_spent} = 0;
96
        $budget->{budget_spent} = 0;
95
    }
97
    }
Lines 97-103 foreach my $budget ( @{$budget_arr} ) { Link Here
97
        $budget->{budget_ordered} = 0;
99
        $budget->{budget_ordered} = 0;
98
    }
100
    }
99
    $budget->{'budget_avail'} =
101
    $budget->{'budget_avail'} =
100
      $budget->{'budget_amount'} - ( $budget->{'budget_spent'} + $budget->{'budget_ordered'} );
102
      $budget->{'budget_amount'} - ( $budget->{'total_spent'} + $budget->{'total_ordered'} );
101
103
102
    $total      += $budget->{'budget_amount'};
104
    $total      += $budget->{'budget_amount'};
103
    $totspent   += $budget->{'budget_spent'};
105
    $totspent   += $budget->{'budget_spent'};
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt (-4 / +13 lines)
Lines 43-49 $(document).ready(function() { Link Here
43
        },
43
        },
44
        "footerCallback": function ( row, data, start, end, display ) {
44
        "footerCallback": function ( row, data, start, end, display ) {
45
            var api = this.api(), data;
45
            var api = this.api(), data;
46
            footer_column_sum( api, [ 6, 7, 8, 9 ] );
46
            footer_column_sum( api, [ 6, 11 ] );
47
        },
47
        },
48
        "aoColumnDefs": [
48
        "aoColumnDefs": [
49
            { "bVisible": false, "aTargets": [ 0, 1 ] },
49
            { "bVisible": false, "aTargets": [ 0, 1 ] },
Lines 156-163 $(document).ready(function() { Link Here
156
            <th>Owner</th>
156
            <th>Owner</th>
157
            <th>Library</th>
157
            <th>Library</th>
158
            <th>Amount</th>
158
            <th>Amount</th>
159
            <th>Ordered</th>
159
            <th>Base-level ordered</th>
160
            <th>Spent</th>
160
            <th>Total ordered</th>
161
            <th>Base-level spent</th>
162
            <th>Total spent</th>
161
            <th>Total available</th>
163
            <th>Total available</th>
162
        </tr>
164
        </tr>
163
        </thead>
165
        </thead>
Lines 168-174 $(document).ready(function() { Link Here
168
            <th colspan="4">Total</th>
170
            <th colspan="4">Total</th>
169
            <th class="data"></th>
171
            <th class="data"></th>
170
            <th class="data"></th>
172
            <th class="data"></th>
173
            <th class="data">[% totordered_active | $Price %]</th>
171
            <th class="data"></th>
174
            <th class="data"></th>
175
            <th class="data">[% totspent_active | $Price %]</th>
172
            <th class="data"></th>
176
            <th class="data"></th>
173
        </tr>
177
        </tr>
174
        </tfoot>
178
        </tfoot>
Lines 214-219 $(document).ready(function() { Link Here
214
                    </a>
218
                    </a>
215
                </td>
219
                </td>
216
                <td class="data">
220
                <td class="data">
221
                    <span class="total_amount">[% loop_budge.total_ordered | $Price %]</span>
222
                </td>
223
                <td class="data">
217
                    <a href="spent.pl?fund=[% loop_budge.budget_id %]&amp;fund_code=[% loop_budge.budget_code %]">
224
                    <a href="spent.pl?fund=[% loop_budge.budget_id %]&amp;fund_code=[% loop_budge.budget_code %]">
218
                    [% IF loop_budge.budget_parent_id %]
225
                    [% IF loop_budge.budget_parent_id %]
219
                        [% loop_budge.budget_spent | $Price %]
226
                        [% loop_budge.budget_spent | $Price %]
Lines 223-228 $(document).ready(function() { Link Here
223
                    </a>
230
                    </a>
224
                </td>
231
                </td>
225
                <td class="data">
232
                <td class="data">
233
                    <span class="total_amount">[% loop_budge.total_spent | $Price %]</span>
234
                </td>
235
                <td class="data">
226
                    [% IF loop_budge.budget_parent_id %]
236
                    [% IF loop_budge.budget_parent_id %]
227
                        [% loop_budge.budget_avail | $Price %]
237
                        [% loop_budge.budget_avail | $Price %]
228
                    [% ELSE %]
238
                    [% ELSE %]
229
- 

Return to bug 16126