From cd6b9ac4c807fe6ee0ad81917c9dba3439c4ea10 Mon Sep 17 00:00:00 2001 From: Colin Campbell Date: Tue, 25 Apr 2017 13:13:41 +0100 Subject: [PATCH 1/2] Bug 18491 Interpret value of unitprice correctly in receipting unit price is passed to finishreceive formatted for display. This may cause the value to be truncated ( e.g. 4,500.00 is interpreted as 4.00 ) strip the formatting before saving to the database. Problem manifests in values >= 1,000 --- acqui/finishreceive.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/acqui/finishreceive.pl b/acqui/finishreceive.pl index 6a82f54..467c965 100755 --- a/acqui/finishreceive.pl +++ b/acqui/finishreceive.pl @@ -34,6 +34,7 @@ use C4::Search; use Koha::Acquisition::Booksellers; use List::MoreUtils qw/any/; +use Number::Format qw(unformat_number); my $input=new CGI; my $flagsrequired = {acquisition => 'order_receive'}; @@ -56,6 +57,7 @@ my $cnt = 0; my $bookfund = $input->param("bookfund"); my $order = GetOrder($ordernumber); my $new_ordernumber = $ordernumber; +$unitprice = unformat_number($unitprice); #need old receivedate if we update the order, parcel.pl only shows the right parcel this way FIXME if ($quantityrec > $origquantityrec ) { -- 2.9.3