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/IS.pm
64 64
  my $query = qq|SELECT date | . conv_dateq($form->{duedate}) . qq| - date | . conv_dateq($form->{invdate}) . qq| AS terms|;
65 65
  ($form->{terms}) = selectrow_query($form, $dbh, $query);
66 66

  
67
  my (@project_ids, %projectnumbers);
67
  my (@project_ids, %projectnumbers, %projectdescriptions);
68 68
  $form->{TEMPLATE_ARRAYS} = {};
69 69

  
70 70
  push(@project_ids, $form->{"globalproject_id"}) if ($form->{"globalproject_id"});
......
89 89
  }
90 90

  
91 91
  if (@project_ids) {
92
    $query = "SELECT id, projectnumber FROM project WHERE id IN (" .
92
    $query = "SELECT id, projectnumber, description FROM project WHERE id IN (" .
93 93
      join(", ", map({ "?" } @project_ids)) . ")";
94 94
    $sth = $dbh->prepare($query);
95 95
    $sth->execute(@project_ids) ||
96 96
      $form->dberror($query . " (" . join(", ", @project_ids) . ")");
97 97
    while (my $ref = $sth->fetchrow_hashref()) {
98 98
      $projectnumbers{$ref->{id}} = $ref->{projectnumber};
99
      $projectdescriptions{$ref->{id}} = $ref->{description};
99 100
    }
100 101
    $sth->finish();
101 102
  }
102 103

  
103 104
  $form->{"globalprojectnumber"} =
104 105
    $projectnumbers{$form->{"globalproject_id"}};
106
  $form->{"globalprojectdescription"} =
107
    $projectdescriptions{$form->{"globalproject_id"}};
105 108

  
106 109
  my $tax = 0;
107 110
  my $item;
......
147 150
       deliverydate_oe ordnumber_oe transdate_oe licensenumber validuntil
148 151
       partnotes serialnumber reqdate sellprice listprice netprice
149 152
       discount p_discount discount_sub nodiscount_sub
150
       linetotal  nodiscount_linetotal tax_rate projectnumber
153
       linetotal  nodiscount_linetotal tax_rate projectnumber projectdescription
151 154
       price_factor price_factor_name partsgroup);
152 155

  
153 156
  push @arrays, map { "ic_cvar_$_->{name}" } @{ $ic_cvar_configs };
......
274 277
      push @{ $form->{TEMPLATE_ARRAYS}->{nodiscount_linetotal} }, $form->format_amount($myconfig, $nodiscount_linetotal, 2);
275 278

  
276 279
      push(@{ $form->{TEMPLATE_ARRAYS}->{projectnumber} }, $projectnumbers{$form->{"project_id_$i"}});
280
      push(@{ $form->{TEMPLATE_ARRAYS}->{projectdescription} }, $projectdescriptions{$form->{"project_id_$i"}});
277 281

  
278 282
      @taxaccounts = split(/ /, $form->{"taxaccounts_$i"});
279 283
      $taxrate     = 0;

Auch abrufbar als: Unified diff