Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 2a49e661

Von Kivitendo Admin vor mehr als 1 Jahr hinzugefügt

  • ID 2a49e66124890bc41816d0c7d3c5cebc55984828
  • Vorgänger 93c5375c
  • Nachfolger 2cfb8f20

Konten ausziffern - Dialogbuchungen prüfen

Ausgezifferte Buchungen sollten nicht mehr
bearbeitbar/stornierbar/löschbar sein.

Unterschiede anzeigen:

bin/mozilla/gl.pl
39 39
use List::Util qw(first sum);
40 40

  
41 41
use SL::DB::ApGl;
42
use SL::DB::Cleared;
42 43
use SL::DB::RecordTemplate;
43 44
use SL::DB::ReconciliationLink;
44 45
use SL::DB::BankTransactionAccTrans;
......
983 984
  my $form   = $::form;
984 985
  my $change_never            = $::instance_conf->get_gl_changeable == 0;
985 986
  my $change_on_same_day_only = $::instance_conf->get_gl_changeable == 2 && ($form->current_date(\%::myconfig) ne $form->{gldate});
986
  my ($is_linked_bank_transaction, $is_linked_ap_transaction, $is_reconciled_bank_transaction);
987
  my ($is_linked_bank_transaction, $is_linked_ap_transaction, $is_reconciled_bank_transaction, $is_cleared);
987 988

  
988 989
  if ($form->{id} && SL::DB::Manager::BankTransactionAccTrans->find_by(gl_id => $form->{id})) {
989 990
    $is_linked_bank_transaction = 1;
......
991 992
  if ($form->{id} && SL::DB::Manager::ApGl->find_by(gl_id => $form->{id})) {
992 993
    $is_linked_ap_transaction = 1;
993 994
  }
994
  # dont edit reconcilated bookings!
995
  # don't edit reconciled or cleared bookings!
995 996
  if ($form->{id}) {
996 997
    my @acc_trans_ids = map { $_->acc_trans_id } @{ SL::DB::Manager::AccTransaction->get_all(select => ["acc_trans_id"], where => [ trans_id => $form->{id} ] ) };
997 998
    if (scalar @acc_trans_ids && scalar @{ SL::DB::Manager::ReconciliationLink->get_all(where => [ acc_trans_id  => [ @acc_trans_ids ] ]) }) {
998 999
      $is_reconciled_bank_transaction = 1;
999 1000
    }
1001
    if (scalar @acc_trans_ids && scalar @{ SL::DB::Manager::Cleared->get_all(where => [ acc_trans_id  => [ @acc_trans_ids ] ]) }) {
1002
      $is_cleared = 1;
1003
    }
1000 1004
  }
1001 1005
  my $create_post_action = sub {
1002 1006
    # $_[0]: description
......
1011 1015
                : $is_linked_bank_transaction               ? t8('This transaction is linked with a bank transaction. Please undo and redo the bank transaction booking if needed.')
1012 1016
                : $is_linked_ap_transaction                 ? t8('This transaction is linked with a AP transaction. Please undo and redo the AP transaction booking if needed.')
1013 1017
                : $is_reconciled_bank_transaction           ? t8('This transaction is reconciled with a bank transaction. Please undo the reconciliation if needed.')
1018
                : $is_cleared                               ? t8('This transaction has been cleared. Please undo the clearing if needed.')
1014 1019
                : undef,
1015 1020
    ],
1016 1021
  };
......
1044 1049
                    : $is_linked_bank_transaction ? t8('This transaction is linked with a bank transaction. Please undo and redo the bank transaction booking if needed.')
1045 1050
                    : $is_linked_ap_transaction   ? t8('This transaction is linked with a AP transaction. Please undo and redo the AP transaction booking if needed.')
1046 1051
                    : $is_reconciled_bank_transaction ? t8('This transaction is reconciled with a bank transaction. Please undo the reconciliation if needed.')
1052
                    : $is_cleared                     ? t8('This transaction has been cleared. Please undo the clearing if needed.')
1047 1053
                    : undef,
1048 1054
        ],
1049 1055
        action => [ t8('Delete'),
......
1056 1062
                    : $is_linked_bank_transaction ? t8('This transaction is linked with a bank transaction. Please undo and redo the bank transaction booking if needed.')
1057 1063
                    : $is_linked_ap_transaction   ? t8('This transaction is linked with a AP transaction. Please undo and redo the AP transaction booking if needed.')
1058 1064
                    : $is_reconciled_bank_transaction ? t8('This transaction is reconciled with a bank transaction. Please undo the reconciliation if needed.')
1065
                    : $is_cleared                     ? t8('This transaction has been cleared. Please undo the clearing if needed.')
1059 1066
                    : $form->{storno}             ? t8('A canceled general ledger transaction cannot be deleted.')
1060 1067
                    : undef,
1061 1068
        ],
locale/de/all
4297 4297
  'This sales order has an active configuration for periodic invoices. If you save then all subsequently created invoices will contain those changes as well, but not those that have already been created. Do you want to continue?' => 'Dieser Auftrag besitzt eine aktive Konfiguration für wiederkehrende Rechnungen. Wenn Sie jetzt speichern, so werden alle zukünftig hieraus erzeugten Rechnungen die Änderungen enthalten, nicht aber die bereits erzeugten Rechnungen. Möchten Sie speichern?',
4298 4298
  'This status output will be refreshed every five seconds.' => 'Diese Statusausgabe wird alle fünf Sekunden aktualisiert.',
4299 4299
  'This sub-version is not yet finalized' => 'Diese Version ist noch in Bearbeitung.',
4300
  'This transaction has been cleared. Please undo the clearing if needed.' => 'Diese Buchung wurde schon ausgeziffert. Heben Sie die Auszifferung auf falls nötig.',
4300 4301
  'This transaction has to be split into several transactions manually.' => 'Diese Buchung muss manuell in mehrere Buchungen aufgeteilt werden.',
4301 4302
  'This transaction is linked with a AP transaction. Please undo and redo the AP transaction booking if needed.' => 'Diese Buchung ist mit einer Kreditorenbuchung verknüpft. Bitte Löschen oder Ändern Sie die Kreditorenbuchung nötigenfalls.',
4302 4303
  'This transaction is linked with a bank transaction. Please undo and redo the bank transaction booking if needed.' => 'Ein oder mehrere Zahlungen des Belegs sind über das Verbuchen von Kontoauszüge erstellt worden, falls notwendig kann eine Neuverbuchung über Zahlungsverkehr -> Bericht Bankbewegung möglich gemacht werden.',
locale/en/all
4293 4293
  'This sales order has an active configuration for periodic invoices. If you save then all subsequently created invoices will contain those changes as well, but not those that have already been created. Do you want to continue?' => '',
4294 4294
  'This status output will be refreshed every five seconds.' => '',
4295 4295
  'This sub-version is not yet finalized' => '',
4296
  'This transaction has been cleared. Please undo the clearing if needed.' => '',
4296 4297
  'This transaction has to be split into several transactions manually.' => '',
4297 4298
  'This transaction is linked with a AP transaction. Please undo and redo the AP transaction booking if needed.' => '',
4298 4299
  'This transaction is linked with a bank transaction. Please undo and redo the bank transaction booking if needed.' => '',

Auch abrufbar als: Unified diff