From 92b2f11d767aefa46c58c1b3c63ac73c3f86421b Mon Sep 17 00:00:00 2001 From: Thomas Kasulke Date: Tue, 3 Apr 2007 11:43:29 +0000 Subject: [PATCH] =?utf8?q?Nettobetr=C3=A4ge=20bei=20taxincluded=20auf=20Dr?= =?utf8?q?uckvorschau=20angepasst=20(Bug=20576)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/OE.pm | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/SL/OE.pm b/SL/OE.pm index c1cf1879c..5f1c6ce45 100644 --- a/SL/OE.pm +++ b/SL/OE.pm @@ -1141,14 +1141,24 @@ sub order_details { $form->format_amount($myconfig, $form->{"${item}_rate"} * 100)); push(@{ $form->{taxnumber} }, $form->{"${item}_taxnumber"}); } - $form->{subtotal} = $form->format_amount($myconfig, $form->{total}, 2); + if($form->{taxincluded}) { + $form->{subtotal} = $form->format_amount($myconfig, $form->{total} - $tax, 2); + } + else { + $form->{subtotal} = $form->format_amount($myconfig, $form->{total}, 2); + } $yesdiscount = $form->{nodiscount_total} - $nodiscount; $form->{nodiscount_subtotal} = $form->format_amount($myconfig, $form->{nodiscount_total}, 2); $form->{discount_total} = $form->format_amount($myconfig, $form->{discount_total}, 2); $form->{nodiscount} = $form->format_amount($myconfig, $nodiscount, 2); $form->{yesdiscount} = $form->format_amount($myconfig, $yesdiscount, 2); - $form->{subtotal} = $form->format_amount($myconfig, $form->{ordtotal}, 2); + if($form->{taxincluded}) { + $form->{subtotal} = $form->format_amount($myconfig, $form->{ordtotal} - $tax, 2); + } + else { + $form->{subtotal} = $form->format_amount($myconfig, $form->{ordtotal}, 2); + } $form->{ordtotal} = ($form->{taxincluded}) ? $form->{ordtotal} : $form->{ordtotal} + $tax; -- 2.20.1