+sub check_every_account_with_taxkey {
+ my ($self) = @_;
+
+ my $query = qq|SELECT accno, description FROM chart WHERE id NOT IN (select chart_id from taxkeys)|;
+ my $accounts_without_tk = selectall_hashref_query($::form, $self->dbh, $query);
+
+ if ( scalar @{ $accounts_without_tk } > 0 ){
+ $self->tester->ok(0, "Folgende Konten haben keinen gültigen Steuerschlüssel:");
+
+ for my $account_without_tk (@{ $accounts_without_tk } ) {
+ $self->tester->diag("Kontonummer: $account_without_tk->{accno} Beschreibung: $account_without_tk->{description}");
+ }
+ } else {
+ $self->tester->ok(1, "Jedes Konto hat einen gültigen Steuerschlüssel!");
+ }
+}
+