15 |
15 |
|
16 |
16 |
$self->_setup;
|
17 |
17 |
|
18 |
|
$self->tester->plan(tests => 25);
|
|
18 |
$self->tester->plan(tests => 26);
|
19 |
19 |
|
20 |
20 |
$self->check_konten_mit_saldo_nicht_in_guv;
|
21 |
21 |
$self->check_bilanzkonten_mit_pos_eur;
|
... | ... | |
42 |
42 |
$self->check_ap_paid_acc_trans;
|
43 |
43 |
$self->check_zero_amount_paid_but_datepaid_exists;
|
44 |
44 |
$self->check_orphaned_reconciliated_links;
|
|
45 |
$self->check_recommended_client_settings;
|
45 |
46 |
}
|
46 |
47 |
|
47 |
48 |
sub _setup {
|
... | ... | |
644 |
645 |
}
|
645 |
646 |
}
|
646 |
647 |
|
|
648 |
sub check_recommended_client_settings {
|
|
649 |
my ($self) = @_;
|
|
650 |
|
|
651 |
my $all_ok = 1;
|
|
652 |
|
|
653 |
# expand: check datev && check mark_as_paid
|
|
654 |
my %settings_values_nok = (
|
|
655 |
SL::DB::Default->get->is_changeable => 1,
|
|
656 |
SL::DB::Default->get->ar_changeable => 1,
|
|
657 |
SL::DB::Default->get->ap_changeable => 1,
|
|
658 |
SL::DB::Default->get->ir_changeable => 1,
|
|
659 |
SL::DB::Default->get->gl_changeable => 1,
|
|
660 |
);
|
|
661 |
|
|
662 |
foreach (keys %settings_values_nok) {
|
|
663 |
if ($_ == $settings_values_nok{$_}) {
|
|
664 |
$self->tester->ok(0, "Buchungskonfiguration: Mindestens ein Belegtyp ist immer änderbar.");
|
|
665 |
undef $all_ok;
|
|
666 |
}
|
|
667 |
}
|
|
668 |
|
|
669 |
# payments more strict (avoid losing payments acc_trans_ids)
|
|
670 |
my $payments_ok = SL::DB::Default->get->payments_changeable == 0 ? 1 : 0;
|
|
671 |
$self->tester->ok(0, "Manuelle Zahlungen sind zu lange änderbar (Empfehlung: niemals).") unless $payments_ok;
|
647 |
672 |
|
|
673 |
$self->tester->ok(1, "Mandantenkonfiguration optimal eingestellt.") if ($payments_ok && $all_ok);
|
|
674 |
}
|
648 |
675 |
1;
|
649 |
676 |
|
650 |
677 |
__END__
|
SelfTests: Transactions um Prüfung auf laxe Buchungskonfiguration erweitert