From: Bernd Bleßmann Date: Fri, 9 Nov 2018 14:52:07 +0000 (+0100) Subject: Kontoeinstellungen: Folgekonto kann nicht das Konto selbst sein. X-Git-Tag: release-3.5.4~225 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=cd96e0755c449d408657785922a05b702d3d0cad;p=kivitendo-erp.git Kontoeinstellungen: Folgekonto kann nicht das Konto selbst sein. behebt #329 "Konto mit identischem Folgekonto führt zu Endlosschlaufe" --- diff --git a/SL/AM.pm b/SL/AM.pm index a8a6d3d7d..e48f55ac3 100644 --- a/SL/AM.pm +++ b/SL/AM.pm @@ -114,7 +114,7 @@ sub get_account { } # get new accounts (Folgekonto). Find all charts with the same link - $form->{NEWACCOUNT} = $chart_obj->db->dbh->selectall_arrayref('select id, accno,description from chart where link = ? order by accno', {Slice => {}}, $chart_obj->link); + $form->{NEWACCOUNT} = $chart_obj->db->dbh->selectall_arrayref('select id, accno,description from chart where link = ? and id != ? order by accno', {Slice => {}}, $chart_obj->link, $form->{id}); } else { # set to orphaned for new charts, so chart_type can be changed (needed by $AccountIsPosted) $form->{orphaned} = 1;