From f810c4f2b4928cb58c843397f7e1ce2b54c488ba Mon Sep 17 00:00:00 2001 From: tonnesen Date: Tue, 29 Oct 2002 22:53:28 +0000 Subject: [PATCH] Formatting dollar outputs ($8.50 instead of 8.5) --- koha-tmpl/intranet-tmpl/default/en/catalogue/moredetail.tmpl | 4 ++-- moredetail.pl | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/default/en/catalogue/moredetail.tmpl b/koha-tmpl/intranet-tmpl/default/en/catalogue/moredetail.tmpl index c291e1313f..20e108557e 100644 --- a/koha-tmpl/intranet-tmpl/default/en/catalogue/moredetail.tmpl +++ b/koha-tmpl/intranet-tmpl/default/en/catalogue/moredetail.tmpl @@ -37,7 +37,7 @@ BORDER=0 src="/images/delete-mem.gif"> Item Type:
URL:
Loan Length:
-Rental Charge:
+Rental Charge: $
Classification:
ISBN:
Publisher:
@@ -81,7 +81,7 @@ BORDER=0 src="/images/delete-mem.gif"> Last Borrower 1:
Last Borrower 2:
Current Branch:
-Replacement Price:
+Replacement Price: $
Item lost:
Paid for:
Notes:
diff --git a/moredetail.pl b/moredetail.pl index 6aa19034a4..7b979de25c 100755 --- a/moredetail.pl +++ b/moredetail.pl @@ -58,6 +58,7 @@ if ($dewey <= 0){ } $dewey=~ s/\.$//; $data->{'dewey'}=$dewey; +$data->{'rentalcharge'}=sprintf "%.02f", $data->{'rentalcharge'}; my @results; @@ -77,6 +78,7 @@ foreach my $item (@items){ $item->{'withdrawn'}=~ s/0/No/; $item->{'withdrawn'}=~ s/1/Yes/; $item->{'replacementprice'}+=0.00; + $item->{'replacementprice'}=sprintf "%.02f", $item->{'replacementprice'}; my $year=substr($item->{'timestamp0'},0,4); my $mon=substr($item->{'timestamp0'},4,2); my $day=substr($item->{'timestamp0'},6,2); -- 2.39.5