From 51e25e57d76d46ad22f9983001bc249bf3697df6 Mon Sep 17 00:00:00 2001 From: Geoffrey Richardson Date: Fri, 29 May 2009 15:36:05 +0000 Subject: [PATCH] Fix von bug 1017 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Erläuterung im Code --- bin/mozilla/oe.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index b3a65680f..7d0917b69 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -1623,6 +1623,12 @@ sub poso { &prepare_order; + # prepare_order assumes that the discount is in db-notation (0.05) and not user-notation (5) + # and therefore multiplies the values by 100 in the case of reading from db or making an order from several quotation, so we convert this back into percent-notation for the user interface by multiplying with 0.01 + for $i (1 .. $form->{rowcount}) { + $form->{"discount_$i"} = $form->format_amount(\%myconfig, $form->{"discount_$i"} * 0.01); + }; + # format amounts for $i (1 .. $form->{rowcount} - 1) { map { $form->{"${_}_$i"} =~ s/\"/"/g } qw(partnumber description unit); -- 2.20.1