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

(-)a/acqui/acqui-home.pl (-34 / +9 lines)
Lines 54-80 my ( $template, $loggedinuser, $cookie, $userflags ) = get_template_and_user( Link Here
54
my $user = GetMember( 'borrowernumber' => $loggedinuser );
54
my $user = GetMember( 'borrowernumber' => $loggedinuser );
55
my $branchname = GetBranchName($user->{branchcode});
55
my $branchname = GetBranchName($user->{branchcode});
56
56
57
58
my $num_formatter;
59
60
my $cur_format = C4::Context->preference("CurrencyFormat");
61
if ( $cur_format eq 'FR' ) {
62
    $num_formatter = Number::Format->new(
63
        'decimal_fill'      => '2',
64
        'decimal_point'     => ',',
65
        'int_curr_symbol'   => '',
66
        'mon_thousands_sep' => ' ',
67
        'thousands_sep'     => ' ',
68
        'mon_decimal_point' => ','
69
    );
70
} else {    # US by default..
71
    $num_formatter = Number::Format->new(
72
        'int_curr_symbol'   => '',
73
        'mon_thousands_sep' => ',',
74
        'mon_decimal_point' => '.'
75
    );
76
}
77
78
my $status           = $query->param('status') || "ASKED";
57
my $status           = $query->param('status') || "ASKED";
79
my $suggestions_count       = CountSuggestion($status);
58
my $suggestions_count       = CountSuggestion($status);
80
59
Lines 134-143 foreach my $budget ( @{$budget_arr} ) { Link Here
134
	$totavail_active   += $budget->{'budget_avail'};    
113
	$totavail_active   += $budget->{'budget_avail'};    
135
    }
114
    }
136
115
137
    for my $field (qw( budget_amount budget_spent budget_ordered budget_avail ) ) {
138
        $budget->{"formatted_$field"} = $num_formatter->format_price( $budget->{$field} );
139
    }
140
141
    push @budget_loop, $budget;
116
    push @budget_loop, $budget;
142
}
117
}
143
118
Lines 145-159 $template->param( Link Here
145
    type          => 'intranet',
120
    type          => 'intranet',
146
    loop_budget   => \@budget_loop,
121
    loop_budget   => \@budget_loop,
147
    branchname    => $branchname,
122
    branchname    => $branchname,
148
    total         => $num_formatter->format_price($total),
123
    total         => $total,
149
    totspent      => $num_formatter->format_price($totspent),
124
    totspent      => $totspent,
150
    totordered    => $num_formatter->format_price($totordered),
125
    totordered    => $totordered,
151
    totcomtd      => $num_formatter->format_price($totcomtd),
126
    totcomtd      => $totcomtd,
152
    totavail      => $num_formatter->format_price($totavail),
127
    totavail      => $totavail,
153
    total_active  => $num_formatter->format_price($total_active),
128
    total_active  => $total_active,
154
    totspent_active     => $num_formatter->format_price($totspent_active),
129
    totspent_active     => $totspent_active,
155
    totordered_active   => $num_formatter->format_price($totordered_active),
130
    totordered_active   => $totordered_active,
156
    totavail_active     => $num_formatter->format_price($totavail_active),
131
    totavail_active     => $totavail_active,
157
    suggestions_count   => $suggestions_count,
132
    suggestions_count   => $suggestions_count,
158
);
133
);
159
134
(-)a/acqui/addorderiso2709.pl (-2 / +1 lines)
Lines 141-147 if ($op eq ""){ Link Here
141
# 3rd step = import the records
141
# 3rd step = import the records
142
#
142
#
143
} elsif ( $op eq 'import_records' ) {
143
} elsif ( $op eq 'import_records' ) {
144
    my $num=FormatNumber();
145
#import selected lines
144
#import selected lines
146
    $template->param('basketno' => $cgiparams->{'basketno'});
145
    $template->param('basketno' => $cgiparams->{'basketno'});
147
# Budget_id is mandatory for adding an order, we just add a default, the user needs to modify this aftewards
146
# Budget_id is mandatory for adding an order, we just add a default, the user needs to modify this aftewards
Lines 227-233 if ($op eq ""){ Link Here
227
            # in France, the cents separator is the , but sometimes, ppl use a .
226
            # in France, the cents separator is the , but sometimes, ppl use a .
228
            # in this case, the price will be x100 when unformatted ! Replace the . by a , to get a proper price calculation
227
            # in this case, the price will be x100 when unformatted ! Replace the . by a , to get a proper price calculation
229
            $price =~ s/\./,/ if C4::Context->preference("CurrencyFormat") eq "FR";
228
            $price =~ s/\./,/ if C4::Context->preference("CurrencyFormat") eq "FR";
230
            $price = $num->unformat_number($price);
229
            $price = Koha::Number::Price->new($price)->unformat;
231
            $orderinfo{gstrate} = $bookseller->{gstrate};
230
            $orderinfo{gstrate} = $bookseller->{gstrate};
232
            my $c = $c_discount ? $c_discount : $bookseller->{discount} / 100;
231
            my $c = $c_discount ? $c_discount : $bookseller->{discount} / 100;
233
            if ( $bookseller->{listincgst} ) {
232
            if ( $bookseller->{listincgst} ) {
(-)a/admin/aqbudgetperiods.pl (-23 / +1 lines)
Lines 91-120 my ($template, $borrowernumber, $cookie, $staff_flags ) = get_template_and_user( Link Here
91
);
91
);
92
92
93
93
94
# This is used in incbudgets-active-currency.inc
94
my $cur = GetCurrency();
95
my $cur = GetCurrency();
95
$template->param( symbol => $cur->{symbol},
96
$template->param( symbol => $cur->{symbol},
96
                  currency => $cur->{currency}
97
                  currency => $cur->{currency}
97
               );
98
               );
98
my $cur_format = C4::Context->preference("CurrencyFormat");
99
my $num;
100
101
if ( $cur_format eq 'US' ) {
102
    $num = new Number::Format(
103
        'int_curr_symbol'   => '',
104
        'mon_thousands_sep' => ',',
105
        'mon_decimal_point' => '.'
106
    );
107
} elsif ( $cur_format eq 'FR' ) {
108
    $num = new Number::Format(
109
        'decimal_fill'      => '2',
110
        'decimal_point'     => ',',
111
        'int_curr_symbol'   => '',
112
        'mon_thousands_sep' => ' ',
113
        'thousands_sep'     => ' ',
114
        'mon_decimal_point' => ','
115
    );
116
}
117
118
99
119
# ADD OR MODIFY A BUDGET PERIOD - BUILD SCREEN
100
# ADD OR MODIFY A BUDGET PERIOD - BUILD SCREEN
120
if ( $op eq 'add_form' ) {
101
if ( $op eq 'add_form' ) {
Lines 161-167 elsif ( $op eq 'delete_confirm' ) { Link Here
161
    my $total = 0;
142
    my $total = 0;
162
    my $data = GetBudgetPeriod( $budget_period_id);
143
    my $data = GetBudgetPeriod( $budget_period_id);
163
144
164
	$$data{'budget_period_total'}=$num->format_price(  $data->{'budget_period_total'});
165
    $template->param(
145
    $template->param(
166
		%$data
146
		%$data
167
    );
147
    );
Lines 291-297 my @period_active_loop; Link Here
291
271
292
foreach my $result ( @{$results}[ $first .. $last ] ) {
272
foreach my $result ( @{$results}[ $first .. $last ] ) {
293
    my $budgetperiod = $result;
273
    my $budgetperiod = $result;
294
    $budgetperiod->{'budget_period_total'}     = $num->format_price( $budgetperiod->{'budget_period_total'} );
295
    $budgetperiod->{budget_active} = 1;
274
    $budgetperiod->{budget_active} = 1;
296
    push( @period_active_loop, $budgetperiod );
275
    push( @period_active_loop, $budgetperiod );
297
}
276
}
Lines 310-316 $last = min( $first + $inactivepagesize - 1, scalar @{$results} - 1, ); Link Here
310
my @period_inactive_loop;
289
my @period_inactive_loop;
311
foreach my $result ( @{$results}[ $first .. $last ] ) {
290
foreach my $result ( @{$results}[ $first .. $last ] ) {
312
    my $budgetperiod = $result;
291
    my $budgetperiod = $result;
313
    $budgetperiod->{'budget_period_total'} = $num->format_price( $budgetperiod->{'budget_period_total'} );
314
    $budgetperiod->{budget_active} = 1;
292
    $budgetperiod->{budget_active} = 1;
315
    push( @period_inactive_loop, $budgetperiod );
293
    push( @period_inactive_loop, $budgetperiod );
316
}
294
}
(-)a/admin/aqbudgets.pl (-17 / +3 lines)
Lines 67-73 if (not defined $template->{VARS}->{'CAN_user_acquisition_budget_add_del'} Link Here
67
{
67
{
68
    $op = 'list';
68
    $op = 'list';
69
}
69
}
70
my $num=FormatNumber;
71
70
72
# get only the columns of aqbudgets in budget_hash
71
# get only the columns of aqbudgets in budget_hash
73
my @columns = Koha::Database->new()->schema->source('Aqbudget')->columns;
72
my @columns = Koha::Database->new()->schema->source('Aqbudget')->columns;
Lines 229-235 if ($op eq 'add_form') { Link Here
229
        budget_id     => $budget->{'budget_id'},
228
        budget_id     => $budget->{'budget_id'},
230
        budget_code   => $budget->{'budget_code'},
229
        budget_code   => $budget->{'budget_code'},
231
        budget_name   => $budget->{'budget_name'},
230
        budget_name   => $budget->{'budget_name'},
232
        budget_amount => $num->format_price(  $budget->{'budget_amount'} ),
231
        budget_amount => $budget->{'budget_amount'},
233
    );
232
    );
234
                                                    # END $OP eq DELETE_CONFIRM
233
                                                    # END $OP eq DELETE_CONFIRM
235
# called by delete_confirm, used to effectively confirm deletion of data in DB
234
# called by delete_confirm, used to effectively confirm deletion of data in DB
Lines 308-325 if ( $op eq 'list' ) { Link Here
308
            if (!defined $budget->{'budget_unalloc_sublevel'}
307
            if (!defined $budget->{'budget_unalloc_sublevel'}
309
            or $budget->{'budget_unalloc_sublevel'} == 0);
308
            or $budget->{'budget_unalloc_sublevel'} == 0);
310
309
311
        for (grep {/total_spent|budget_spent|total_ordered|budget_ordered|budget_amount/} keys %$budget){
312
            $budget->{$_}               = $num->format_price( $budget->{$_} ) if defined($budget->{$_})
313
		}
314
        for (qw/budget_remaining total_remaining/) {
315
            if (defined $budget->{$_}) {
316
                $budget->{$_.'_display'} = $num->format_price($budget->{$_});
317
            }
318
        }
319
320
        # Value of budget_spent equals 0 instead of undefined value
310
        # Value of budget_spent equals 0 instead of undefined value
321
        $budget->{"budget_spent"} = $num->format_price(0) unless defined($budget->{"budget_spent"});
311
        $budget->{budget_spent} = 0 unless defined($budget->{budget_spent});
322
        $budget->{budget_ordered} = $num->format_price(0) unless defined($budget->{"budget_ordered"});
312
        $budget->{budget_ordered} = 0 unless defined($budget->{budget_ordered});
323
313
324
        my $borrower = &GetMember( borrowernumber=>$budget->{budget_owner_id} );
314
        my $borrower = &GetMember( borrowernumber=>$budget->{budget_owner_id} );
325
        $budget->{"budget_owner_name"}     = $borrower->{'firstname'} . ' ' . $borrower->{'surname'};
315
        $budget->{"budget_owner_name"}     = $borrower->{'firstname'} . ' ' . $borrower->{'surname'};
Lines 343-352 if ( $op eq 'list' ) { Link Here
343
333
344
    my $budget_period_total = $period->{budget_period_total};
334
    my $budget_period_total = $period->{budget_period_total};
345
335
346
    foreach ($budget_period_total, $period_alloc_total, $spent_total, $ordered_total, $available_total) {
347
        $_ = $num->format_price($_);
348
    }
349
350
    my $periods = GetBudgetPeriods();
336
    my $periods = GetBudgetPeriods();
351
337
352
    $template->param(
338
    $template->param(
(-)a/admin/aqplan.pl (-22 lines)
Lines 101-126 my $show_mine = $input->param('show_mine') ; Link Here
101
101
102
my @hide_cols      = $input->param('hide_cols');
102
my @hide_cols      = $input->param('hide_cols');
103
103
104
my $cur_format = C4::Context->preference("CurrencyFormat");
105
my $num;
106
107
if ( $cur_format eq 'FR' ) {
108
    $num = new Number::Format(
109
        'decimal_fill'      => '2',
110
        'decimal_point'     => ',',
111
        'int_curr_symbol'   => '',
112
        'mon_thousands_sep' => ' ',
113
        'thousands_sep'     => ' ',
114
        'mon_decimal_point' => ','
115
    );
116
} else {  # US by default..
117
    $num = new Number::Format(
118
        'int_curr_symbol'   => '',
119
        'mon_thousands_sep' => ',',
120
        'mon_decimal_point' => '.'
121
    );
122
}
123
124
if ( $budget_period_locked == 1  && not defined  $show_actual ) {
104
if ( $budget_period_locked == 1  && not defined  $show_actual ) {
125
     $show_actual  = 1;
105
     $show_actual  = 1;
126
}
106
}
Lines 395-401 foreach my $budget (@budgets) { Link Here
395
    %budget_line = (
375
    %budget_line = (
396
        lines                   => \@cells_line,
376
        lines                   => \@cells_line,
397
        budget_name_indent      => $budget->{budget_name_indent},
377
        budget_name_indent      => $budget->{budget_name_indent},
398
        budget_amount_formatted => $num->format_price( $budget->{budget_amount} ),
399
        budget_amount           => $budget->{budget_amount},
378
        budget_amount           => $budget->{budget_amount},
400
        budget_alloc            => $budget->{budget_alloc},
379
        budget_alloc            => $budget->{budget_alloc},
401
        budget_act_remain       => sprintf( "%.2f", $budget_act_remain ),
380
        budget_act_remain       => sprintf( "%.2f", $budget_act_remain ),
Lines 433-439 $template->param( Link Here
433
    show_actual               => $show_actual,
412
    show_actual               => $show_actual,
434
    show_percent              => $show_percent,
413
    show_percent              => $show_percent,
435
    show_mine                 => $show_mine,
414
    show_mine                 => $show_mine,
436
    cur_format                => $cur_format,
437
    CGIextChoice              => $CGIextChoice,
415
    CGIextChoice              => $CGIextChoice,
438
    CGIsepChoice              => $CGIsepChoice,
416
    CGIsepChoice              => $CGIsepChoice,
439
417
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt (-12 / +13 lines)
Lines 1-3 Link Here
1
[% USE Price %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Acquisitions</title>
3
<title>Koha &rsaquo; Acquisitions</title>
3
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
4
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
Lines 123-132 $(document).ready(function() { Link Here
123
            <th class="b_inactive">&nbsp;</th>
124
            <th class="b_inactive">&nbsp;</th>
124
            <th>&nbsp;</th>
125
            <th>&nbsp;</th>
125
            <th>&nbsp;</th>
126
            <th>&nbsp;</th>
126
            <th class="data"><span class="bu_active">[% total %]</span><span class="bu_inactive" >[% total_active %]</span></th>
127
            <th class="data"><span class="bu_active">[% total %]</span><span class="bu_inactive" >[% total_active | $Price %]</span></th>
127
            <th class="data"><span class="bu_active">[% totordered %]</span><span class="bu_inactive" >[% totordered_active %]</span></th>
128
            <th class="data"><span class="bu_active">[% totordered %]</span><span class="bu_inactive" >[% totordered_active | $Price %]</span></th>
128
            <th class="data"><span class="bu_active">[% totspent %]</span><span class="bu_inactive" >[% totspent_active %]</span></th>
129
            <th class="data"><span class="bu_active">[% totspent %]</span><span class="bu_inactive" >[% totspent_active | $Price %]</span></th>
129
            <th class="data"><span class="bu_active">[% totavail %]</span><span class="bu_inactive" >[% totavail_active %]</span></th>
130
            <th class="data"><span class="bu_active">[% totavail %]</span><span class="bu_inactive" >[% totavail_active | $Price %]</span></th>
130
        </tr>
131
        </tr>
131
        </tfoot>
132
        </tfoot>
132
        <tbody>
133
        <tbody>
Lines 149-158 $(document).ready(function() { Link Here
149
                    [% END %]
150
                    [% END %]
150
                </td>
151
                </td>
151
                <td>[% loop_budge.budget_branchname %]</td>
152
                <td>[% loop_budge.budget_branchname %]</td>
152
                <td class="data"><span title="[% loop_budge.budget_amount %]">[% loop_budge.formatted_budget_amount %]</span></td>
153
                <td class="data"><span title="[% loop_budge.budget_amount %]">[% loop_budge.budget_amount | $Price %]</span></td>
153
                <td class="data"><span title="[% loop_budge.budget_ordered %]"><a href="ordered.pl?fund=[% loop_budge.budget_id %]&amp;fund_code=[% loop_budge.budget_code %]">[% loop_budge.formatted_budget_ordered %]</a></span></td>
154
                <td class="data"><span title="[% loop_budge.budget_ordered %]"><a href="ordered.pl?fund=[% loop_budge.budget_id %]&amp;fund_code=[% loop_budge.budget_code %]">[% loop_budge.budget_ordered | $Price %]</a></span></td>
154
                <td class="data"><span title="[% loop_budge.budget_spent %]"><a href="spent.pl?fund=[% loop_budge.budget_id %]&amp;fund_code=[% loop_budge.budget_code %]">[% loop_budge.formatted_budget_spent %]</span></a></td>
155
                <td class="data"><span title="[% loop_budge.budget_spent %]"><a href="spent.pl?fund=[% loop_budge.budget_id %]&amp;fund_code=[% loop_budge.budget_code %]">[% loop_budge.budget_spent | $Price %]</span></a></td>
155
                <td class="data"><span title="[% loop_budge.budget_avail %]">[% loop_budge.formatted_budget_avail %]</td>
156
                <td class="data"><span title="[% loop_budge.budget_avail %]">[% loop_budge.budget_avail | $Price %]</td>
156
            </tr>
157
            </tr>
157
        [% ELSE %]
158
        [% ELSE %]
158
            <tr class="b_inactive">
159
            <tr class="b_inactive">
Lines 172-181 $(document).ready(function() { Link Here
172
                    [% END %]
173
                    [% END %]
173
                </td>
174
                </td>
174
                <td>[% loop_budge.budget_branchname %]</td>
175
                <td>[% loop_budge.budget_branchname %]</td>
175
                <td class="data"><span title="[% loop_budge.budget_amount %]">[% loop_budge.formatted_budget_amount %]</span></td>
176
                <td class="data"><span title="[% loop_budge.budget_amount %]">[% loop_budge.budget_amount | $Price %]</span></td>
176
                <td class="data"><span title="[% loop_budge.budget_ordered %]"><a href="ordered.pl?fund=[% loop_budge.budget_id %]&amp;fund_code=[% loop_budge.budget_code %]">[% loop_budge.formatted_budget_ordered %]</a></span></td>
177
                <td class="data"><span title="[% loop_budge.budget_ordered %]"><a href="ordered.pl?fund=[% loop_budge.budget_id %]&amp;fund_code=[% loop_budge.budget_code %]">[% loop_budge.budget_ordered | $Price %]</a></span></td>
177
                <td class="data"><span title="[% loop_budge.budget_spent %]"><a href="spent.pl?fund=[% loop_budge.budget_id %]&amp;fund_code=[% loop_budge.budget_code %]">[% loop_budge.formatted_budget_spent %]</span></a></td>
178
                <td class="data"><span title="[% loop_budge.budget_spent %]"><a href="spent.pl?fund=[% loop_budge.budget_id %]&amp;fund_code=[% loop_budge.budget_code %]">[% loop_budge.budget_spent | $Price %]</span></a></td>
178
                <td class="data"><span title="[% loop_budge.budget_avail %]">[% loop_budge.formatted_budget_avail %]</td>
179
                <td class="data"><span title="[% loop_budge.budget_avail %]">[% loop_budge.budget_avail | $Price %]</td>
179
            </tr>
180
            </tr>
180
        [% END %]
181
        [% END %]
181
        [% END %]
182
        [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt (-2 / +3 lines)
Lines 1-5 Link Here
1
[% USE KohaDates %]
1
[% USE KohaDates %]
2
[% USE format %]
2
[% USE format %]
3
[% USE Price %]
3
[% INCLUDE 'doc-head-open.inc' %]
4
[% INCLUDE 'doc-head-open.inc' %]
4
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
5
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
5
[% INCLUDE 'doc-head-close.inc' %]
6
[% INCLUDE 'doc-head-close.inc' %]
Lines 538-544 Link Here
538
                    <span style="color:green;">Locked</span>&nbsp;
539
                    <span style="color:green;">Locked</span>&nbsp;
539
                  [% END %]
540
                  [% END %]
540
                </td>
541
                </td>
541
                <td class="data">[% period_active.budget_period_total %]</td>
542
                <td class="data">[% period_active.budget_period_total | $Price %]</td>
542
                <td>
543
                <td>
543
                  <a href="[% script_name %]?op=add_form&amp;budget_period_id=[% period_active.budget_period_id |html %]">Edit</a>
544
                  <a href="[% script_name %]?op=add_form&amp;budget_period_id=[% period_active.budget_period_id |html %]">Edit</a>
544
                  <a href="[% script_name %]?op=delete_confirm&amp;budget_period_id=[% period_active.budget_period_id %]">Delete</a>
545
                  <a href="[% script_name %]?op=delete_confirm&amp;budget_period_id=[% period_active.budget_period_id %]">Delete</a>
Lines 579-585 Link Here
579
                  <td><span title="[% period_loo.budget_period_startdate %]">[% period_loo.budget_period_startdate | $KohaDates %]</span></td>
580
                  <td><span title="[% period_loo.budget_period_startdate %]">[% period_loo.budget_period_startdate | $KohaDates %]</span></td>
580
                  <td><span title="[% period_loo.budget_period_enddate %]">[% period_loo.budget_period_enddate | $KohaDates %]</span></td>
581
                  <td><span title="[% period_loo.budget_period_enddate %]">[% period_loo.budget_period_enddate | $KohaDates %]</span></td>
581
                  <td> [% IF ( period_loo.budget_period_locked ) %]<span style="color:green;">Locked</span>&nbsp;[% ELSE %][% END %] </td>
582
                  <td> [% IF ( period_loo.budget_period_locked ) %]<span style="color:green;">Locked</span>&nbsp;[% ELSE %][% END %] </td>
582
                  <td class="data">[% period_loo.budget_period_total %]</td>
583
                  <td class="data">[% period_loo.budget_period_total | $Price %]</td>
583
                  <td>
584
                  <td>
584
                      <a href="[% script_name %]?op=add_form&amp;budget_period_id=[% period_loo.budget_period_id |html %]">Edit</a>
585
                      <a href="[% script_name %]?op=add_form&amp;budget_period_id=[% period_loo.budget_period_id |html %]">Edit</a>
585
                      <a href="[% script_name %]?op=delete_confirm&amp;budget_period_id=[% period_loo.budget_period_id %]">Delete</a>
586
                      <a href="[% script_name %]?op=delete_confirm&amp;budget_period_id=[% period_loo.budget_period_id %]">Delete</a>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt (-19 / +20 lines)
Lines 1-3 Link Here
1
[% USE Price %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Administration &rsaquo; Funds[% IF op == 'add_form' %] &rsaquo; [% IF ( budget_id ) %]Modify fund[% IF ( budget_name ) %] '[% budget_name %]'[% END %][% ELSE %]Add fund [% END %][% END %]</title>
3
<title>Koha &rsaquo; Administration &rsaquo; Funds[% IF op == 'add_form' %] &rsaquo; [% IF ( budget_id ) %]Modify fund[% IF ( budget_name ) %] '[% budget_name %]'[% END %][% ELSE %]Add fund [% END %][% END %]</title>
3
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'doc-head-close.inc' %]
Lines 294-307 var MSG_PARENT_BENEATH_BUDGET = "- " + _("New budget-parent is beneath budget") Link Here
294
    <tr>
295
    <tr>
295
    <th></th>
296
    <th></th>
296
    <th></th>
297
    <th></th>
297
    <th colspan="2" style="text-align: left;" nowrap="nowrap">Period allocated [% IF ( budget_period_total ) %][% budget_period_total %][% END %]  </th>
298
    <th colspan="2" style="text-align: left;" nowrap="nowrap">Period allocated [% IF budget_period_total %][% budget_period_total | $Price %][% END %]  </th>
298
    <th nowrap="nowrap" class="data"> [% period_alloc_total %]</th>
299
    <th nowrap="nowrap" class="data"> [% period_alloc_total | $Price %]</th>
299
    <th></th>
300
    <th></th>
300
    <th class="data">[% ordered_total %]</th>
301
    <th class="data">[% ordered_total | $Price %]</th>
301
    <th></th>
302
    <th></th>
302
    <th class="data">[% spent_total %]</th>
303
    <th class="data">[% spent_total | $Price %]</th>
303
    <th></th>
304
    <th></th>
304
    <th class="data">[% available_total %]</th>
305
    <th class="data">[% available_total | $Price %]</th>
305
    <th></th>
306
    <th></th>
306
    </tr>
307
    </tr>
307
    </tfoot>
308
    </tfoot>
Lines 318-354 var MSG_PARENT_BENEATH_BUDGET = "- " + _("New budget-parent is beneath budget") Link Here
318
    <td>[% budget.budget_name %]</td>
319
    <td>[% budget.budget_name %]</td>
319
    <td class="data">
320
    <td class="data">
320
      [% IF budget.budget_parent_id %]
321
      [% IF budget.budget_parent_id %]
321
        <span class="child_fund_amount">[% budget.budget_amount %]</span>
322
        <span class="child_fund_amount">[% budget.budget_amount | $Price %]</span>
322
      [% ELSE %]
323
      [% ELSE %]
323
        [% budget.budget_amount %]
324
        [% budget.budget_amount | $Price %]
324
      [% END %]
325
      [% END %]
325
    </td>
326
    </td>
326
    <td class="data">
327
    <td class="data">
327
      [% IF budget.budget_parent_id %]
328
      [% IF budget.budget_parent_id %]
328
        <span class="child_fund_amount">[% budget.budget_ordered %]</span>
329
        <span class="child_fund_amount">[% budget.budget_ordered | $Price %]</span>
329
      [% ELSE %]
330
      [% ELSE %]
330
        [% budget.budget_ordered %]
331
        [% budget.budget_ordered | $Price %]
331
      [% END %]
332
      [% END %]
332
    </td>
333
    </td>
333
    <td class="data">
334
    <td class="data">
334
      [% IF budget.budget_parent_id %]
335
      [% IF budget.budget_parent_id %]
335
        <span class="child_fund_amount">[% budget.total_ordered %]</span>
336
        <span class="child_fund_amount">[% budget.total_ordered | $Price %]</span>
336
      [% ELSE %]
337
      [% ELSE %]
337
        [% budget.total_ordered %]
338
        [% budget.total_ordered | $Price %]
338
      [% END %]
339
      [% END %]
339
    </td>
340
    </td>
340
    <td class="data">
341
    <td class="data">
341
      [% IF budget.budget_parent_id %]
342
      [% IF budget.budget_parent_id %]
342
        <span class="child_fund_amount">[% budget.budget_spent %]</span>
343
        <span class="child_fund_amount">[% budget.budget_spent | $Price %]</span>
343
      [% ELSE %]
344
      [% ELSE %]
344
        [% budget.budget_spent %]
345
        [% budget.budget_spent | $Price %]
345
      [% END %]
346
      [% END %]
346
    </td>
347
    </td>
347
    <td class="data">
348
    <td class="data">
348
      [% IF budget.budget_parent_id %]
349
      [% IF budget.budget_parent_id %]
349
        <span class="child_fund_amount">[% budget.total_spent %]</span>
350
        <span class="child_fund_amount">[% budget.total_spent | $Price %]</span>
350
      [% ELSE %]
351
      [% ELSE %]
351
        [% budget.total_spent %]
352
        [% budget.total_spent | $Price %]
352
      [% END %]
353
      [% END %]
353
    </td>
354
    </td>
354
355
Lines 371-384 var MSG_PARENT_BENEATH_BUDGET = "- " + _("New budget-parent is beneath budget") Link Here
371
                <span>
372
                <span>
372
            [% END %]
373
            [% END %]
373
        [% END %]
374
        [% END %]
374
            [% text %]
375
            [% value | $Price %]
375
        </span>
376
        </span>
376
    [% END %]
377
    [% END %]
377
    <td class="data">
378
    <td class="data">
378
        [% INCLUDE colorcellvalue value=budget.budget_remaining text=budget.budget_remaining_display parent=budget.budget_parent_id %]
379
        [% INCLUDE colorcellvalue value=budget.budget_remaining parent=budget.budget_parent_id %]
379
    </td>
380
    </td>
380
    <td class="data">
381
    <td class="data">
381
        [% INCLUDE colorcellvalue value=budget.total_remaining text=budget.total_remaining_display parent=budget.budget_parent_id %]
382
        [% INCLUDE colorcellvalue value=budget.total_remaining parent=budget.budget_parent_id %]
382
    </td>
383
    </td>
383
    [% IF ( budget.budget_lock ) %]
384
    [% IF ( budget.budget_lock ) %]
384
        <td> <span></span> </td>
385
        <td> <span></span> </td>
Lines 596-602 var MSG_PARENT_BENEATH_BUDGET = "- " + _("New budget-parent is beneath budget") Link Here
596
<table>
597
<table>
597
    <tr>
598
    <tr>
598
    <th scope="row">Fund amount:</th>
599
    <th scope="row">Fund amount:</th>
599
    <td>[% budget_amount %]</td>
600
    <td>[% budget_amount | $Price %]</td>
600
    </tr>
601
    </tr>
601
</table>
602
</table>
602
603
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt (-3 / +3 lines)
Lines 1-3 Link Here
1
[% USE Price %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Administration &rsaquo; Budgets &rsaquo; Funds &rsaquo; Planning for [% budget_period_description %] by [% authcat %]</title>
3
<title>Koha &rsaquo; Administration &rsaquo; Budgets &rsaquo; Funds &rsaquo; Planning for [% budget_period_description %] by [% authcat %]</title>
3
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'doc-head-close.inc' %]
Lines 132-138 Link Here
132
            <td>
133
            <td>
133
        [% END %]
134
        [% END %]
134
        <a href="/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&amp;budget_id=[% budget_line.budget_id %]&amp;budget_period_id=[% budget_line.budget_period_id %]">[% budget_line.budget_name_indent %]</a></td>
135
        <a href="/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&amp;budget_id=[% budget_line.budget_id %]&amp;budget_period_id=[% budget_line.budget_period_id %]">[% budget_line.budget_name_indent %]</a></td>
135
        <td><span id="budget_tot_formatted_[% budget_line.budget_id %]">[% budget_line.budget_amount_formatted %]&nbsp;</span>
136
        <td><span id="[% budget_line.budget_amount %]">[% budget_line.budget_amount | $Price %]&nbsp;</span>
136
137
137
138
138
        <!-- NEXT DIV ELEMENT IS USED BY JS FOR CALC-ING AUTO-FILL AND ESTIMATED AMOUNTS -->
139
        <!-- NEXT DIV ELEMENT IS USED BY JS FOR CALC-ING AUTO-FILL AND ESTIMATED AMOUNTS -->
Lines 185-191 Link Here
185
        [% ELSE %]
186
        [% ELSE %]
186
            <td id="budget_est_[% budget_line.budget_id %]">
187
            <td id="budget_est_[% budget_line.budget_id %]">
187
        [% END %] 
188
        [% END %] 
188
                [% budget_line.budget_est_remain %]&nbsp;
189
                [% budget_line.budget_est_remain | $Price %]&nbsp;
189
            </td>
190
            </td>
190
            </tr>
191
            </tr>
191
        </table>
192
        </table>
192
- 

Return to bug 12844