Don't ask for tax value if tax percent is zero
[infodrom.org/service.infodrom.org] / src / InfoCon / buch / infocon
index d1ad045..81743d0 100755 (executable)
@@ -1,7 +1,7 @@
 #! /usr/bin/perl
 
 #  infocon - Administration tool for InfoCon
-#  Copyright (c) 1998-2003,2005-8,10,11  Martin Schulze <joey@infodrom.org>
+#  Copyright (c) 1998-2003,2005-8,10,11,12,14,15  Martin Schulze <joey@infodrom.org>
 #
 #  This program is free software; you can redistribute it and/or modify
 #  it under the terms of the GNU General Public License as published by
@@ -450,6 +450,10 @@ sub buchung_input
     print "Buchungseingabe\n\n";
     while ($weiter =~ /[JjYy1]/) {
        foreach my $f (@fields) {
+           if ($f eq 'tax_assigned' && $answers->{'tax_percent'} == 0) {
+               $answers->{$f} = 0;
+               next;
+           }
            $ans = read_input($f, $fields->{$f});
            $answers->{$f} = $ans;
        }