Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision affd886b

Von Sven Schöling vor mehr als 4 Jahren hinzugefügt

  • ID affd886bff7af48273af3dad20ea0680398489a3
  • Vorgänger ef0a9dc8
  • Nachfolger fd1ef8ea

AP: Project picker in form

Unterschiede anzeigen:

bin/mozilla/ap.pl
413 413

  
414 414
  $form->{creditremaining_plus} = ($form->{creditremaining} =~ /-/) ? "0" : "1";
415 415

  
416
  my @old_project_ids = ();
417
  map(
418
    {
419
      if ($form->{"project_id_$_"}) {
420
        push(@old_project_ids, $form->{"project_id_$_"});
421
      }
422
    }
423
    (1..$form->{"rowcount"})
424
  );
425

  
426
  $form->get_lists("projects"  => { "key"       => "ALL_PROJECTS",
427
                                    "all"       => 0,
428
                                    "old_id"    => \@old_project_ids },
429
                   "charts"    => { "key"       => "ALL_CHARTS",
416
  $form->get_lists("charts"    => { "key"       => "ALL_CHARTS",
430 417
                                    "transdate" => $form->{transdate} },
431 418
                  );
432 419

  
......
437 424

  
438 425
  $form->{ALL_DEPARTMENTS} = SL::DB::Manager::Department->get_all_sorted;
439 426

  
440
  my %project_labels = ();
441
  foreach my $item (@{ $form->{"ALL_PROJECTS"} }) {
442
    $project_labels{$item->{id}} = $item->{projectnumber};
443
  }
427
  my %project_labels = map { $_->id => $_->projectnumber }  @{ SL::DB::Manager::Project->get_all };
444 428

  
445 429
  my %charts;
446 430
  my $default_ap_amount_chart_id;
......
459 443
  my $follow_up_vc         = $form->{vendor_id} ? SL::DB::Vendor->load_cached($form->{vendor_id})->name : '';
460 444
  my $follow_up_trans_info =  "$form->{invnumber} ($follow_up_vc)";
461 445

  
462
  $::request->layout->add_javascripts("autocomplete_chart.js", "show_vc_details.js", "show_history.js", "follow_up.js", "kivi.Draft.js", "kivi.GL.js", "kivi.RecordTemplate.js", "kivi.File.js", "kivi.AP.js", "kivi.CustomerVendor.js", "kivi.Validator.js");
446
  $::request->layout->add_javascripts("autocomplete_chart.js", "show_vc_details.js", "show_history.js", "follow_up.js", "kivi.Draft.js", "kivi.GL.js", "kivi.RecordTemplate.js", "kivi.File.js", "kivi.AP.js", "kivi.CustomerVendor.js", "kivi.Validator.js", "autocomplete_project.js");
463 447
  # $form->{totalpaid} is used by the action bar setup to determine
464 448
  # whether or not canceling is allowed. Therefore it must be
465 449
  # calculated prior to the action bar setup.

Auch abrufbar als: Unified diff