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

(-)a/C4/Budgets.pm (+24 lines)
Lines 54-59 BEGIN { Link Here
54
54
55
        &ModBudgetPlan
55
        &ModBudgetPlan
56
56
57
        &PlaceCurrencySymbol
58
57
        &GetCurrency
59
        &GetCurrency
58
        &GetCurrencies
60
        &GetCurrencies
59
        &ModCurrencies
61
        &ModCurrencies
Lines 651-656 sub GetBudgets { Link Here
651
    my ($filters,$orderby) = @_;
653
    my ($filters,$orderby) = @_;
652
    return SearchInTable("aqbudgets",$filters, $orderby, undef,undef, undef, "wide");
654
    return SearchInTable("aqbudgets",$filters, $orderby, undef,undef, undef, "wide");
653
}
655
}
656
# -------------------------------------------------------------------
657
658
=head2 PlaceCurrencySymbol
659
660
  &PlaceCurrencySymbol($amount);
661
662
Places the active currency symbol on the amount.
663
664
=cut
665
666
sub PlaceCurrencySymbol {
667
	my $amount = shift;
668
	my $curr_symbol = GetCurrency()->{symbol};
669
	if ($curr_symbol && $amount) {
670
		if ($amount =~ /^\-/) {
671
			$amount =~ s/^\-/\-$curr_symbol/;
672
		} else {
673
			$amount = $curr_symbol.$amount;
674
		}
675
	}
676
	return $amount;
677
}
654
678
655
# -------------------------------------------------------------------
679
# -------------------------------------------------------------------
656
680
(-)a/acqui/acqui-home.pl (-9 / +13 lines)
Lines 136-156 foreach my $budget ( @{$budget_arr} ) { Link Here
136
    for my $field (qw( budget_amount budget_spent budget_ordered budget_avail ) ) {
136
    for my $field (qw( budget_amount budget_spent budget_ordered budget_avail ) ) {
137
        $budget->{$field} = $num_formatter->format_price( $budget->{$field} );
137
        $budget->{$field} = $num_formatter->format_price( $budget->{$field} );
138
    }
138
    }
139
    $budget->{'budget_amount'}  = PlaceCurrencySymbol($budget->{'budget_amount'});
140
    $budget->{'budget_spent'}   = PlaceCurrencySymbol($budget->{'budget_spent'});
141
    $budget->{'budget_ordered'} = PlaceCurrencySymbol($budget->{'budget_ordered'});
142
    $budget->{'budget_avail'}   = PlaceCurrencySymbol($budget->{'budget_avail'});
139
}
143
}
140
144
141
$template->param(
145
$template->param(
142
    type          => 'intranet',
146
    type          => 'intranet',
143
    loop_budget   => $budget_arr,
147
    loop_budget   => $budget_arr,
144
    branchname    => $branchname,
148
    branchname    => $branchname,
145
    total         => $num_formatter->format_price($total),
149
    total         => PlaceCurrencySymbol($num_formatter->format_price($total)),
146
    totspent      => $num_formatter->format_price($totspent),
150
    totspent      => PlaceCurrencySymbol($num_formatter->format_price($totspent)),
147
    totordered    => $num_formatter->format_price($totordered),
151
    totordered    => PlaceCurrencySymbol($num_formatter->format_price($totordered)),
148
    totcomtd      => $num_formatter->format_price($totcomtd),
152
    totcomtd      => PlaceCurrencySymbol($num_formatter->format_price($totcomtd)),
149
    totavail      => $num_formatter->format_price($totavail),
153
    totavail      => PlaceCurrencySymbol($num_formatter->format_price($totavail)),
150
    total_active  => $num_formatter->format_price($total_active),
154
    total_active  => PlaceCurrencySymbol($num_formatter->format_price($total_active)),
151
    totspent_active     => $num_formatter->format_price($totspent_active),
155
    totspent_active     => PlaceCurrencySymbol($num_formatter->format_price($totspent_active)),
152
    totordered_active   => $num_formatter->format_price($totordered_active),
156
    totordered_active   => PlaceCurrencySymbol($num_formatter->format_price($totordered_active)),
153
    totavail_active     => $num_formatter->format_price($totavail_active),
157
    totavail_active     => PlaceCurrencySymbol($num_formatter->format_price($totavail_active)),
154
    suggestions_count   => $suggestions_count,
158
    suggestions_count   => $suggestions_count,
155
);
159
);
156
160
(-)a/acqui/basket.pl (-9 / +9 lines)
Lines 288-296 if ( $op eq 'delete_confirm' ) { Link Here
288
        $line{order_received}       = ( $qty == $order->{'quantityreceived'} );
288
        $line{order_received}       = ( $qty == $order->{'quantityreceived'} );
289
        $line{basketno}             = $basketno;
289
        $line{basketno}             = $basketno;
290
        $line{budget_name}          = $budget->{budget_name};
290
        $line{budget_name}          = $budget->{budget_name};
291
        $line{rrp}                  = sprintf( "%.2f", $line{'rrp'} );
291
        $line{rrp}                  = PlaceCurrencySymbol(sprintf( "%.2f", $line{'rrp'} ));
292
        $line{ecost}                = sprintf( "%.2f", $line{'ecost'} );
292
        $line{ecost}                = PlaceCurrencySymbol(sprintf( "%.2f", $line{'ecost'} ));
293
        $line{line_total}           = sprintf( "%.2f", $line_total );
293
        $line{line_total}           = PlaceCurrencySymbol(sprintf( "%.2f", $line_total ));
294
        if ($line{uncertainprice}) {
294
        if ($line{uncertainprice}) {
295
            $template->param( uncertainprices => 1 );
295
            $template->param( uncertainprices => 1 );
296
            $line{rrp} .= ' (Uncertain)';
296
            $line{rrp} .= ' (Uncertain)';
Lines 366-377 my $total_est_gste; Link Here
366
        books_loop           => \@books_loop,
366
        books_loop           => \@books_loop,
367
        cancelledorders_loop => \@cancelledorders,
367
        cancelledorders_loop => \@cancelledorders,
368
        gist_rate            => sprintf( "%.2f", $gist * 100 ) . '%',
368
        gist_rate            => sprintf( "%.2f", $gist * 100 ) . '%',
369
        total_rrp_gste       => sprintf( "%.2f", $total_rrp_gste ),
369
        total_rrp_gste       => PlaceCurrencySymbol(sprintf( "%.2f", $total_rrp_gste )),
370
        total_est_gste       => sprintf( "%.2f", $total_est_gste ),
370
        total_est_gste       => PlaceCurrencySymbol(sprintf( "%.2f", $total_est_gste )),
371
        gist_est             => sprintf( "%.2f", $gist_est ),
371
        gist_est             => PlaceCurrencySymbol(sprintf( "%.2f", $gist_est )),
372
        gist_rrp             => sprintf( "%.2f", $gist_rrp ),        
372
        gist_rrp             => PlaceCurrencySymbol(sprintf( "%.2f", $gist_rrp )),        
373
        total_rrp_gsti       => sprintf( "%.2f", $total_rrp_gsti ),
373
        total_rrp_gsti       => PlaceCurrencySymbol(sprintf( "%.2f", $total_rrp_gsti )),
374
        total_est_gsti       => sprintf( "%.2f", $total_est_gsti ),
374
        total_est_gsti       => PlaceCurrencySymbol(sprintf( "%.2f", $total_est_gsti )),
375
#        currency             => $bookseller->{'listprice'},
375
#        currency             => $bookseller->{'listprice'},
376
	currency		=> $cur->{'currency'},
376
	currency		=> $cur->{'currency'},
377
        qty_total            => $qty_total,
377
        qty_total            => $qty_total,
(-)a/acqui/histsearch.pl (-1 / +5 lines)
Lines 57-62 use C4::Output; Link Here
57
use C4::Acquisition;
57
use C4::Acquisition;
58
use C4::Dates;
58
use C4::Dates;
59
use C4::Debug;
59
use C4::Debug;
60
use C4::Budgets qw(PlaceCurrencySymbol);
60
61
61
my $input = new CGI;
62
my $input = new CGI;
62
my $title                   = $input->param( 'title');
63
my $title                   = $input->param( 'title');
Lines 105-110 if ($do_search) { Link Here
105
        basket => $basket,
106
        basket => $basket,
106
        booksellerinvoicenumber => $booksellerinvoicenumber,
107
        booksellerinvoicenumber => $booksellerinvoicenumber,
107
    );
108
    );
109
	foreach my $order (@$order_loop) {
110
		$order->{ecost} = PlaceCurrencySymbol($order->{ecost});
111
	}
108
}
112
}
109
113
110
my $from_date = $from_placed_on ? $from_placed_on->output('syspref') : undef;
114
my $from_date = $from_placed_on ? $from_placed_on->output('syspref') : undef;
Lines 114-120 $template->param( Link Here
114
    suggestions_loop        => $order_loop,
118
    suggestions_loop        => $order_loop,
115
    total_qty               => $total_qty,
119
    total_qty               => $total_qty,
116
    total_qtyreceived       => $total_qtyreceived,
120
    total_qtyreceived       => $total_qtyreceived,
117
    total_price             => sprintf( "%.2f", $total_price ),
121
    total_price             => PlaceCurrencySymbol(sprintf( "%.2f", $total_price )),
118
    numresults              => $order_loop ? scalar(@$order_loop) : undef,
122
    numresults              => $order_loop ? scalar(@$order_loop) : undef,
119
    title                   => $title,
123
    title                   => $title,
120
    author                  => $author,
124
    author                  => $author,
(-)a/acqui/parcel.pl (-8 / +9 lines)
Lines 208-220 for (my $i = 0 ; $i < $countpendings ; $i++) { Link Here
208
    $totalPqtyrcvd +=$line{quantityreceived};
208
    $totalPqtyrcvd +=$line{quantityreceived};
209
    $totalPecost += $line{ecost};
209
    $totalPecost += $line{ecost};
210
    $line{ecost} = sprintf("%.2f",$line{ecost});
210
    $line{ecost} = sprintf("%.2f",$line{ecost});
211
    $line{ordertotal} = sprintf("%.2f",$line{ecost}*$line{quantity});
211
    $line{ordertotal} = PlaceCurrencySymbol(sprintf("%.2f",$line{ecost}*$line{quantity}));
212
    $line{unitprice} = sprintf("%.2f",$line{unitprice});
212
    $line{unitprice} = PlaceCurrencySymbol(sprintf("%.2f",$line{unitprice}));
213
    $line{invoice} = $invoice;
213
    $line{invoice} = $invoice;
214
    $line{gst} = $gst;
214
    $line{gst} = $gst;
215
    $line{total} = $total;
215
    $line{total} = $total;
216
    $line{supplierid} = $supplierid;
216
    $line{supplierid} = $supplierid;
217
    $ordergrandtotal += $line{ecost} * $line{quantity};
217
    $ordergrandtotal += $line{ecost} * $line{quantity};
218
    $line{ecost} = PlaceCurrencySymbol($line{ecost});
218
    
219
    
219
    my $biblionumber = $line{'biblionumber'};
220
    my $biblionumber = $line{'biblionumber'};
220
    my $countbiblio = CountBiblioInOrders($biblionumber);
221
    my $countbiblio = CountBiblioInOrders($biblionumber);
Lines 299-315 $template->param( Link Here
299
    loop_received         => \@loop_received,
300
    loop_received         => \@loop_received,
300
    countpending          => $countpendings,
301
    countpending          => $countpendings,
301
    loop_orders           => \@loop_orders,
302
    loop_orders           => \@loop_orders,
302
    totalprice            => sprintf($cfstr, $totalprice),
303
    totalprice            => PlaceCurrencySymbol(sprintf($cfstr, $totalprice)),
303
    totalfreight          => $totalfreight,
304
    totalfreight          => $totalfreight,
304
    totalquantity         => $totalquantity,
305
    totalquantity         => $totalquantity,
305
    tototal               => sprintf($cfstr, $tototal),
306
    tototal               => PlaceCurrencySymbol(sprintf($cfstr, $tototal)),
306
    ordergrandtotal       => sprintf($cfstr, $ordergrandtotal),
307
    ordergrandtotal       => PlaceCurrencySymbol(sprintf($cfstr, $ordergrandtotal)),
307
    gst                   => $gst,
308
    gst                   => $gst,
308
    grandtot              => sprintf($cfstr, $tototal + $gst),
309
    grandtot              => PlaceCurrencySymbol(sprintf($cfstr, $tototal + $gst)),
309
    totalPunitprice       => sprintf("%.2f", $totalPunitprice),
310
    totalPunitprice       => PlaceCurrencySymbol(sprintf("%.2f", $totalPunitprice)),
310
    totalPquantity        => $totalPquantity,
311
    totalPquantity        => $totalPquantity,
311
    totalPqtyrcvd         => $totalPqtyrcvd,
312
    totalPqtyrcvd         => $totalPqtyrcvd,
312
    totalPecost           => sprintf("%.2f", $totalPecost),
313
    totalPecost           => PlaceCurrencySymbol(sprintf("%.2f", $totalPecost)),
313
    resultsperpage        => $resultsperpage,
314
    resultsperpage        => $resultsperpage,
314
);
315
);
315
output_html_with_http_headers $input, $cookie, $template->output;
316
output_html_with_http_headers $input, $cookie, $template->output;
(-)a/admin/aqbudgetperiods.pl (-1 / +1 lines)
Lines 184-190 elsif ( $op eq 'delete_confirmed' ) { Link Here
184
    foreach my $result ( @{$results}[ $first .. $last ] ) {
184
    foreach my $result ( @{$results}[ $first .. $last ] ) {
185
        my $budgetperiod = $result;
185
        my $budgetperiod = $result;
186
		FormatData($budgetperiod);
186
		FormatData($budgetperiod);
187
        $budgetperiod->{'budget_period_total'}     = $num->format_price( $budgetperiod->{'budget_period_total'} );
187
        $budgetperiod->{'budget_period_total'} = PlaceCurrencySymbol( $num->format_price($budgetperiod->{'budget_period_total'}) );
188
        $budgetperiod->{budget_active} = 1;
188
        $budgetperiod->{budget_active} = 1;
189
        push( @period_loop, $budgetperiod );
189
        push( @period_loop, $budgetperiod );
190
    }
190
    }
(-)a/admin/aqbudgets.pl (-2 / +12 lines)
Lines 239-244 if ($op eq 'add_form') { Link Here
239
239
240
	#This Looks WEIRD to me : should budgets be filtered in such a way ppl who donot own it would not see the amount spent on the budget by others ?
240
	#This Looks WEIRD to me : should budgets be filtered in such a way ppl who donot own it would not see the amount spent on the budget by others ?
241
241
242
	my $curr_symbol = C4::Budgets->GetCurrency()->{symbol};
243
242
    foreach my $budget (@budgets) {
244
    foreach my $budget (@budgets) {
243
        #Level and sublevels total spent
245
        #Level and sublevels total spent
244
        $budget->{'total_levels_spent'} = GetChildBudgetsSpent($budget->{"budget_id"});
246
        $budget->{'total_levels_spent'} = GetChildBudgetsSpent($budget->{"budget_id"});
Lines 312-317 if ($op eq 'add_form') { Link Here
312
        }
314
        }
313
        push  @budget_hierarchy, { element_name => $period->{"budget_period_description"} }; 
315
        push  @budget_hierarchy, { element_name => $period->{"budget_period_description"} }; 
314
        @budget_hierarchy = reverse(@budget_hierarchy);
316
        @budget_hierarchy = reverse(@budget_hierarchy);
317
		
318
		foreach my $amount (\$budget->{'budget_amount_total'}, \$budget->{'budget_amount'}, \$budget->{'budget_spent'}, \$budget->{'total_levels_spent'}, \$budget->{'budget_remaining'}) {
319
			$$amount = PlaceCurrencySymbol($$amount);
320
		}
315
321
316
        push( @loop, {  %{$budget},
322
        push( @loop, {  %{$budget},
317
                        branchname  => $branches->{ $budget->{branchcode} }->{branchname},
323
                        branchname  => $branches->{ $budget->{branchcode} }->{branchname},
Lines 325-336 if ($op eq 'add_form') { Link Here
325
        $budget_period_total =
331
        $budget_period_total =
326
          $num->format_price( $period->{budget_period_total} );
332
          $num->format_price( $period->{budget_period_total} );
327
    }
333
    }
334
	foreach my $amount (\$budget_period_total, \$period_alloc_total, \$base_spent_total) {
335
		$$amount = $num->format_price($$amount);
336
		$$amount = PlaceCurrencySymbol($$amount);
337
	}
328
    $template->param(
338
    $template->param(
329
        else                   => 1,
339
        else                   => 1,
330
        budget                 => \@loop,
340
        budget                 => \@loop,
331
        budget_period_total    => $budget_period_total,
341
        budget_period_total    => $budget_period_total,
332
        period_alloc_total     => $num->format_price($period_alloc_total),
342
        period_alloc_total     => $period_alloc_total,
333
        base_spent_total       => $num->format_price($base_spent_total),
343
        base_spent_total       => $base_spent_total,
334
        branchloop             => \@branchloop2,
344
        branchloop             => \@branchloop2,
335
    );
345
    );
336
346
(-)a/admin/aqplan.pl (-3 / +3 lines)
Lines 412-422 foreach my $budget (@budgets) { Link Here
412
    %budget_line = (
412
    %budget_line = (
413
        lines                   => \@cells_line,
413
        lines                   => \@cells_line,
414
        budget_name_indent      => $budget->{budget_name_indent},
414
        budget_name_indent      => $budget->{budget_name_indent},
415
        budget_amount_formatted => $num->format_price( $budget->{budget_amount} ),
415
        budget_amount_formatted => PlaceCurrencySymbol($num->format_price( $budget->{budget_amount} )),
416
        budget_amount           => $budget->{budget_amount},
416
        budget_amount           => $budget->{budget_amount},
417
        budget_alloc            => $budget->{budget_alloc},
417
        budget_alloc            => $budget->{budget_alloc},
418
        budget_act_remain       => sprintf( "%.2f", $budget_act_remain ),
418
        budget_act_remain       => PlaceCurrencySymbol(sprintf( "%.2f", $budget_act_remain )),
419
        budget_est_remain       => sprintf( "%.2f", $budget_est_remain ),
419
        budget_est_remain       => PlaceCurrencySymbol(sprintf( "%.2f", $budget_est_remain )),
420
        budget_id               => $budget->{budget_id},
420
        budget_id               => $budget->{budget_id},
421
        budget_lock             => $budget_lock,
421
        budget_lock             => $budget_lock,
422
    );
422
    );
(-)a/admin/itemtypes.pl (-1 / +2 lines)
Lines 51-56 use C4::Koha; Link Here
51
use C4::Context;
51
use C4::Context;
52
use C4::Auth;
52
use C4::Auth;
53
use C4::Output;
53
use C4::Output;
54
use C4::Budgets qw(PlaceCurrencySymbol);
54
55
55
sub StringSearch {
56
sub StringSearch {
56
    my ( $searchstring, $type ) = @_;
57
    my ( $searchstring, $type ) = @_;
Lines 234-240 else { # DEFAULT Link Here
234
    my @loop;
235
    my @loop;
235
    foreach my $itemtype ( @{$results} ) {
236
    foreach my $itemtype ( @{$results} ) {
236
        $itemtype->{imageurl} = getitemtypeimagelocation( 'intranet', $itemtype->{imageurl} );
237
        $itemtype->{imageurl} = getitemtypeimagelocation( 'intranet', $itemtype->{imageurl} );
237
        $itemtype->{rentalcharge} = sprintf( '%.2f', $itemtype->{rentalcharge} );
238
        $itemtype->{rentalcharge} = PlaceCurrencySymbol(sprintf( '%.2f', $itemtype->{rentalcharge} ));
238
        push( @loop, $itemtype );
239
        push( @loop, $itemtype );
239
    }
240
    }
240
241
(-)a/catalogue/moredetail.pl (-1 / +3 lines)
Lines 35-40 use C4::Circulation; # to use itemissues Link Here
35
use C4::Members; # to use GetMember
35
use C4::Members; # to use GetMember
36
use C4::Search;		# enabled_staff_search_views
36
use C4::Search;		# enabled_staff_search_views
37
use C4::Members qw/GetHideLostItemsPreference/;
37
use C4::Members qw/GetHideLostItemsPreference/;
38
use C4::Budgets qw(PlaceCurrencySymbol);
38
39
39
my $query=new CGI;
40
my $query=new CGI;
40
41
Lines 130-136 foreach my $item (@items){ Link Here
130
    $item->{itemdamagedloop}= GetAuthorisedValues(GetAuthValCode('items.damaged',$fw),$item->{damaged}) if GetAuthValCode('items.damaged',$fw);
131
    $item->{itemdamagedloop}= GetAuthorisedValues(GetAuthValCode('items.damaged',$fw),$item->{damaged}) if GetAuthValCode('items.damaged',$fw);
131
    $item->{'collection'}              = $ccodes->{ $item->{ccode} } if ($ccodes);
132
    $item->{'collection'}              = $ccodes->{ $item->{ccode} } if ($ccodes);
132
    $item->{'itype'}                   = $itemtypes->{ $item->{'itype'} }->{'description'};
133
    $item->{'itype'}                   = $itemtypes->{ $item->{'itype'} }->{'description'};
133
    $item->{'replacementprice'}        = sprintf( "%.2f", $item->{'replacementprice'} );
134
    $item->{'replacementprice'}        = PlaceCurrencySymbol(sprintf( "%.2f", $item->{'replacementprice'} ));
134
    $item->{$_}                        = format_date( $item->{$_} ) foreach qw/datelastborrowed dateaccessioned datelastseen lastreneweddate/;
135
    $item->{$_}                        = format_date( $item->{$_} ) foreach qw/datelastborrowed dateaccessioned datelastseen lastreneweddate/;
135
    $item->{'copyvol'}                 = $item->{'copynumber'};
136
    $item->{'copyvol'}                 = $item->{'copynumber'};
136
137
Lines 184-189 $template->param( Link Here
184
    itemnumber          => $itemnumber,
185
    itemnumber          => $itemnumber,
185
    z3950_search_params => C4::Search::z3950_search_args(GetBiblioData($biblionumber)),
186
    z3950_search_params => C4::Search::z3950_search_args(GetBiblioData($biblionumber)),
186
    subtitle            => $subtitle,
187
    subtitle            => $subtitle,
188
	rentalcharge		=> PlaceCurrencySymbol(sprintf( "%.2f", %$template->{'VARS'}{rentalcharge})),
187
);
189
);
188
$template->param(ONLY_ONE => 1) if ( $itemnumber && $showncount != @items );
190
$template->param(ONLY_ONE => 1) if ( $itemnumber && $showncount != @items );
189
191
(-)a/cataloguing/additem.pl (-1 / +10 lines)
Lines 31-36 use C4::Koha; # XXX subfield_is_koha_internal_p Link Here
31
use C4::Branch; # XXX subfield_is_koha_internal_p
31
use C4::Branch; # XXX subfield_is_koha_internal_p
32
use C4::ClassSource;
32
use C4::ClassSource;
33
use C4::Dates;
33
use C4::Dates;
34
use C4::Budgets;
34
use List::MoreUtils qw/any/;
35
use List::MoreUtils qw/any/;
35
36
36
use MARC::File::XML;
37
use MARC::File::XML;
Lines 640-646 my @header_value_loop; Link Here
640
for my $row ( @big_array ) {
641
for my $row ( @big_array ) {
641
    my %row_data;
642
    my %row_data;
642
    my @item_fields = map +{ field => $_ || '' }, @$row{ sort keys(%witness) };
643
    my @item_fields = map +{ field => $_ || '' }, @$row{ sort keys(%witness) };
643
    $row_data{item_value} = [ @item_fields ];
644
	
645
	foreach my $item (@item_fields) {
646
		$$item{field} = PlaceCurrencySymbol($$item{field}) if ($$item{field} =~ /^\d+\.\d\d$/);
647
	} # Check for a 'price-like' field and add currency symbol 
648
	# OR
649
	# Add currency directly to the field currently used for cost
650
	# $item_fields[12]->{field} = PlaceCurrencySymbol($item_fields[12]->{field});
651
	
652
	$row_data{item_value} = [ @item_fields ];
644
    $row_data{itemnumber} = $row->{itemnumber};
653
    $row_data{itemnumber} = $row->{itemnumber};
645
    #reporting this_row values
654
    #reporting this_row values
646
    $row_data{'nomod'} = $row->{'nomod'};
655
    $row_data{'nomod'} = $row->{'nomod'};
(-)a/circ/billing.pl (-1 / +6 lines)
Lines 26-31 use C4::Auth; Link Here
26
use C4::Dates qw/format_date format_date_in_iso/;
26
use C4::Dates qw/format_date format_date_in_iso/;
27
use C4::Debug;
27
use C4::Debug;
28
use Date::Calc qw/Today Add_Delta_YM/;
28
use Date::Calc qw/Today Add_Delta_YM/;
29
use C4::Budgets qw(PlaceCurrencySymbol);
29
30
30
my $input = new CGI;
31
my $input = new CGI;
31
my $order     = $input->param('order') || '';
32
my $order     = $input->param('order') || '';
Lines 137-142 $sth->execute(@query_params); Link Here
137
138
138
my @billingdata;
139
my @billingdata;
139
while ( my $data = $sth->fetchrow_hashref ) {   
140
while ( my $data = $sth->fetchrow_hashref ) {   
141
	my @amounts = split(/\<br\/\>/, $data->{l_amountoutstanding});
142
	$_ = PlaceCurrencySymbol($_) foreach @amounts;
143
	$data->{l_amountoutstanding} = join('<br/>',@amounts);
144
	
140
    push @billingdata, {
145
    push @billingdata, {
141
        l_accountype        => $data->{l_accounttype},
146
        l_accountype        => $data->{l_accounttype},
142
        l_description       => $data->{l_description},
147
        l_description       => $data->{l_description},
Lines 147-153 while ( my $data = $sth->fetchrow_hashref ) { Link Here
147
        l_title             => $data->{l_title},
152
        l_title             => $data->{l_title},
148
        cnt                 => $data->{cnt},
153
        cnt                 => $data->{cnt},
149
        maxdate             => $data->{maxdate},
154
        maxdate             => $data->{maxdate},
150
        sum_amount          => $data->{sum_amount},
155
        sum_amount          => PlaceCurrencySymbol($data->{sum_amount}),
151
        borrowernumber      => $data->{borrowernumber},
156
        borrowernumber      => $data->{borrowernumber},
152
        surname             => $data->{surname},
157
        surname             => $data->{surname},
153
        firstname           => $data->{firstname},
158
        firstname           => $data->{firstname},
(-)a/circ/circulation.pl (-2 / +5 lines)
Lines 37-42 use C4::Reserves; Link Here
37
use C4::Context;
37
use C4::Context;
38
use CGI::Session;
38
use CGI::Session;
39
use C4::Members::Attributes qw(GetBorrowerAttributes);
39
use C4::Members::Attributes qw(GetBorrowerAttributes);
40
use C4::Budgets qw(PlaceCurrencySymbol);
40
41
41
use Date::Calc qw(
42
use Date::Calc qw(
42
  Today
43
  Today
Lines 457-462 sub build_issue_data { Link Here
457
        $it->{'od'} = ( $it->{'date_due'} lt $todaysdate ) ? 1 : 0 ;
458
        $it->{'od'} = ( $it->{'date_due'} lt $todaysdate ) ? 1 : 0 ;
458
        ($it->{'author'} eq '') and $it->{'author'} = ' ';
459
        ($it->{'author'} eq '') and $it->{'author'} = ' ';
459
        $it->{'renew_failed'} = $renew_failed{$it->{'itemnumber'}};
460
        $it->{'renew_failed'} = $renew_failed{$it->{'itemnumber'}};
461
		$it->{'replacementprice'} = PlaceCurrencySymbol($it->{'replacementprice'});
462
		$it->{'charge'} = PlaceCurrencySymbol($it->{'charge'});
460
463
461
        if ( $todaysdate eq $it->{'issuedate'} or $todaysdate eq $it->{'lastreneweddate'} ) {
464
        if ( $todaysdate eq $it->{'issuedate'} or $todaysdate eq $it->{'lastreneweddate'} ) {
462
            (!$relatives) ? push @todaysissues, $it : push @relissues, $it;
465
            (!$relatives) ? push @todaysissues, $it : push @relissues, $it;
Lines 690-697 $template->param( Link Here
690
    duedatespec       => $duedatespec,
693
    duedatespec       => $duedatespec,
691
    message           => $message,
694
    message           => $message,
692
    CGIselectborrower => $CGIselectborrower,
695
    CGIselectborrower => $CGIselectborrower,
693
    totalprice        => sprintf('%.2f', $totalprice),
696
    totalprice        => PlaceCurrencySymbol(sprintf('%.2f', $totalprice)),
694
    totaldue          => sprintf('%.2f', $total),
697
    totaldue          => PlaceCurrencySymbol(sprintf('%.2f', $total)),
695
    todayissues       => \@todaysissues,
698
    todayissues       => \@todaysissues,
696
    previssues        => \@previousissues,
699
    previssues        => \@previousissues,
697
    relissues			=> \@relissues,
700
    relissues			=> \@relissues,
(-)a/circ/overdue.pl (-1 / +2 lines)
Lines 30-35 use C4::Debug; Link Here
30
use C4::Dates qw/format_date format_date_in_iso/;
30
use C4::Dates qw/format_date format_date_in_iso/;
31
use Date::Calc qw/Today/;
31
use Date::Calc qw/Today/;
32
use Text::CSV_XS;
32
use Text::CSV_XS;
33
use C4::Budgets qw(PlaceCurrencySymbol);
33
34
34
my $input = new CGI;
35
my $input = new CGI;
35
my $order           = $input->param('order') || '';
36
my $order           = $input->param('order') || '';
Lines 341-347 if ($noreport) { Link Here
341
            author                 => $data->{author},
342
            author                 => $data->{author},
342
            branchcode             => $data->{branchcode},
343
            branchcode             => $data->{branchcode},
343
            itemcallnumber         => $data->{itemcallnumber},
344
            itemcallnumber         => $data->{itemcallnumber},
344
            replacementprice       => $data->{replacementprice},
345
            replacementprice       => PlaceCurrencySymbol($data->{replacementprice}),
345
            patron_attr_value_loop => \@patron_attr_value_loop,
346
            patron_attr_value_loop => \@patron_attr_value_loop,
346
        };
347
        };
347
    }
348
    }
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt (-1 / +1 lines)
Lines 67-73 Link Here
67
							<td>[% resultsloo.branchcode %]</td>
67
							<td>[% resultsloo.branchcode %]</td>
68
							<td>[% resultsloo.dateexpiry %]</td>
68
							<td>[% resultsloo.dateexpiry %]</td>
69
							<td>[% IF ( resultsloo.overdues ) %]<span class="overdue"><strong>[% resultsloo.overdues %]</strong></span>[% ELSE %][% resultsloo.overdues %][% END %]/[% resultsloo.issues %]</td>
69
							<td>[% IF ( resultsloo.overdues ) %]<span class="overdue"><strong>[% resultsloo.overdues %]</strong></span>[% ELSE %][% resultsloo.overdues %][% END %]/[% resultsloo.issues %]</td>
70
							<td>[% IF ( resultsloo.fines < 0 ) %]<span class="credit">[% resultsloo.fines %]</span> [% ELSIF resultsloo.fines > 0 %] <span class="debit"><strong>[% resultsloo.fines %]</strong></span> [% ELSE %] [% resultsloo.fines %] [% END %]</td>
70
							<td>[% resultsfines = resultsloo.fines.match('(\d*\.\d\d)$') %][% IF ( resultsfines.0 < 0 ) %]<span class="credit">[% resultsloo.fines %]</span> [% ELSIF resultsfines.0 > 0 %] <span class="debit"><strong>[% resultsloo.fines %]</strong></span> [% ELSE %] [% resultsloo.fines %] [% END %]</td>
71
							<td>[% resultsloo.borrowernotes %]</td>
71
							<td>[% resultsloo.borrowernotes %]</td>
72
							<td>[% IF ( resultsloo.category_type ) %]
72
							<td>[% IF ( resultsloo.category_type ) %]
73
									<a href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=circ&amp;borrowernumber=[% resultsloo.borrowernumber %]&amp;category_type=[% resultsloo.category_type %]">Edit</a>
73
									<a href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=circ&amp;borrowernumber=[% resultsloo.borrowernumber %]&amp;category_type=[% resultsloo.category_type %]">Edit</a>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt (-6 / +6 lines)
Lines 45-51 Link Here
45
    [% FOREACH line IN account_grp.accountlines %]
45
    [% FOREACH line IN account_grp.accountlines %]
46
<tr>
46
<tr>
47
    <td>
47
    <td>
48
    [% IF ( line.amountoutstanding > 0 ) %]
48
    [% IF ( line.amountoutstanding.remove('^[^0-9\.]*') > 0 ) %]
49
        <input type="submit" name="pay_indiv_[% line.accountno %]" value="Pay" />
49
        <input type="submit" name="pay_indiv_[% line.accountno %]" value="Pay" />
50
        <input type="submit" name="wo_indiv_[% line.accountno %]" value="Writeoff" />
50
        <input type="submit" name="wo_indiv_[% line.accountno %]" value="Writeoff" />
51
    [% END %]
51
    [% END %]
Lines 61-67 Link Here
61
    <input type="hidden" name="totals[% line.accountno %]" value="[% line.totals %]" />
61
    <input type="hidden" name="totals[% line.accountno %]" value="[% line.totals %]" />
62
    </td>
62
    </td>
63
    <td>
63
    <td>
64
    [% IF ( line.amountoutstanding > 0 ) %]
64
    [% IF ( line.amountoutstanding.remove('^[^0-9\.]*') > 0 ) %]
65
        <input type="checkbox" checked="checked" name="incl_par_[% line.accountno %]" />
65
        <input type="checkbox" checked="checked" name="incl_par_[% line.accountno %]" />
66
    [% END %]
66
    [% END %]
67
    </td>
67
    </td>
Lines 69-89 Link Here
69
    <td>[% line.accounttype %]</td>
69
    <td>[% line.accounttype %]</td>
70
    <td>[% line.notify_id %]</td>
70
    <td>[% line.notify_id %]</td>
71
    <td>[% line.notify_level %]</td>
71
    <td>[% line.notify_level %]</td>
72
    <td class="debit">[% line.amount | format('%.2f') %]</td>
72
    <td class="debit">[% line.amount %]</td>
73
    <td class="debit">[% line.amountoutstanding | format('%.2f') %]</td>
73
    <td class="debit">[% line.amountoutstanding %]</td>
74
</tr>
74
</tr>
75
[% END %]
75
[% END %]
76
[% IF ( account_grp.total ) %]
76
[% IF ( account_grp.total ) %]
77
<tr>
77
<tr>
78
78
79
    <td class="total" colspan="7">Sub Total:</td>
79
    <td class="total" colspan="7">Sub Total:</td>
80
    <td>[% account_grp.total | format('%.2f') %]</td>
80
    <td>[% account_grp.total %]</td>
81
</tr>
81
</tr>
82
[% END %]
82
[% END %]
83
[% END %]
83
[% END %]
84
<tr>
84
<tr>
85
    <td class="total" colspan="7">Total Due:</td>
85
    <td class="total" colspan="7">Total Due:</td>
86
    <td>[% total | format('%.2f') %]</td>
86
    <td>[% total %]</td>
87
</tr>
87
</tr>
88
</table>
88
</table>
89
<fieldset class="action">
89
<fieldset class="action">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt (-6 / +6 lines)
Lines 118-129 function moneyFormat(textObj) { Link Here
118
        <td>[% accounttype %]</td>
118
        <td>[% accounttype %]</td>
119
        <td>[% notify_id %]</td>
119
        <td>[% notify_id %]</td>
120
        <td>[% notify_level %]</td>
120
        <td>[% notify_level %]</td>
121
        <td class="debit">[% amount | format('%.2f') %]</td>
121
        <td class="debit">[% amount %]</td>
122
        <td class="debit">[% amountoutstanding | format('%.2f') %]</td>
122
        <td class="debit">[% amountoutstanding %]</td>
123
    </tr>
123
    </tr>
124
    <tr>
124
    <tr>
125
        <td>Total Amount Payable : </td>
125
        <td>Total Amount Payable : </td>
126
        <td>[% amountoutstanding | format('%.2f') %]</td>
126
        <td>[% amountoutstanding %]</td>
127
        <td colspan="4"></td>
127
        <td colspan="4"></td>
128
    </tr>
128
    </tr>
129
    <tr><td colspan="6"> </td></tr>
129
    <tr><td colspan="6"> </td></tr>
Lines 170-177 function moneyFormat(textObj) { Link Here
170
        <td>[% accounttype %]</td>
170
        <td>[% accounttype %]</td>
171
        <td>[% notify_id %]</td>
171
        <td>[% notify_id %]</td>
172
        <td>[% notify_level %]</td>
172
        <td>[% notify_level %]</td>
173
        <td class="debit">[% amount | format('%.2f') %]</td>
173
        <td class="debit">[% amount %]</td>
174
        <td class="debit">[% amountoutstanding | format('%.2f') %]</td>
174
        <td class="debit">[% amountoutstanding %]</td>
175
    </tr>
175
    </tr>
176
    <tr><td colspan="6"> </td></tr>
176
    <tr><td colspan="6"> </td></tr>
177
    <tr><td colspan="6"><strong>Writeoff This Charge?</strong></td></tr>
177
    <tr><td colspan="6"><strong>Writeoff This Charge?</strong></td></tr>
Lines 195-201 function moneyFormat(textObj) { Link Here
195
    <table>
195
    <table>
196
    <tr>
196
    <tr>
197
        <td>Total Amount Outstanding : </td>
197
        <td>Total Amount Outstanding : </td>
198
        <td class="debit">[% total | format('%.2f') %]</td>
198
        <td class="debit">[% total %]</td>
199
    </tr>
199
    </tr>
200
    <tr><td colspan="2"> </td></tr>
200
    <tr><td colspan="2"> </td></tr>
201
    <tr>
201
    <tr>
(-)a/members/boraccount.pl (-3 / +6 lines)
Lines 33-38 use C4::Members; Link Here
33
use C4::Branch;
33
use C4::Branch;
34
use C4::Accounts;
34
use C4::Accounts;
35
use C4::Members::Attributes qw(GetBorrowerAttributes);
35
use C4::Members::Attributes qw(GetBorrowerAttributes);
36
use C4::Budgets qw(PlaceCurrencySymbol);
36
37
37
my $input=new CGI;
38
my $input=new CGI;
38
39
Lines 82-89 foreach my $accountline ( @{$accts}) { Link Here
82
    }
83
    }
83
84
84
    $accountline->{date} = format_date($accountline->{date});
85
    $accountline->{date} = format_date($accountline->{date});
85
    $accountline->{amount} = sprintf '%.2f', $accountline->{amount};
86
86
    $accountline->{amountoutstanding} = sprintf '%.2f', $accountline->{amountoutstanding};
87
	$accountline->{amount} = PlaceCurrencySymbol(sprintf('%.2f', $accountline->{amount}));
88
	$accountline->{amountoutstanding} = PlaceCurrencySymbol(sprintf('%.2f', $accountline->{amountoutstanding}));
89
87
    if ($accountline->{accounttype} eq 'Pay') {
90
    if ($accountline->{accounttype} eq 'Pay') {
88
        $accountline->{payment} = 1;
91
        $accountline->{payment} = 1;
89
        $reverse_col = 1;
92
        $reverse_col = 1;
Lines 123-129 $template->param( Link Here
123
    email               => $data->{'email'},
126
    email               => $data->{'email'},
124
    branchcode          => $data->{'branchcode'},
127
    branchcode          => $data->{'branchcode'},
125
	branchname			=> GetBranchName($data->{'branchcode'}),
128
	branchname			=> GetBranchName($data->{'branchcode'}),
126
    total               => sprintf("%.2f",$total),
129
    total               => PlaceCurrencySymbol(sprintf("%.2f",$total)),
127
    totalcredit         => $totalcredit,
130
    totalcredit         => $totalcredit,
128
    is_child            => ($data->{'category_type'} eq 'C'),
131
    is_child            => ($data->{'category_type'} eq 'C'),
129
    reverse_col         => $reverse_col,
132
    reverse_col         => $reverse_col,
(-)a/members/member.pl (-2 / +2 lines)
Lines 32-37 use C4::Members; Link Here
32
use C4::Branch;
32
use C4::Branch;
33
use C4::Category;
33
use C4::Category;
34
use File::Basename;
34
use File::Basename;
35
use C4::Budgets qw(PlaceCurrencySymbol);
35
36
36
my $input = new CGI;
37
my $input = new CGI;
37
my $quicksearch = $input->param('quicksearch');
38
my $quicksearch = $input->param('quicksearch');
Lines 128-134 foreach my $borrower(@$results[$from..$to-1]){ Link Here
128
  my ($od,$issue,$fines)=GetMemberIssuesAndFines($$borrower{'borrowernumber'});
129
  my ($od,$issue,$fines)=GetMemberIssuesAndFines($$borrower{'borrowernumber'});
129
130
130
  $$borrower{'dateexpiry'}= C4::Dates->new($$borrower{'dateexpiry'},'iso')->output('syspref');
131
  $$borrower{'dateexpiry'}= C4::Dates->new($$borrower{'dateexpiry'},'iso')->output('syspref');
131
132
  my %row = (
132
  my %row = (
133
    count => $index++,
133
    count => $index++,
134
	%$borrower,
134
	%$borrower,
Lines 136-142 foreach my $borrower(@$results[$from..$to-1]){ Link Here
136
    overdues => $od,
136
    overdues => $od,
137
    issues => $issue,
137
    issues => $issue,
138
    odissue => "$od/$issue",
138
    odissue => "$od/$issue",
139
    fines =>  sprintf("%.2f",$fines),
139
    fines => PlaceCurrencySymbol(sprintf("%.2f",$fines)),
140
    );
140
    );
141
  push(@resultsdata, \%row);
141
  push(@resultsdata, \%row);
142
}
142
}
(-)a/members/moremember.pl (-4 / +5 lines)
Lines 54-59 use C4::Form::MessagingPreferences; Link Here
54
use C4::NewsChannels; #get slip news
54
use C4::NewsChannels; #get slip news
55
use List::MoreUtils qw/uniq/;
55
use List::MoreUtils qw/uniq/;
56
use C4::Members::Attributes qw(GetBorrowerAttributes);
56
use C4::Members::Attributes qw(GetBorrowerAttributes);
57
use C4::Budgets qw(PlaceCurrencySymbol);
57
58
58
#use Smart::Comments;
59
#use Smart::Comments;
59
#use Data::Dumper;
60
#use Data::Dumper;
Lines 275-281 sub build_issue_data { Link Here
275
        $issue->[$i]{'issuingbranchname'} = GetBranchName($issue->[$i]{'branchcode'});
276
        $issue->[$i]{'issuingbranchname'} = GetBranchName($issue->[$i]{'branchcode'});
276
        my %row = %{ $issue->[$i] };
277
        my %row = %{ $issue->[$i] };
277
        $totalprice += $issue->[$i]{'replacementprice'};
278
        $totalprice += $issue->[$i]{'replacementprice'};
278
        $row{'replacementprice'} = $issue->[$i]{'replacementprice'};
279
        $row{'replacementprice'} = PlaceCurrencySymbol($issue->[$i]{'replacementprice'});
279
        # item lost, damaged loops
280
        # item lost, damaged loops
280
        if ($row{'itemlost'}) {
281
        if ($row{'itemlost'}) {
281
            my $fw = GetFrameworkCode($issue->[$i]{'biblionumber'});
282
            my $fw = GetFrameworkCode($issue->[$i]{'biblionumber'});
Lines 316-322 sub build_issue_data { Link Here
316
        $row{'itemtype_description'} = $itemtypeinfo->{description};
317
        $row{'itemtype_description'} = $itemtypeinfo->{description};
317
        $row{'itemtype_image'}       = $itemtypeinfo->{imageurl};
318
        $row{'itemtype_image'}       = $itemtypeinfo->{imageurl};
318
319
319
        $row{'charge'} = sprintf( "%.2f", $charge );
320
        $row{'charge'} = PlaceCurrencySymbol(sprintf( "%.2f", $charge ));
320
321
321
        my ( $renewokay,$renewerror ) = CanBookBeRenewed( $issue->[$i]{'borrowernumber'}, $issue->[$i]{'itemnumber'}, $override_limit );
322
        my ( $renewokay,$renewerror ) = CanBookBeRenewed( $issue->[$i]{'borrowernumber'}, $issue->[$i]{'itemnumber'}, $override_limit );
322
        $row{'norenew'} = !$renewokay;
323
        $row{'norenew'} = !$renewokay;
Lines 464-471 $template->param( Link Here
464
    reregistration  => $reregistration,
465
    reregistration  => $reregistration,
465
    branch          => $branch,
466
    branch          => $branch,
466
    todaysdate      => C4::Dates->today(),
467
    todaysdate      => C4::Dates->today(),
467
    totalprice      => sprintf("%.2f", $totalprice),
468
    totalprice      => PlaceCurrencySymbol(sprintf("%.2f", $totalprice)),
468
    totaldue        => sprintf("%.2f", $total),
469
    totaldue        => PlaceCurrencySymbol(sprintf("%.2f", $total)),
469
    totaldue_raw    => $total,
470
    totaldue_raw    => $total,
470
    issueloop       => @issuedata,
471
    issueloop       => @issuedata,
471
    relissueloop    => @relissuedata,
472
    relissueloop    => @relissuedata,
(-)a/members/pay.pl (+13 lines)
Lines 40-45 use C4::Koha; Link Here
40
use C4::Overdues;
40
use C4::Overdues;
41
use C4::Branch;
41
use C4::Branch;
42
use C4::Members::Attributes qw(GetBorrowerAttributes);
42
use C4::Members::Attributes qw(GetBorrowerAttributes);
43
use C4::Budgets qw(PlaceCurrencySymbol);
43
44
44
my $input = CGI->new;
45
my $input = CGI->new;
45
46
Lines 133-140 sub add_accounts_to_template { Link Here
133
    for my $notify_id (@notify) {
134
    for my $notify_id (@notify) {
134
        my ( $acct_total, $accountlines, undef ) =
135
        my ( $acct_total, $accountlines, undef ) =
135
          GetBorNotifyAcctRecord( $borrowernumber, $notify_id );
136
          GetBorNotifyAcctRecord( $borrowernumber, $notify_id );
137
138
		foreach my $accountline (@$accountlines) {
139
			$accountline->{amount} = PlaceCurrencySymbol(sprintf( "%.2f",$accountline->{amount}));
140
			$accountline->{amountoutstanding} = PlaceCurrencySymbol(sprintf( "%.2f",$accountline->{amountoutstanding}));
141
		}
142
136
        if ( @{$accountlines} ) {
143
        if ( @{$accountlines} ) {
144
137
            my $totalnotify = AmountNotify( $notify_id, $borrowernumber );
145
            my $totalnotify = AmountNotify( $notify_id, $borrowernumber );
146
			$totalnotify = PlaceCurrencySymbol(sprintf( "%.2f",$totalnotify));
147
138
            push @{$accounts},
148
            push @{$accounts},
139
              { accountlines => $accountlines,
149
              { accountlines => $accountlines,
140
                notify       => $notify_id,
150
                notify       => $notify_id,
Lines 142-147 sub add_accounts_to_template { Link Here
142
              };
152
              };
143
        }
153
        }
144
    }
154
    }
155
156
	$total = PlaceCurrencySymbol(sprintf( "%.2f",$total));
157
	
145
    borrower_add_additional_fields($borrower);
158
    borrower_add_additional_fields($borrower);
146
    $template->param(
159
    $template->param(
147
        accounts => $accounts,
160
        accounts => $accounts,
(-)a/members/paycollect.pl (-4 / +5 lines)
Lines 27-32 use C4::Members; Link Here
27
use C4::Accounts;
27
use C4::Accounts;
28
use C4::Koha;
28
use C4::Koha;
29
use C4::Branch;
29
use C4::Branch;
30
use C4::Budgets qw(PlaceCurrencySymbol);
30
31
31
my $input = CGI->new();
32
my $input = CGI->new();
32
33
Lines 75-82 if ( $individual || $writeoff ) { Link Here
75
    $template->param(
76
    $template->param(
76
        accounttype       => $accounttype,
77
        accounttype       => $accounttype,
77
        accountno         => $accountno,
78
        accountno         => $accountno,
78
        amount            => $amount,
79
        amount            => PlaceCurrencySymbol(sprintf( "%.2f",$amount)),
79
        amountoutstanding => $amountoutstanding,
80
        amountoutstanding => PlaceCurrencySymbol(sprintf( "%.2f",$amountoutstanding)),
80
        title             => $title,
81
        title             => $title,
81
        description       => $description,
82
        description       => $description,
82
        notify_id         => $notify_id,
83
        notify_id         => $notify_id,
Lines 86-92 if ( $individual || $writeoff ) { Link Here
86
    $total_due = $input->param('amt');
87
    $total_due = $input->param('amt');
87
    $template->param(
88
    $template->param(
88
        selected_accts => $select_lines,
89
        selected_accts => $select_lines,
89
        amt            => $total_due
90
        amt            => PlaceCurrencySymbol($total_due)
90
    );
91
    );
91
}
92
}
92
93
Lines 137-143 $template->param( Link Here
137
 #borrowenumber  => $borrower->{borrowernumber}, # some templates require global
138
 #borrowenumber  => $borrower->{borrowernumber}, # some templates require global
138
    borrowenumber => $borrowernumber,    # some templates require global
139
    borrowenumber => $borrowernumber,    # some templates require global
139
    borrower      => $borrower,
140
    borrower      => $borrower,
140
    total         => $total_due
141
    total         => PlaceCurrencySymbol(sprintf( "%.2f",$total_due)),
141
);
142
);
142
143
143
output_html_with_http_headers $input, $cookie, $template->output;
144
output_html_with_http_headers $input, $cookie, $template->output;
(-)a/opac/opac-account.pl (-1 / +4 lines)
Lines 25-30 use C4::Circulation; Link Here
25
use C4::Auth;
25
use C4::Auth;
26
use C4::Output;
26
use C4::Output;
27
use C4::Dates qw/format_date/;
27
use C4::Dates qw/format_date/;
28
use C4::Budgets qw(PlaceCurrencySymbol);
28
use warnings;
29
use warnings;
29
30
30
my $query = new CGI;
31
my $query = new CGI;
Lines 60-65 for ( my $i = 0 ; $i < $numaccts ; $i++ ) { Link Here
60
    if ( $accts->[$i]{'amountoutstanding'} >= 0 ) {
61
    if ( $accts->[$i]{'amountoutstanding'} >= 0 ) {
61
        $accts->[$i]{'amountoutstandingcredit'} = 1;
62
        $accts->[$i]{'amountoutstandingcredit'} = 1;
62
    }
63
    }
64
	$accts->[$i]{'amountoutstanding'} = PlaceCurrencySymbol($accts->[$i]{'amountoutstanding'});
65
	$accts->[$i]{'amount'} = PlaceCurrencySymbol($accts->[$i]{'amount'});
63
}
66
}
64
67
65
# add the row parity
68
# add the row parity
Lines 72-78 foreach my $row (@$accts) { Link Here
72
75
73
$template->param (
76
$template->param (
74
    ACCOUNT_LINES => $accts,
77
    ACCOUNT_LINES => $accts,
75
    total => sprintf( "%.2f", $total ),
78
    total => PlaceCurrencySymbol(sprintf( "%.2f", $total )),
76
	accountview => 1
79
	accountview => 1
77
);
80
);
78
81
(-)a/opac/opac-user.pl (-2 / +2 lines)
Lines 36-41 use C4::Items; Link Here
36
use C4::Dates qw/format_date/;
36
use C4::Dates qw/format_date/;
37
use C4::Letters;
37
use C4::Letters;
38
use C4::Branch; # GetBranches
38
use C4::Branch; # GetBranches
39
use C4::Budgets qw(PlaceCurrencySymbol);
39
40
40
use constant ATTRIBUTE_SHOW_BARCODE => 'SHOW_BCODE';
41
use constant ATTRIBUTE_SHOW_BARCODE => 'SHOW_BCODE';
41
42
Lines 115-121 if ( $borr->{'amountoutstanding'} < 0 ) { Link Here
115
    $borr->{'amountoutstanding'} = -1 * ( $borr->{'amountoutstanding'} );
116
    $borr->{'amountoutstanding'} = -1 * ( $borr->{'amountoutstanding'} );
116
}
117
}
117
118
118
$borr->{'amountoutstanding'} = sprintf "%.02f", $borr->{'amountoutstanding'};
119
$borr->{'amountoutstanding'} = PlaceCurrencySymbol(sprintf "%.02f", $borr->{'amountoutstanding'});
119
120
120
my @bordat;
121
my @bordat;
121
$bordat[0] = $borr;
122
$bordat[0] = $borr;
122
- 

Return to bug 4078