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/OE.pm
1001 1001
  my %oid = ('Pg'     => 'oid',
1002 1002
             'Oracle' => 'rowid');
1003 1003

  
1004
  my (@project_ids, %projectnumbers);
1004
  my (@project_ids, %projectnumbers, %projectdescriptions);
1005 1005

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

  
......
1033 1033
  }
1034 1034

  
1035 1035
  if (@project_ids) {
1036
    $query = "SELECT id, projectnumber FROM project WHERE id IN (" .
1036
    $query = "SELECT id, projectnumber, description FROM project WHERE id IN (" .
1037 1037
      join(", ", map("?", @project_ids)) . ")";
1038 1038
    $sth = prepare_execute_query($form, $dbh, $query, @project_ids);
1039 1039
    while (my $ref = $sth->fetchrow_hashref()) {
1040 1040
      $projectnumbers{$ref->{id}} = $ref->{projectnumber};
1041
      $projectdescriptions{$ref->{id}} = $ref->{description};
1041 1042
    }
1042 1043
    $sth->finish();
1043 1044
  }
1044 1045

  
1045 1046
  $form->{"globalprojectnumber"} = $projectnumbers{$form->{"globalproject_id"}};
1047
  $form->{"globalprojectdescription"} = $projectdescriptions{$form->{"globalproject_id"}};
1046 1048

  
1047 1049
  $form->{discount} = [];
1048 1050

  
......
1055 1057
    qw(runningnumber number description longdescription qty ship unit bin
1056 1058
       partnotes serialnumber reqdate sellprice listprice netprice
1057 1059
       discount p_discount discount_sub nodiscount_sub
1058
       linetotal  nodiscount_linetotal tax_rate projectnumber
1060
       linetotal  nodiscount_linetotal tax_rate projectnumber projectdescription
1059 1061
       price_factor price_factor_name partsgroup);
1060 1062

  
1061 1063
  push @arrays, map { "ic_cvar_$_->{name}" } @{ $ic_cvar_configs };
......
1163 1165
      push @{ $form->{TEMPLATE_ARRAYS}->{nodiscount_linetotal} }, $form->format_amount($myconfig, $nodiscount_linetotal, 2);
1164 1166

  
1165 1167
      push(@{ $form->{TEMPLATE_ARRAYS}->{projectnumber} }, $projectnumbers{$form->{"project_id_$i"}});
1168
      push(@{ $form->{TEMPLATE_ARRAYS}->{projectdescription} }, $projectdescriptions{$form->{"project_id_$i"}});
1166 1169

  
1167 1170
      my ($taxamount, $taxbase);
1168 1171
      my $taxrate = 0;

Auch abrufbar als: Unified diff