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

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

Return to bug 16126