Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 70220684

Von Moritz Bunkus vor mehr als 5 Jahren hinzugefügt

  • ID 70220684f6d864081e6ef7302839d2cf96ef3b27
  • Vorgänger 11ebc439
  • Nachfolger 85743ebe

Einkaufsrechnungen: Projektauswahl gefixt

Unterschiede anzeigen:

bin/mozilla/ir.pl
38 38
use SL::DB::BankTransactionAccTrans;
39 39
use SL::DB::Default;
40 40
use SL::DB::Department;
41
use SL::DB::Project;
41 42
use SL::DB::PurchaseInvoice;
42 43
use SL::DB::Vendor;
44
use List::MoreUtils qw(uniq);
43 45
use List::Util qw(max sum);
44 46
use List::UtilsBy qw(sort_by);
45 47

  
......
393 395

  
394 396
  $form->{defaultcurrency} = $form->get_default_currency(\%myconfig);
395 397

  
396
  my @old_project_ids = ($form->{"globalproject_id"});
397
  map { push @old_project_ids, $form->{"project_id_$_"} if $form->{"project_id_$_"}; } 1..$form->{"rowcount"};
398
  my @old_project_ids     = uniq grep { $_ } map { $_ * 1 } ($form->{"globalproject_id"}, map { $form->{"project_id_$_"} } 1..$form->{"rowcount"});
399
  my @conditions          = @old_project_ids ? (id => \@old_project_ids) : ();
400
  $TMPL_VAR{ALL_PROJECTS} = SL::DB::Manager::Project->get_all_sorted(query => [ or => [ active => 1, @conditions ]]);
401
  $form->{ALL_PROJECTS}   = $TMPL_VAR{ALL_PROJECTS}; # make projects available for second row drop-down in io.pl
398 402

  
399 403
  $form->get_lists("taxzones"      => ($form->{id} ? "ALL_TAXZONES" : "ALL_ACTIVE_TAXZONES"),
400 404
                   "currencies"    => "ALL_CURRENCIES",

Auch abrufbar als: Unified diff