# 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},
'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öglich, dies für einige, aber nicht fü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ür einige Einheiten automatisch möglich, aber bei anderen muss der Benutzer die neue Einheit auswählen.',