From 02aab73f3ea8e0b8c87ecd5642b9366d7c0f1a50 Mon Sep 17 00:00:00 2001 From: Thomas Kasulke Date: Tue, 3 Apr 2007 11:43:18 +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/IS.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/SL/IS.pm b/SL/IS.pm index cd90a8578..6971f9f48 100644 --- a/SL/IS.pm +++ b/SL/IS.pm @@ -382,8 +382,12 @@ sub invoice_details { $form->{paid} += $form->parse_amount($myconfig, $form->{"paid_$i"}); } } - - $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); -- 2.20.1