Bug 22171: Fix shipping cost display on invoice
authorKatrin Fischer <katrin.fischer.83@web.de>
Tue, 5 Feb 2019 21:29:13 +0000 (21:29 +0000)
committerLucas Gass <lucas@bywatersolutions.com>
Tue, 5 Mar 2019 22:56:40 +0000 (22:56 +0000)
When not 0 the shipping cost on the invoice would display with
a lot of numbers after the comma. This fixed it to display with
only 2.

To test:
- Make sure you have an invoice with shipping cost set (example: 5.00)
- Open the invoice for editing (invoice.pl)
- Verify the shipping cost displays with too many decimals (5.000000)
- Apply patch
- Verify now the shipping cost displays correctly (5.00)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt

index 38a886f..0eae867 100644 (file)
@@ -44,7 +44,7 @@
                     <input type="text" size="10" id="billingdate" name="billingdate" value="[% billingdate | $KohaDates %]" class="datepicker" /></li>
 
             <li><label for="shipmentcost">Shipping cost:</label>
-                    <input type="text" size="10" id="shipmentcost" name="shipmentcost" value="[% shipmentcost %]" /></li>
+                    <input type="text" size="10" id="shipmentcost" name="shipmentcost" value="[% shipmentcost | $Price on_editing => 1 %]" /></li>
             <li><label for="shipment_budget_id">Shipping fund:</label>
                     <select id="shipment_budget_id" name="shipment_budget_id">
                         <option value="">No fund</option>