Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 40cfb5ee

Von Kivitendo Admin vor mehr als 7 Jahren hinzugefügt

  • ID 40cfb5eee3162b7e25b20f7e0f52c3def98313bc
  • Vorgänger f0747a2f
  • Nachfolger 0e60202e

Kreditorenbuchung - Abteilung nutzt immer L.select_tag als Dropdown

Unterschiede anzeigen:

bin/mozilla/ap.pl
100 100
  $form->{initial_transdate} = $form->{transdate};
101 101
  create_links(dont_save => 1);
102 102
  $form->{transdate} = $form->{initial_transdate};
103

  
103 104
  &display_form;
104 105

  
105 106
  $main::lxdebug->leave_sub();
......
187 188
      (@{ $form->{all_vendor} });
188 189
  }
189 190

  
190
  # departments
191
  if (@{ $form->{all_departments} || [] }) {
192
    $form->{department}       = "$form->{department}--$form->{department_id}";
193
    $form->{selectdepartment} = "<option>\n" . join('', map { my $quoted = H("$_->{description}--$_->{id}"); "<option value=\"${quoted}\">${quoted}\n"} @{ $form->{all_departments} || [] });
194
  }
191
  $::form->{ALL_DEPARTMENTS} = SL::DB::Manager::Department->get_all;
195 192

  
196 193
  $form->{employee} = "$form->{employee}--$form->{employee_id}";
197 194

  
......
242 239
  # type=submit $locale->text('Edit Accounts Payables Transaction')
243 240

  
244 241
  # set option selected
245
  foreach my $item (qw(vendor currency department)) {
242
  foreach my $item (qw(vendor currency)) {
246 243
    my $to_replace         =  H($form->{$item});
247 244
    $form->{"select$item"} =~ s/ selected//;
248 245
    $form->{"select$item"} =~ s/>\Q${to_replace}\E/ selected>${to_replace}/;
......
297 294
    @{ $form->{ALL_CHARTS} }
298 295
  );
299 296

  
297
  $form->{ALL_DEPARTMENTS} = SL::DB::Manager::Department->get_all;
298

  
300 299
  my %project_labels = ();
301 300
  foreach my $item (@{ $form->{"ALL_PROJECTS"} }) {
302 301
    $project_labels{$item->{id}} = $item->{projectnumber};
......
675 674
  $form->isblank("vendor",    $locale->text('Vendor missing!'));
676 675
  $form->isblank("invnumber", $locale->text('Invoice Number missing!'));
677 676

  
678
  if ($myconfig{mandatory_departments} && !$form->{department}) {
677
  if ($myconfig{mandatory_departments} && !$form->{department_id}) {
679 678
    $form->{saved_message} = $::locale->text('You have to specify a department.');
680 679
    update();
681 680
    exit;
......
887 886
  $form->{title}    = $locale->text('AP Transactions');
888 887

  
889 888
  $form->get_lists("projects"     => { "key" => "ALL_PROJECTS", "all" => 1 },
890
                   "departments"  => "ALL_DEPARTMENTS",
891 889
                   "vendors"      => "ALL_VC");
892 890

  
891
  $::form->{ALL_DEPARTMENTS} = SL::DB::Manager::Department->get_all;
893 892
  # constants and subs for template
894 893
  $form->{vc_keys}   = sub { "$_[0]->{name}--$_[0]->{id}" };
895 894

  
......
945 944
       vendornumber country ustid taxzone payment_terms charts direct_debit);
946 945

  
947 946
  my @hidden_variables = map { "l_${_}" } @columns;
948
  push @hidden_variables, "l_subtotal", qw(open closed vendor invnumber ordnumber transaction_description notes project_id transdatefrom transdateto department
947
  push @hidden_variables, "l_subtotal", qw(open closed vendor invnumber ordnumber transaction_description notes project_id transdatefrom transdateto
949 948
                                           parts_partnumber parts_description);
950 949

  
951 950
  my $href = build_std_url('action=ap_transactions', grep { $form->{$_} } @hidden_variables);
......
997 996
  my @options;
998 997
  push @options, $locale->text('Vendor')                  . " : $form->{vendor}"                         if ($form->{vendor});
999 998
  push @options, $locale->text('Contact Person')          . " : $form->{cp_name}"                        if ($form->{cp_name});
1000
  push @options, $locale->text('Department')              . " : " . (split /--/, $form->{department})[0] if ($form->{department});
999
  push @options, $locale->text('Department')              . " : $form->{department}"                     if ($form->{department});
1001 1000
  push @options, $locale->text('Invoice Number')          . " : $form->{invnumber}"                      if ($form->{invnumber});
1002 1001
  push @options, $locale->text('Order Number')            . " : $form->{ordnumber}"                      if ($form->{ordnumber});
1003 1002
  push @options, $locale->text('Notes')                   . " : $form->{notes}"                          if ($form->{notes});

Auch abrufbar als: Unified diff