Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 16821864

Von Thomas Kasulke vor mehr als 17 Jahren hinzugefügt

  • ID 168218647abacbfb5599be7beae82ae832cf2efb
  • Vorgänger f411025c
  • Nachfolger e7367fb5

fix von salesmen und employee bzw. split in zwei eigenständige Funktionen durch get_list aufgerufen. Fixing von Bug 658

Unterschiede anzeigen:

bin/mozilla/oe.pl
374 374
  }
375 375

  
376 376
  # set option selected
377
  foreach $item ($form->{vc}, currency, department, employee, ($form->{vc} eq "customer" ? customer : vendor)) {
377
  foreach $item ($form->{vc}, currency, department, ($form->{vc} eq "customer" ? customer : vendor)) {
378 378
    $form->{"select$item"} =~ s/ selected//;
379 379
    $form->{"select$item"} =~
380 380
      s/option>\Q$form->{$item}\E/option selected>$form->{$item}/;
......
396 396
                   "projects" => { "key" => "ALL_PROJECTS",
397 397
                                   "all" => 0,
398 398
                                   "old_id" => \@old_project_ids },
399
                   "employees" => "ALL_SALESMEN",
399
                   "employees" => "ALL_EMPLOYEES",
400
                   "salesmen" => "ALL_SALESMEN",
400 401
                   "taxzones" => "ALL_TAXZONES",
401 402
                   "payments" => "ALL_PAYMENTS",
402 403
                   "currencies" => "ALL_CURRENCIES",
......
487 488
    NTI($cgi->popup_menu('-name' => 'globalproject_id', '-values' => \@values,
488 489
                         '-labels' => \%labels,
489 490
                         '-default' => $form->{"globalproject_id"}));
490

  
491
  $salesman = "";
491
  
492
  my $salesmen = "";
493
  %labels = ();
494
  @values = ();
492 495
  if ($form->{type} =~ /^sales_/) {
493
    %labels = ();
494
    @values = ("");
495
    foreach my $item (@{ $form->{ALL_SALESMEN} }) {
496
      push(@values, $item->{id});
497
      $labels{$item->{id}} = $item->{name} ne "" ? $item->{name} : $item->{login};
496
    foreach my $item (@{ $form->{"ALL_SALESMEN"} }) {
497
      push(@values, $item->{"id"});
498
      $labels{$item->{"id"}} = ($item->{"name"} ne "" ? $item->{"name"} : $item->{"login"});
498 499
    }
499

  
500
    $salesman =
500
    $salesmen =
501 501
      qq|<tr>
502 502
          <th align="right">| . $locale->text('Salesman') . qq|</th>
503 503
          <td>| .
504
      NTI($cgi->popup_menu('-name' => 'salesman_id', '-default' => $form->{salesman_id},
504
      NTI($cgi->popup_menu('-name' => 'salesman_id', '-default' => $form->{"salesman_id"} ? $form->{"salesman_id"} : $form->{"employee_id"},
505 505
                           '-values' => \@values, '-labels' => \%labels))
506 506
      . qq|</td>
507 507
         </tr>|;
......
509 509

  
510 510
  %labels = ();
511 511
  @values = ();
512
  foreach my $item (@{ $form->{"ALL_SALESMEN"} }) {
512
  foreach my $item (@{ $form->{"ALL_EMPLOYEES"} }) {
513 513
    push(@values, $item->{"id"});
514
    $labels{$item->{"id"}} = $item->{"name"};
514
    $labels{$item->{"id"}} = $item->{"name"} ne "" ? $item->{"name"} : $item->{"login"};
515 515
  }
516 516

  
517
  my $employees = qq|
517
  my $employee = qq|
518 518
    <tr>
519 519
      <th align="right">| . $locale->text('Employee') . qq|</th>
520 520
      <td>| .
521
        NTI($cgi->popup_menu('-name' => 'employee', '-default' => $form->{"employee"},
521
        NTI($cgi->popup_menu('-name' => 'employee_id', '-default' => $form->{"employee_id"},
522 522
                             '-values' => \@values, '-labels' => \%labels)) . qq|
523 523
      </td>
524 524
    </tr>|;
......
707 707

  
708 708
  if ($form->{type} eq 'sales_order') {
709 709
    if ($form->{selectemployee}) {
710
      $employee = qq|
711
    <input type=hidden name=customer_klass value=$form->{customer_klass}>
712
        $employees
713
|;
710
      $employee .= qq|
711
        <input type="hidden" name="customer_klass" value="$form->{customer_klass}">|;
714 712
    }
715 713
  } else {
716
    $employee = qq|
717
    <input type=hidden name=customer_klass value=$form->{customer_klass}>
718
        $employees
719
|;
714
    $employee .= qq|
715
      <input type="hidden" name="customer_klass" value="$form->{customer_klass}">|;
720 716
  }
721 717
  if ($form->{resubmit} && ($form->{format} eq "html")) {
722 718
    $onload =
......
821 817
	    <table>
822 818
	      $openclosed
823 819
	      $employee
824
        $salesman
820
        $salesmen
825 821
	      $ordnumber
826 822
	      <tr>
827 823
          <th width="70%" align="right" nowrap>| . $locale->text('Project Number') . qq|</th>

Auch abrufbar als: Unified diff