From 20e6c6695eb9b9742686b947b4037636c31b13dd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Wed, 3 Mar 2010 12:12:55 +0100 Subject: [PATCH] =?utf8?q?Fehlerbehebung=20f=C3=BCr=20Bug=201017,=20die=20?= =?utf8?q?Anmerkung=20von=20Sven=20war=20korrekt,=20die=20Umformatierung?= =?utf8?q?=20muss=20vor=20prepare=5Forder=20gemacht=20werden?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- bin/mozilla/oe.pl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index da09648ca..e6ec1f943 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -1777,14 +1777,17 @@ sub poso { map { $form->{$_} = $saved_vars{$_} } keys %saved_vars; - &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 + # 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 + # ergänzung 03.10.2010 muss vor prepare_order passieren (s.a. Svens Kommentar zu Bug 1017) + # das parse_amount wird oben schon ausgeführt, deswegen an dieser stelle raus (wichtig: kommawerte bei discount testen) for my $i (1 .. $form->{rowcount}) { - $form->{"discount_$i"} = $form->format_amount(\%myconfig, $form->{"discount_$i"} * 0.01); + $form->{"discount_$i"} /=100; }; + &prepare_order; + # format amounts for my $i (1 .. $form->{rowcount} - 1) { map { $form->{"${_}_$i"} =~ s/\"/"/g } qw(partnumber description unit); -- 2.20.1