X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/09a055b2b086ad781534b1d188a8a77d156dcdd5..02aab73f3ea8e0b8c87ecd5642b9366d7c0f1a50:/SL/IS.pm 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);