Bug 33028: (follow-up) Apply unformat_price to decimal fields

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Martin Renvoize 2023-06-27 16:54:02 +01:00 committed by Tomas Cohen Arazi
parent 31cbd5ce94
commit 461c1931b9
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -1392,6 +1392,7 @@
[% INCLUDE 'datatables.inc' %]
[% INCLUDE 'calendar.inc' %]
[% INCLUDE 'columns_settings.inc' %]
[% INCLUDE 'format_price.inc' %]
<script>
$(document).ready(function() {
KohaTable("default-circulation-rules", {
@ -1486,6 +1487,10 @@
$('#overduefinescap').prop('disabled', cap_fine_to_replacement_price.is(':checked') );
} else {
$(current_column).find("input[type='text']").val(itm);
// unformat prices
$(current_column).find("input[inputmode='decimal']").each(function() {
$(this).val(itm.unformat_price());
});
// select the corresponding option
$(current_column).find("select option").each(function(){
opt = $(this).text().toLowerCase();