From: Jan Büren Date: Tue, 21 Jan 2014 14:09:01 +0000 (+0100) Subject: max_future_booking_interval auch ohne wert von $form->{closedto} schreiben X-Git-Tag: release-3.1.0beta1~21^2^2~2 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=8e97a740bfcebe977b27c800ba964daf04d40db3;p=kivitendo-erp.git max_future_booking_interval auch ohne wert von $form->{closedto} schreiben Ferner den Wert von conv_date nach conv_i überprüft und revtrans als veraltete Überprüfung eingestuft --- diff --git a/SL/AM.pm b/SL/AM.pm index 8b2d7b292..ed896e1ad 100644 --- a/SL/AM.pm +++ b/SL/AM.pm @@ -1120,16 +1120,14 @@ sub closebooks { my ($query, @values); - if ($form->{revtrans}) { - $query = qq|UPDATE defaults SET closedto = NULL, revtrans = '1'|; + # is currently NEVER trueish (no more hidden revtrans in $form) + # if ($form->{revtrans}) { + # $query = qq|UPDATE defaults SET closedto = NULL, revtrans = '1'|; + # -> therefore you can only set this to false (which is already the default) + # and this flag is currently only checked in gl.pl. TOOD Can probably be removed - } elsif ($form->{closedto}) { $query = qq|UPDATE defaults SET closedto = ?, max_future_booking_interval = ?, revtrans = '0'|; - @values = (conv_date($form->{closedto}), conv_date($form->{max_future_booking_interval})); - - } else { - $query = qq|UPDATE defaults SET closedto = NULL, revtrans = '0'|; - } + @values = (conv_date($form->{closedto}), conv_i($form->{max_future_booking_interval})); # set close in defaults do_query($form, $dbh, $query, @values);