Sammelkonten in Auflappmenüs
authorNiclas Zimmermann <niclas@kivitendo-premium.de>
Fri, 24 May 2013 11:07:40 +0000 (13:07 +0200)
committerNiclas Zimmermann <niclas@kivitendo-premium.de>
Fri, 24 May 2013 11:07:40 +0000 (13:07 +0200)
Dadurch dass man bisher Sammelkonten in Aufklappmenüs aufnehmen
konnte, wurden Probleme verursacht. Daher wird dies nun mit
verboten.

Implementiert #2277.

SL/AM.pm
locale/de/all

index 6989e35..b10e72f 100644 (file)
--- a/SL/AM.pm
+++ b/SL/AM.pm
@@ -207,16 +207,17 @@ sub save_account {
   # connect to database, turn off AutoCommit
   my $dbh = $form->dbconnect_noauto($myconfig);
 
-  # sanity check, can't have AR with AR_...
-  if ($form->{AR} || $form->{AP} || $form->{IC}) {
-    map { delete $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);
-  }
-
   for (qw(AR_include_in_dropdown AP_include_in_dropdown)) {
     $form->{$form->{$_}} = $form->{$_} if $form->{$_};
   }
 
+  # 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->{$_};
+    }
+  }
+
   $form->{link} = "";
   foreach my $item ($form->{AR},            $form->{AR_amount},
                     $form->{AR_tax},        $form->{AR_paid},
index e681137..58e4095 100755 (executable)
@@ -1088,6 +1088,7 @@ $self->{texts} = {
   'Invoices, Credit Notes & AR Transactions' => 'Rechnungen, Gutschriften & Debitorenbuchungen',
   'Is Searchable'               => 'Durchsuchbar',
   'Is this a summary account to record' => 'Sammelkonto für',
+  'It is not allowed that a summary account occurs in a drop-down menu!' => 'Ein Sammelkonto darf nicht in Aufklappmenüs aufgenommen werden!',
   'It is possible that even after such a correction there is something wrong with this transaction (e.g. taxes that don\'t match the selected taxkey). Therefore you should re-run the general ledger analysis.' => 'Auch nach einer Korrektur kann es mit dieser Buchung noch weitere Probleme geben (z.B. nicht zum Steuerschlüssel passende Steuern), weshalb ein erneutes Ausführen der Hauptbuchanalyse empfohlen wird.',
   'It is possible to do this automatically for some Buchungsgruppen, but not for all.' => 'Es ist m&ouml;glich, dies f&uuml;r einige, aber nicht f&uuml;r alle Buchungsgruppen automatisch zu erledigen.',
   'It is possible to do this automatically for some units, but for others the user has to chose the new unit.' => 'Das ist f&uuml;r einige Einheiten automatisch m&ouml;glich, aber bei anderen muss der Benutzer die neue Einheit ausw&auml;hlen.',