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

(-)a/acqui/acqui-home.pl (-1 / +7 lines)
Lines 78-83 foreach my $budget ( @{$budget_arr} ) { Link Here
78
    if ( !defined $budget->{budget_amount} ) {
78
    if ( !defined $budget->{budget_amount} ) {
79
        $budget->{budget_amount} = 0;
79
        $budget->{budget_amount} = 0;
80
    }
80
    }
81
82
    $budget->{'budget_ordered'} = GetBudgetOrdered( $budget->{'budget_id'} );
83
    $budget->{'budget_spent'}   = GetBudgetSpent( $budget->{'budget_id'} );
84
    $budget->{'total_spent'} = GetBudgetHierarchySpent( $budget->{'budget_id'} ) // 0;
85
    $budget->{'total_ordered'} = GetBudgetHierarchyOrdered( $budget->{'budget_id'} ) // 0;
86
81
    if ( !defined $budget->{budget_spent} ) {
87
    if ( !defined $budget->{budget_spent} ) {
82
        $budget->{budget_spent} = 0;
88
        $budget->{budget_spent} = 0;
83
    }
89
    }
Lines 85-91 foreach my $budget ( @{$budget_arr} ) { Link Here
85
        $budget->{budget_ordered} = 0;
91
        $budget->{budget_ordered} = 0;
86
    }
92
    }
87
    $budget->{'budget_avail'} =
93
    $budget->{'budget_avail'} =
88
      $budget->{'budget_amount'} - ( $budget->{'budget_spent'} + $budget->{'budget_ordered'} );
94
      $budget->{'budget_amount'} - ( $budget->{'total_spent'} + $budget->{'total_ordered'} );
89
95
90
    $total      += $budget->{'budget_amount'};
96
    $total      += $budget->{'budget_amount'};
91
    $totspent   += $budget->{'budget_spent'};
97
    $totspent   += $budget->{'budget_spent'};
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt (-4 / +13 lines)
Lines 92-99 Link Here
92
            <th>Owner</th>
92
            <th>Owner</th>
93
            <th>Library</th>
93
            <th>Library</th>
94
            <th>Amount</th>
94
            <th>Amount</th>
95
            <th>Ordered</th>
95
            <th>Base-level ordered</th>
96
            <th>Spent</th>
96
            <th>Total ordered</th>
97
            <th>Base-level spent</th>
98
            <th>Total spent</th>
97
            <th>Total available</th>
99
            <th>Total available</th>
98
        </tr>
100
        </tr>
99
        </thead>
101
        </thead>
Lines 104-110 Link Here
104
            <th colspan="4">Total</th>
106
            <th colspan="4">Total</th>
105
            <th class="data"></th>
107
            <th class="data"></th>
106
            <th class="data"></th>
108
            <th class="data"></th>
109
            <th class="data">[% totordered_active | $Price %]</th>
107
            <th class="data"></th>
110
            <th class="data"></th>
111
            <th class="data">[% totspent_active | $Price %]</th>
108
            <th class="data"></th>
112
            <th class="data"></th>
109
        </tr>
113
        </tr>
110
        </tfoot>
114
        </tfoot>
Lines 150-156 Link Here
150
                    </a>
154
                    </a>
151
                </td>
155
                </td>
152
                <td class="data">
156
                <td class="data">
153
                    <a href="spent.pl?fund=[% loop_budge.budget_id | uri %]&amp;fund_code=[% loop_budge.budget_code | uri %]">
157
                    <span class="total_amount">[% loop_budge.total_ordered | $Price %]</span>
158
                </td>
159
                <td class="data">
160
                    <a href="spent.pl?fund=[% loop_budge.budget_id | uri  %]&amp;fund_code=[% loop_budge.budget_code | uri %]">
154
                    [% IF loop_budge.budget_parent_id %]
161
                    [% IF loop_budge.budget_parent_id %]
155
                        [% loop_budge.budget_spent | $Price %]
162
                        [% loop_budge.budget_spent | $Price %]
156
                    [% ELSE %]
163
                    [% ELSE %]
Lines 159-164 Link Here
159
                    </a>
166
                    </a>
160
                </td>
167
                </td>
161
                <td class="data">
168
                <td class="data">
169
                    <span class="total_amount">[% loop_budge.total_spent | $Price %]</span>
170
                </td>
171
                <td class="data">
162
                    [% IF loop_budge.budget_parent_id %]
172
                    [% IF loop_budge.budget_parent_id %]
163
                        [% loop_budge.budget_avail | $Price %]
173
                        [% loop_budge.budget_avail | $Price %]
164
                    [% ELSE %]
174
                    [% ELSE %]
165
- 

Return to bug 16126