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 85-92 Link Here
85
            <th>Owner</th>
85
            <th>Owner</th>
86
            <th>Library</th>
86
            <th>Library</th>
87
            <th>Amount</th>
87
            <th>Amount</th>
88
            <th>Ordered</th>
88
            <th>Base-level ordered</th>
89
            <th>Spent</th>
89
            <th>Total ordered</th>
90
            <th>Base-level spent</th>
91
            <th>Total spent</th>
90
            <th>Total available</th>
92
            <th>Total available</th>
91
        </tr>
93
        </tr>
92
        </thead>
94
        </thead>
Lines 97-103 Link Here
97
            <th colspan="4">Total</th>
99
            <th colspan="4">Total</th>
98
            <th class="data"></th>
100
            <th class="data"></th>
99
            <th class="data"></th>
101
            <th class="data"></th>
102
            <th class="data">[% totordered_active | $Price %]</th>
100
            <th class="data"></th>
103
            <th class="data"></th>
104
            <th class="data">[% totspent_active | $Price %]</th>
101
            <th class="data"></th>
105
            <th class="data"></th>
102
        </tr>
106
        </tr>
103
        </tfoot>
107
        </tfoot>
Lines 143-149 Link Here
143
                    </a>
147
                    </a>
144
                </td>
148
                </td>
145
                <td class="data">
149
                <td class="data">
146
                    <a href="spent.pl?fund=[% loop_budge.budget_id | uri %]&amp;fund_code=[% loop_budge.budget_code | uri %]">
150
                    <span class="total_amount">[% loop_budge.total_ordered | $Price %]</span>
151
                </td>
152
                <td class="data">
153
                    <a href="spent.pl?fund=[% loop_budge.budget_id | uri  %]&amp;fund_code=[% loop_budge.budget_code | uri %]">
147
                    [% IF loop_budge.budget_parent_id %]
154
                    [% IF loop_budge.budget_parent_id %]
148
                        [% loop_budge.budget_spent | $Price %]
155
                        [% loop_budge.budget_spent | $Price %]
149
                    [% ELSE %]
156
                    [% ELSE %]
Lines 152-157 Link Here
152
                    </a>
159
                    </a>
153
                </td>
160
                </td>
154
                <td class="data">
161
                <td class="data">
162
                    <span class="total_amount">[% loop_budge.total_spent | $Price %]</span>
163
                </td>
164
                <td class="data">
155
                    [% IF loop_budge.budget_parent_id %]
165
                    [% IF loop_budge.budget_parent_id %]
156
                        [% loop_budge.budget_avail | $Price %]
166
                        [% loop_budge.budget_avail | $Price %]
157
                    [% ELSE %]
167
                    [% ELSE %]
158
- 

Return to bug 16126