X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FAM.pm;h=e48f55ac361ba890d0e412e5ce4a2b110319f254;hb=6660259a9e3f781210b3eedb933c55da27116c0b;hp=606d3f66f1f87ab8a67cfe563ff334976acbc6ba;hpb=b391b42da949cd0c2a9c8c1860042e19eb0e62c2;p=kivitendo-erp.git diff --git a/SL/AM.pm b/SL/AM.pm index 606d3f66f..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; @@ -1305,12 +1305,14 @@ sub get_warehouse { map { $form->{$_} = $ref->{$_} } keys %{ $ref }; $query = <{BINS} = selectall_hashref_query($form, $dbh, $query, conv_i($form->{id})); @@ -1318,4 +1320,22 @@ SQL $main::lxdebug->leave_sub(); } +sub get_eur_categories { + my ($self, $myconfig, $form) = @_; + + my $dbh = SL::DB->client->dbh; + my %eur_categories = selectall_as_map($form, $dbh, "select * from eur_categories order by id", 'id', 'description'); + + return \%eur_categories; +} + +sub get_bwa_categories { + my ($self, $myconfig, $form) = @_; + + my $dbh = SL::DB->client->dbh; + my %bwa_categories = selectall_as_map($form, $dbh, "select * from bwa_categories order by id", 'id', 'description'); + + return \%bwa_categories; +} + 1;