Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision dbf9afad

Von Bernd Bleßmann vor mehr als 3 Jahren hinzugefügt

  • ID dbf9afadb952dc9e5aae33879af96a703f3baf43
  • Vorgänger 12357ea5
  • Nachfolger a59c4c73

Kreditorenbuchung: verschiedene Buchungs-Aktionen je nach Mandantenkonfig

- DMS aus: Verhalten wie zuvor

- DMS an und "Dokumente für Dialogbuchung hinzufügen" eingestellt:
"Buchen" (Haupt-Aktion) bucht und führt im selben Beleg zum DMS-Tab.
Es gibt eine zweite Aktion "Buchen und neue Buchung". Diese bucht und
führt zu einer leeren Buchungsmaske

- DMS an und "Dokumente für Dialogbuchung hinzufügen" ausgestellt:
"Buchen" (Haupt-Aktion) bucht und führt zu einer leeren Buchungsmaske.
Es gibt eine zweite Aktion "Buchen und Dokument hochladen". Diese bucht und
führt im selben Beleg zum DMS-Tab

Unterschiede anzeigen:

bin/mozilla/ap.pl
867 867
        print $form->redirect_header($form->{callback});
868 868
        $::dispatcher->end_request;
869 869

  
870
      } elsif ($::instance_conf->get_ap_add_doc && $::instance_conf->get_doc_storage) {
870
      } elsif ('doc-tab' eq $form->{after_action}) {
871 871
        # Redirect with callback containing a fragment does not work (by now)
872 872
        # because the callback info is stored in the session an parsing the
873 873
        # callback parameters does not support fragments (see SL::Form::redirect).
......
1346 1346
    $is_linked_bank_transaction = 1;
1347 1347
  }
1348 1348

  
1349
  my $create_post_action = sub {
1350
    # $_[0]: description
1351
    # $_[1]: after_action
1352
    action => [
1353
      $_[0],
1354
      submit   => [ '#form', { action => "post", after_action => $_[1] } ],
1355
      checks   => [ 'kivi.validate_form', 'kivi.AP.check_fields_before_posting', 'kivi.AP.check_duplicate_invnumber' ],
1356
      disabled => !$may_edit_create                           ? t8('You must not change this AP transaction.')
1357
                : $is_closed                                  ? t8('The billing period has already been locked.')
1358
                : $is_storno                                  ? t8('A canceled invoice cannot be posted.')
1359
                : ($::form->{id} && $change_never)            ? t8('Changing invoices has been disabled in the configuration.')
1360
                : ($::form->{id} && $change_on_same_day_only) ? t8('Invoices can only be changed on the day they are posted.')
1361
                : $is_linked_bank_transaction                 ? t8('This transaction is linked with a bank transaction. Please undo and redo the bank transaction booking if needed.')
1362
                :                                               undef,
1363
    ],
1364
  };
1365

  
1366
  my @post_entries;
1367
  if ($::instance_conf->get_ap_add_doc && $::instance_conf->get_doc_storage) {
1368
    @post_entries = ( $create_post_action->(t8('Post'), 'doc-tab'),
1369
                      $create_post_action->(t8('Post and new booking')) );
1370
  } elsif ($::instance_conf->get_doc_storage) {
1371
    @post_entries = ( $create_post_action->(t8('Post')),
1372
                      $create_post_action->(t8('Post and upload document'), 'doc-tab') );
1373
  } else {
1374
    @post_entries = ( $create_post_action->(t8('Post')) );
1375
  }
1376

  
1349 1377
  for my $bar ($::request->layout->get('actionbar')) {
1350 1378
    $bar->add(
1351 1379
      action => [
......
1356 1384
        accesskey => 'enter',
1357 1385
        disabled  => !$may_edit_create ? t8('You must not change this AP transaction.') : undef,
1358 1386
      ],
1359

  
1360 1387
      combobox => [
1361
        action => [
1362
          t8('Post'),
1363
          submit   => [ '#form', { action => "post" } ],
1364
          checks   => [ 'kivi.validate_form', 'kivi.AP.check_fields_before_posting', 'kivi.AP.check_duplicate_invnumber' ],
1365
          disabled => !$may_edit_create                           ? t8('You must not change this AP transaction.')
1366
                    : $is_closed                                  ? t8('The billing period has already been locked.')
1367
                    : $is_storno                                  ? t8('A canceled invoice cannot be posted.')
1368
                    : ($::form->{id} && $change_never)            ? t8('Changing invoices has been disabled in the configuration.')
1369
                    : ($::form->{id} && $change_on_same_day_only) ? t8('Invoices can only be changed on the day they are posted.')
1370
                    : $is_linked_bank_transaction                 ? t8('This transaction is linked with a bank transaction. Please undo and redo the bank transaction booking if needed.')
1371
                    :                                               undef,
1372
        ],
1388
        @post_entries,
1373 1389
        action => [
1374 1390
          t8('Post Payment'),
1375 1391
          submit   => [ '#form', { action => "post_payment" } ],

Auch abrufbar als: Unified diff