From c70339dd61778a1033eaec737c71e5e5683aad09 Mon Sep 17 00:00:00 2001
From: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Date: Mon, 2 Mar 2020 11:32:34 +0100
Subject: [PATCH] Bug 17016: (follow-up) Clear with 0.00 instead of blank (Use
Price)
Using Price, to formatted it correctly if needed
So far it will not do anything as 'on_editing => 1' we keep 0.00, but it
must be improved later (when we will handle that)
---
koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt
index e9b31e4a6f..e714e87e2a 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt
@@ -282,6 +282,7 @@
<script>
jQuery.validator.addClassRules({ plan_entry: { pnumber: true } }); // require that input be a number in fields with the class 'plan_entry'
jQuery.validator.addMethod("pnumber", $.validator.methods.number, _("Please enter a valid number.") );
+ var zero_formatted = "[% 0 | $Price on_editing => 1 %]";
$(document).ready(function() {
$("#selections input").on("change",function(e){
var num = $(this).attr("id");
@@ -313,7 +314,7 @@
$(edit_row).find("input").each(function(){
var type = $(this).attr("type");
if (type != "button" && type != "submit" ) {
- $(this).val("0.00");
+ $(this).val(zero_formatted);
$(this).prop('disabled', false);
}
});
--
2.20.1