Bugzilla – Attachment 157302 Details for
Bug 35087
Discount rate should only allow valid input formats
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35087: Discount rate only accepts a point as decimal separator
Bug-35087-Discount-rate-only-accepts-a-point-as-de.patch (text/plain), 2.40 KB, created by
Thibaud Guillot (thibaud_g)
on 2023-10-18 09:02:47 UTC
(
hide
)
Description:
Bug 35087: Discount rate only accepts a point as decimal separator
Filename:
MIME Type:
Creator:
Thibaud Guillot (thibaud_g)
Created:
2023-10-18 09:02:47 UTC
Size:
2.40 KB
patch
obsolete
>From 07b2da7a7792b160f10cf1494882a9a25e37277b Mon Sep 17 00:00:00 2001 >From: Thibaud Guillot <thibaud.guillot@biblibre.com> >Date: Wed, 18 Oct 2023 10:45:48 +0200 >Subject: [PATCH] Bug 35087: Discount rate only accepts a point as decimal > separator > >When a comma is used to define the discount rate of a vendor, >the data is not recorded (as NULL), it is however recorded if the separator is a point. > >Test plan: > >1) Go to acqui module and edit a vendor >2) Set a discount rate with a comma as decimal separator >3) Edit again or request your database to see that there is no data > saved >4) Do it again with a point as decimal and see it works >5) Apply this patch and reloard the build for the templates >6) Repeat step 2 and see the warning to inform you that you must use a point >--- > koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt >index 3042418cc6..36dc429dcb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt >@@ -201,7 +201,7 @@ div.rows { padding: 1rem; } > [% END %] > [% UNLESS ( enter ) %][% INCLUDE 'acquisitions-toolbar.inc' %][% END %] > [% IF ( enter ) %] >- <form action="updatesupplier.pl" name="updatesupplier" style="display:block" class="validated" method="post"> >+ <form action="updatesupplier.pl" name="updatesupplier" style="display:block" method="post"> > <div id="toolbar" class="btn-toolbar"> > <button class="btn btn-primary" type="submit"><i class="fa fa-save"></i> Save</button> > [% IF ( booksellerid ) %] >@@ -350,7 +350,7 @@ div.rows { padding: 1rem; } > <input type="hidden" name="tax_rate" value="0" /> > [% END %] > <li><label for="discount">Discount: </label> >- <input type="text" size="6" id="discount" name="discount" value="[% discount | format ('%.1f') %]" />%</li> >+ <input type="text" pattern="^\d+(\.\d{1})?$" size="6" id="discount" name="discount" value="[% discount | format("%.1f") %]"/>% - Example: 7.5 %</li> > <li> > <label for="deliverytime">Delivery time: </label> > <input type="text" size="2" id="deliverytime" name="deliverytime" value="[% deliverytime | html %]" /> days >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 35087
:
157302
|
157626
|
158921
|
159831
|
161128
|
161225
|
161237
|
161596
|
161597
|
161598
|
161704
|
161705
|
161706
|
162065
|
162066
|
162067
|
164739
|
164740
|
167746
|
167747
|
171197
|
171198
|
171594
|
171595