Bug 22116: Add price formatting to rental charge and replacement price on items tab...
[koha.git] / catalogue / moredetail.pl
index ba59937..6adcca9 100755 (executable)
@@ -128,7 +128,7 @@ my $itemtypes = { map { $_->{itemtype} => $_ } @{ Koha::ItemTypes->search_with_l
 
 $data->{'itemtypename'} = $itemtypes->{ $data->{'itemtype'} }->{'translated_description'}
   if $data->{itemtype} && exists $itemtypes->{ $data->{itemtype} };
-$data->{'rentalcharge'} = sprintf( "%.2f", $data->{'rentalcharge'} || 0); # Price formatting should be done template-side
+$data->{'rentalcharge'} = $data->{'rentalcharge'};
 foreach ( keys %{$data} ) {
     $template->param( "$_" => defined $data->{$_} ? $data->{$_} : '' );
 }
@@ -138,7 +138,7 @@ foreach my $item (@items){
     $item->{object} = Koha::Items->find( $item->{itemnumber} );
     $item->{'collection'}              = $ccodes->{ $item->{ccode} } if $ccodes && $item->{ccode} && exists $ccodes->{ $item->{ccode} };
     $item->{'itype'}                   = $itemtypes->{ $item->{'itype'} }->{'translated_description'} if exists $itemtypes->{ $item->{'itype'} };
-    $item->{'replacementprice'}        = sprintf( "%.2f", $item->{'replacementprice'} || 0 ); # Price formatting should be done template-side
+    $item->{'replacementprice'}        = $item->{'replacementprice'};
     if ( defined $item->{'copynumber'} ) {
         $item->{'displaycopy'} = 1;
         if ( defined $copynumbers->{ $item->{'copynumber'} } ) {