Bug 22113: Add price formatting on item lost report
authorKatrin Fischer <katrin.fischer.83@web.de>
Sat, 5 Jan 2019 05:41:48 +0000 (05:41 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 4 Feb 2019 12:50:35 +0000 (13:50 +0100)
The item lost report displays the price and replacement
price for lost items. With the patch they will display
according to the CurrencyFormat system preference.

To test:
- Mark 1 or more items lost
- Make sure that replacement cost and purchase price are set
- Go to Reports > Items lost
- Search for your lost items
- Verify price and replacement price display
- Apply patch and toggle CurrencyFormat to different settings
- Refresh lost items report
- Verify prices are always displayed according to syspref setting

Signed-off-by: Olivia Lu <olivialokm@gmail.com>
Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit c3fb484fe2922d2a97053b3fde4fb433c5aa0c4f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit da8e5fcd2447aad751e511adac4d29bac7cec82c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9ad483b2040ca1fa322ef0af7abe211817d84926)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt

index e3b8e26..28ca228 100644 (file)
@@ -2,6 +2,7 @@
 [% USE Branches %]
 [% USE ColumnsSettings %]
 [% USE KohaDates %]
+[% USE Price %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Reports &rsaquo; Lost items</title>
 [% INCLUDE 'doc-head-close.inc' %]
@@ -83,8 +84,8 @@
                         </td>
                         <td>[% item.itemcallnumber %]</td>
                         <td>[% item.datelastseen | $KohaDates %]</td>
-                        <td>[% item.price %]</td>
-                        <td>[% item.replacementprice %]</td>
+                        <td>[% item.price | $Price %]</td>
+                        <td>[% item.replacementprice | $Price %]</td>
                         <td>[% Branches.GetName(item.homebranch) %]</td>
                         <td>[% item.effective_itemtype %]</td>
                         <td>[% Branches.GetName(item.holdingbranch) %]</td>