X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/8058448b8c3969bc043a54275fa89e4a9405908d..d851523e47e6556dab96874336c605755a01244f:/SL/AM.pm 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!')); } }