Bugzilla – Attachment 86082 Details for
Bug 18723
Dot not recognized as decimal separator on receive
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Backport of the patch to 18.05.x
backport-18.05-Bug-18723-Change-dot-into-comma.patch (text/plain), 3.13 KB, created by
Victor Grousset/tuxayo
on 2019-03-05 14:21:55 UTC
(
hide
)
Description:
Backport of the patch to 18.05.x
Filename:
MIME Type:
Creator:
Victor Grousset/tuxayo
Created:
2019-03-05 14:21:55 UTC
Size:
3.13 KB
patch
obsolete
>From ea43d3f9e4af51047def516d8fe379e72fac7b83 Mon Sep 17 00:00:00 2001 >From: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com> >Date: Thu, 17 Jan 2019 16:41:58 -0500 >Subject: [PATCH] Bug 18723: Change dot into comma > >This fixes the regression that multiplies the amount entered by 100 >when CurrencyFormat is set to FR. It replaces the last dot with a >comma before dealing with the value of ActualCost and ReplacementCost. > >Test Plan: >a)Replicate the issue: > 0- Set CurrencyFormat to FR > 1- Go to Acquisitions > 2- Search for a Vendor > 3- Click on "New basket" > 4- Give basket a name and click "Save" > 5- Click on "Add to basket" > 6- Add an order through preferred method > 7- In Accounting details, enter a vendor price with dot decimal (i.e. 19.44) > 8- Save your order line > 9- Click on "Close this basket" > 10- Confirm closing of basket by clicking on "Yes, close" > 11- Click on "Receive shipment" > 12- Enter an invoice number and click "Next" > 13- Click on "Receive" to the right of your order > 14- In Accounting details, notice the Actual cost is written with a decimal dot. > 15- Change the Actual cost, using a dot decimal (i.e 20.99) > 16- Receive the order > 17- Click on "Save" > 18- In "Already received" notice the price is multiplied by 100 (i.e. 2099,00) > 19- Click on "Cancel receipt" > 20- Click on "Receive" to the right of your order > 21- In Accounting details, change the Actual cost, using a comma decimal (i.e. 20,99) > 22- Receive the order > 23- Click on "Save" > 24- In "Already received", notice the price is correct. >b)Apply the patch >c)Test the patch: > 1- Click on "Cancel receipt" > 2- Click on "Receive to the right of your order > 3- Change the Actual cost/Replacement cost, using a dot decimal (21.99) > 4- Receive the order > 5- Click on "Save" > 6- Notice that the Actual cost and the Replacement cost use commas > 7- Change the Actual cost, using a comma decimal (21,99) > 8- Click on "Save" > 9- In "Already received", notice the price is still correct. > >Signed-off-by: Victor Grousset <victor.grousset@biblibre.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >(cherry picked from commit c7f47ea36a8992356c6c055a22891ea168cbdc9c) >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >(cherry picked from commit bf7524f0b1cebb68584eebf2d3acaec44126355d) >--- > acqui/finishreceive.pl | 7 +++++++ > 1 file changed, 7 insertions(+) > >diff --git a/acqui/finishreceive.pl b/acqui/finishreceive.pl >index 8c1439c2c8..0bd72badd4 100755 >--- a/acqui/finishreceive.pl >+++ b/acqui/finishreceive.pl >@@ -58,6 +58,13 @@ my $bookfund = $input->param("bookfund"); > my $order = GetOrder($ordernumber); > my $new_ordernumber = $ordernumber; > >+#bug18723 regression fix >+if (C4::Context->preference("CurrencyFormat") eq 'FR') { >+ if (rindex($unitprice, '.') ge 0) { >+ substr($unitprice, rindex($unitprice, '.'), 1, ','); >+ } >+} >+ > $unitprice = Koha::Number::Price->new( $unitprice )->unformat(); > my $basket = Koha::Acquisition::Orders->find( $ordernumber )->basket; > >-- >2.17.1 >
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 18723
:
79892
|
83971
|
84150
|
84166
|
84280
|
84843
| 86082