From 084d1390974678cedb644ba2142243c9d589df74 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Tue, 10 Mar 2009 15:26:20 +0000 Subject: [PATCH] Bugfix 702 (partiell) --- bin/mozilla/oe.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index eb0916fc4..1fc3fe3d6 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -248,9 +248,12 @@ sub prepare_order { $form->{formname} ||= $form->{type}; + # format discounts if values come from db. either as single id, or as a collective order + my $format_discounts = $form->{id} || $form->{convert_from_oe_ids}; + for my $i (1 .. $form->{rowcount}) { $form->{"reqdate_$i"} ||= $form->{"deliverydate_$i"}; - $form->{"discount_$i"} = $form->format_amount(\%myconfig, $form->{"discount_$i"} * ($form->{id} ? 100 : 1)); + $form->{"discount_$i"} = $form->format_amount(\%myconfig, $form->{"discount_$i"} * ($format_discounts ? 100 : 1)); $form->{"sellprice_$i"} = $form->format_amount(\%myconfig, $form->{"sellprice_$i"}); $form->{"qty_$i"} = $form->format_amount(\%myconfig, $form->{"qty_$i"}); } -- 2.20.1