From: Sven Schöling Date: Tue, 10 Mar 2009 15:26:20 +0000 (+0000) Subject: Bugfix 702 (partiell) X-Git-Tag: release-2.6.0beta2~150 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=084d1390974678cedb644ba2142243c9d589df74;p=kivitendo-erp.git Bugfix 702 (partiell) --- 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"}); }