Bugzilla – Attachment 79892 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]
Bug 18723: Do not unformat price
Bug-18723-Do-not-unformat-price.patch (text/plain), 3.07 KB, created by
Josef Moravec
on 2018-10-03 14:18:56 UTC
(
hide
)
Description:
Bug 18723: Do not unformat price
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2018-10-03 14:18:56 UTC
Size:
3.07 KB
patch
obsolete
>From 9024d7eef6b846e28563d12817af240ae05d4b88 Mon Sep 17 00:00:00 2001 >From: Josef Moravec <josef.moravec@gmail.com> >Date: Wed, 3 Oct 2018 14:12:25 +0000 >Subject: [PATCH] Bug 18723: Do not unformat price > >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) try again, should be fixe now >--- > acqui/finishreceive.pl | 2 -- > koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt | 2 +- > 2 files changed, 1 insertion(+), 3 deletions(-) > >diff --git a/acqui/finishreceive.pl b/acqui/finishreceive.pl >index c72da15..0a62618 100755 >--- a/acqui/finishreceive.pl >+++ b/acqui/finishreceive.pl >@@ -59,8 +59,6 @@ my $bookfund = $input->param("bookfund"); > my $order = GetOrder($ordernumber); > my $new_ordernumber = $ordernumber; > >-$unitprice = Koha::Number::Price->new( $unitprice )->unformat(); >-$replacementprice = Koha::Number::Price->new( $replacementprice )->unformat(); > my $basket = Koha::Acquisition::Orders->find( $ordernumber )->basket; > > #need old receivedate if we update the order, parcel.pl only shows the right parcel this way FIXME >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >index 39ee661..e0682b9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >@@ -242,7 +242,7 @@ > <li><label for="rrp">Retail price: </label>[% rrp | $Price %]</li> > <li> > <label for="replacementprice">Replacement price:</label> >- <input type="text" size="20" name="replacementprice" id="replacementprice" value="[% replacementprice | $Price %]" /> >+ <input type="text" size="20" name="replacementprice" id="replacementprice" value="[% replacementprice | $Price on_editing => 1 %]" /> > </li> > <li><label for="ecost">Budgeted cost: </label>[% ecost | $Price %]</li> > <li> >-- >2.1.4
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