Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision c6867c46

Von Bernd Blessmann vor mehr als 14 Jahren hinzugefügt

  • ID c6867c462780a8747912dc0aab701f43e39ef1cb
  • Vorgänger f24968aa
  • Nachfolger 4c6a0cbb

Projektbeschreibung als Variable in Vorlagen
(globalprojectdescription und projectdescription)

Unterschiede anzeigen:

SL/DO.pm
740 740
  my %oid = ('Pg'     => 'oid',
741 741
             'Oracle' => 'rowid');
742 742

  
743
  my (@project_ids, %projectnumbers);
743
  my (@project_ids, %projectnumbers, %projectdescriptions);
744 744

  
745 745
  push(@project_ids, $form->{"globalproject_id"}) if ($form->{"globalproject_id"});
746 746

  
......
755 755
  }
756 756

  
757 757
  if (@project_ids) {
758
    $query = "SELECT id, projectnumber FROM project WHERE id IN (" .
758
    $query = "SELECT id, projectnumber, description FROM project WHERE id IN (" .
759 759
      join(", ", map("?", @project_ids)) . ")";
760 760
    $sth = prepare_execute_query($form, $dbh, $query, @project_ids);
761 761
    while (my $ref = $sth->fetchrow_hashref()) {
762 762
      $projectnumbers{$ref->{id}} = $ref->{projectnumber};
763
      $projectdescriptions{$ref->{id}} = $ref->{description};
763 764
    }
764 765
    $sth->finish();
765 766
  }
766 767

  
767 768
  $form->{"globalprojectnumber"} =
768 769
    $projectnumbers{$form->{"globalproject_id"}};
770
  $form->{"globalprojectdescription"} =
771
      $projectdescriptions{$form->{"globalproject_id"}};
769 772

  
770 773
  my $q_pg     = qq|SELECT p.partnumber, p.description, p.unit, a.qty, pg.partsgroup
771 774
                    FROM assembly a
......
790 793

  
791 794
  my @arrays =
792 795
    qw(runningnumber number description longdescription qty unit
793
       partnotes serialnumber reqdate projectnumber
796
       partnotes serialnumber reqdate projectnumber projectdescription
794 797
       si_runningnumber si_number si_description
795 798
       si_warehouse si_bin si_chargenumber si_bestbefore si_qty si_unit);
796 799

  
......
832 835
    push @{ $form->{TEMPLATE_ARRAYS}{serialnumber} },    $form->{"serialnumber_$i"};
833 836
    push @{ $form->{TEMPLATE_ARRAYS}{reqdate} },         $form->{"reqdate_$i"};
834 837
    push @{ $form->{TEMPLATE_ARRAYS}{projectnumber} },   $projectnumbers{$form->{"project_id_$i"}};
838
    push @{ $form->{TEMPLATE_ARRAYS}{projectdescription} },
839
      $projectdescriptions{$form->{"project_id_$i"}};
835 840

  
836 841
    if ($form->{"assembly_$i"}) {
837 842
      $sameitem = "";

Auch abrufbar als: Unified diff