Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision b3259be1

Von Jan Büren vor fast 6 Jahren hinzugefügt

  • ID b3259be1755d03539dfa8312f379bd0190526f25
  • Vorgänger eb087bc8
  • Nachfolger 800e16d8

Manuelle Zahlungen verbieten, falls mit Kontoauszug verknüpft.

Falls die Änderbarkeit von Zahlungen nicht auf niemals steht,
entsprechend Überbuchen / manuelles Ändern verbieten.
Der Fehlertext weißt zusätzlich auf die Funktion im Bankbewegungs-Bericht hin

Unterschiede anzeigen:

bin/mozilla/is.pl
43 43
use List::UtilsBy qw(sort_by);
44 44
use English qw(-no_match_vars);
45 45

  
46
use SL::DB::BankTransactionAccTrans;
46 47
use SL::DB::Default;
47 48
use SL::DB::Customer;
48 49
use SL::DB::Department;
......
278 279
  my $payments_balanced       = ($::form->{oldtotalpaid} == 0);
279 280
  my $has_storno              = ($::form->{storno} && !$::form->{storno_id});
280 281
  my $may_edit_create         = $::auth->assert('invoice_edit', 1);
282
  my $is_linked_bank_transaction;
283
    if ($::form->{id}
284
        && SL::DB::Default->get->payments_changeable != 0
285
        && SL::DB::Manager::BankTransactionAccTrans->find_by(ar_id => $::form->{id})) {
286

  
287
      $is_linked_bank_transaction = 1;
288
    }
281 289

  
282 290
  for my $bar ($::request->layout->get('actionbar')) {
283 291
    $bar->add(
......
302 310
                    : $form->{storno}                           ? t8('A canceled invoice cannot be posted.')
303 311
                    : ($form->{id} && $change_never)            ? t8('Changing invoices has been disabled in the configuration.')
304 312
                    : ($form->{id} && $change_on_same_day_only) ? t8('Invoices can only be changed on the day they are posted.')
313
                    : $is_linked_bank_transaction               ? t8('This transaction is linked with a bank transaction. Please undo and redo the bank transaction booking if needed.')
305 314
                    :                                             undef,
306 315
        ],
307 316
        action => [
308 317
          t8('Post Payment'),
309 318
          submit   => [ '#form', { action => "post_payment" } ],
310 319
          checks   => [ 'kivi.validate_form' ],
311
          disabled => !$may_edit_create ? t8('You must not change this invoice.')
312
                    : !$form->{id}      ? t8('This invoice has not been posted yet.')
313
                    :                     undef,
320
          disabled => !$may_edit_create           ? t8('You must not change this invoice.')
321
                    : !$form->{id}                ? t8('This invoice has not been posted yet.')
322
                    : $is_linked_bank_transaction ? t8('This transaction is linked with a bank transaction. Please undo and redo the bank transaction booking if needed.')
323
                    :                               undef,
314 324
        ],
315 325
        action => [ t8('Mark as paid'),
316 326
          submit   => [ '#form', { action => "mark_as_paid" } ],

Auch abrufbar als: Unified diff