From 463652c99c791f56e437d24f13425e79011806a1 Mon Sep 17 00:00:00 2001 From: Tom Kazimiers Date: Tue, 21 Nov 2023 16:30:05 +0100 Subject: [PATCH] =?UTF-8?q?Gutschriften:=20fix=20f=C3=BCr=20negative=20MwS?= =?UTF-8?q?t.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Das Runden hat für negative Zahlen nicht funktioniert. Fixes rechnung#14 --- rechnung.dtx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/rechnung.dtx b/rechnung.dtx index 0085926..4f16bd1 100644 --- a/rechnung.dtx +++ b/rechnung.dtx @@ -1013,9 +1013,17 @@ % \[\left\lfloor\frac{\hbox{\LangNet}\cdot\hbox{\LangTaxRate}+50}{100}\right\rfloor\] % \begin{macrocode} \multiply\@RCHmwsti\@RCHstsi - \advance\@RCHmwsti50\divide\@RCHmwsti100 + \ifnum\@RCHmwsti<0 + \advance\@RCHmwsti-50\divide\@RCHmwsti100 + \else + \advance\@RCHmwsti50\divide\@RCHmwsti100 + \fi \multiply\@RCHmwstii\@RCHstsii - \advance\@RCHmwstii50\divide\@RCHmwstii100 + \ifnum\@RCHmwstii<0 + \advance\@RCHmwstii-50\divide\@RCHmwstii100 + \else + \advance\@RCHmwstii50\divide\@RCHmwstii100 + \fi \@RCHmwst\@RCHmwsti\advance\@RCHmwst\@RCHmwstii \if@RCHerm \@RCHsline{zzgl. \@RCHstsii\,\% MwSt.}{\writeCurrency\@RCHmwstii}%