Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision fa1473fc

Von Bernd Bleßmann vor 11 Tagen hinzugefügt

  • ID fa1473fc81af770fd457cfd5d3424efddc281789
  • Vorgänger ae0084b2
  • Nachfolger 452b5ca8

Dialogbuchen: neue Aktion "als neu Verwenden"

Unterschiede anzeigen:

bin/mozilla/gl.pl
1084 1084
        ],
1085 1085
      ], # end of combobox "Storno"
1086 1086

  
1087
      combobox => [
1088
        action => [ t8('Workflow') ],
1089
        action => [
1090
          t8('Use As New'),
1091
          submit   => [ '#form', { action => "use_as_new" } ],
1092
          checks   => [ 'kivi.validate_form' ],
1093
          disabled => !$form->{id} ? t8('This general ledger transaction has not been posted yet.')
1094
                    : undef,
1095
        ],
1096
      ], # end of combobox "Workflow"
1097

  
1087 1098
      combobox => [
1088 1099
        action => [ t8('more') ],
1089 1100
        action => [
......
1560 1571
  $main::lxdebug->leave_sub();
1561 1572
}
1562 1573

  
1574
sub use_as_new {
1575
  $::auth->assert('gl_transactions');
1576

  
1577
  $::form->{email_journal_id}    = delete $::form->{workflow_email_journal_id};
1578
  $::form->{email_attachment_id} = delete $::form->{workflow_email_attachment_id};
1579
  $::form->{callback}            = delete $::form->{workflow_email_callback};
1580

  
1581
  delete $::form->{$_} for qw(id gldate tax_point deliverydate storno);
1582

  
1583
  $::form->{title}     = "Add";
1584
  $::form->{transdate} = DateTime->today_local->to_kivitendo;
1585

  
1586
  $::form->{form_validity_token} = SL::DB::ValidityToken->create(scope => SL::DB::ValidityToken::SCOPE_GL_TRANSACTION_POST())->token;
1587

  
1588
  update();
1589
}
1590

  
1563 1591
sub continue {
1564 1592
  call_sub($main::form->{nextsub});
1565 1593
}

Auch abrufbar als: Unified diff