From d851523e47e6556dab96874336c605755a01244f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Fri, 24 May 2013 16:36:53 +0200 Subject: [PATCH] Nachtrag zum commit 4d1bc29943746f84e2ecc52ced9f3cbee18ba6d3 ... MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit ... $form-error nicht in einer Schleife aufrufen. Keine Ahnung, warum das ein Problem ist, aber es gibt folgende Fehlermeldung bei CSS-Menü-Variante oben (nicht bei seitlichem Menü): Modification of a read-only value attempted at /usr/local/src/lxoffice-git-bernd/SL/Inifile.pm line 56 --- SL/AM.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/SL/AM.pm b/SL/AM.pm index acc5bdccc..007d1ddc2 100644 --- a/SL/AM.pm +++ b/SL/AM.pm @@ -40,6 +40,7 @@ package AM; use Carp; use Data::Dumper; use Encode; +use List::MoreUtils qw(any); use SL::DBUtils; use strict; @@ -213,8 +214,8 @@ sub save_account { # sanity check, can't have AR with AR_... if ($form->{AR} || $form->{AP} || $form->{IC}) { - for (qw(AR_amount AR_tax AR_paid AP_amount AP_tax AP_paid IC_sale IC_cogs IC_taxpart IC_income IC_expense IC_taxservice)) { - $form->error($::locale->text('It is not allowed that a summary account occurs in a drop-down menu!')) if $form->{$_}; + if (any { $form->{$_} } qw(AR_amount AR_tax AR_paid AP_amount AP_tax AP_paid IC_sale IC_cogs IC_taxpart IC_income IC_expense IC_taxservice)) { + $form->error($::locale->text('It is not allowed that a summary account occurs in a drop-down menu!')); } } -- 2.20.1