[Koha] Notice ACQORDERS shows aqorders.listprice with six decimal places

Michael Kuhn mik at adminkuhn.ch
Fri Sep 20 21:07:44 NZST 2024


Hi

In database field "aqorders.listprice" is given with six decimal places, 
thus a price would look like: 40.100000

To beautify this we have added the following in notice ACQORDERS which 
removed the last four decimal places

  [% "<<aqorders.listprice>>" FILTER remove('\d{4}$') %]

so the price would look like: 40.10

Since the update to Koha 24.05.01 this does not work anymore, instead it 
shows again: 40.100000

We have also tested the following regex (which should limit the decimal 
places to two), but to no avail:

  [% "<<aqorders.listprice>>" FILTER remove('^(\d+\.\d{2})\d+$') %]

Is there a way to get rid of the unwanted decimal places in the notices 
of Koha 24.05?

Best wishes: Michael
-- 
Geschäftsführer · Diplombibliothekar BBS, Informatiker eidg. Fachausweis
Admin Kuhn GmbH · Pappelstrasse 20 · 4123 Allschwil · Schweiz
T 0041 (0)61 261 55 61 · E mik at adminkuhn.ch · W www.adminkuhn.ch


More information about the Koha mailing list