my %oid = ('Pg' => 'oid',
'Oracle' => 'rowid');
- my (@project_ids, %projectnumbers);
+ my (@project_ids, %projectnumbers, %projectdescriptions);
push(@project_ids, $form->{"globalproject_id"}) if ($form->{"globalproject_id"});
}
if (@project_ids) {
- $query = "SELECT id, projectnumber FROM project WHERE id IN (" .
+ $query = "SELECT id, projectnumber, description FROM project WHERE id IN (" .
join(", ", map("?", @project_ids)) . ")";
$sth = prepare_execute_query($form, $dbh, $query, @project_ids);
while (my $ref = $sth->fetchrow_hashref()) {
$projectnumbers{$ref->{id}} = $ref->{projectnumber};
+ $projectdescriptions{$ref->{id}} = $ref->{description};
}
$sth->finish();
}
$form->{"globalprojectnumber"} =
$projectnumbers{$form->{"globalproject_id"}};
+ $form->{"globalprojectdescription"} =
+ $projectdescriptions{$form->{"globalproject_id"}};
my $q_pg = qq|SELECT p.partnumber, p.description, p.unit, a.qty, pg.partsgroup
FROM assembly a
my @arrays =
qw(runningnumber number description longdescription qty unit
- partnotes serialnumber reqdate projectnumber
+ partnotes serialnumber reqdate projectnumber projectdescription
si_runningnumber si_number si_description
si_warehouse si_bin si_chargenumber si_bestbefore si_qty si_unit);
push @{ $form->{TEMPLATE_ARRAYS}{serialnumber} }, $form->{"serialnumber_$i"};
push @{ $form->{TEMPLATE_ARRAYS}{reqdate} }, $form->{"reqdate_$i"};
push @{ $form->{TEMPLATE_ARRAYS}{projectnumber} }, $projectnumbers{$form->{"project_id_$i"}};
+ push @{ $form->{TEMPLATE_ARRAYS}{projectdescription} },
+ $projectdescriptions{$form->{"project_id_$i"}};
if ($form->{"assembly_$i"}) {
$sameitem = "";
my $query = qq|SELECT date | . conv_dateq($form->{duedate}) . qq| - date | . conv_dateq($form->{invdate}) . qq| AS terms|;
($form->{terms}) = selectrow_query($form, $dbh, $query);
- my (@project_ids, %projectnumbers);
+ my (@project_ids, %projectnumbers, %projectdescriptions);
$form->{TEMPLATE_ARRAYS} = {};
push(@project_ids, $form->{"globalproject_id"}) if ($form->{"globalproject_id"});
}
if (@project_ids) {
- $query = "SELECT id, projectnumber FROM project WHERE id IN (" .
+ $query = "SELECT id, projectnumber, description FROM project WHERE id IN (" .
join(", ", map({ "?" } @project_ids)) . ")";
$sth = $dbh->prepare($query);
$sth->execute(@project_ids) ||
$form->dberror($query . " (" . join(", ", @project_ids) . ")");
while (my $ref = $sth->fetchrow_hashref()) {
$projectnumbers{$ref->{id}} = $ref->{projectnumber};
+ $projectdescriptions{$ref->{id}} = $ref->{description};
}
$sth->finish();
}
$form->{"globalprojectnumber"} =
$projectnumbers{$form->{"globalproject_id"}};
+ $form->{"globalprojectdescription"} =
+ $projectdescriptions{$form->{"globalproject_id"}};
my $tax = 0;
my $item;
deliverydate_oe ordnumber_oe transdate_oe licensenumber validuntil
partnotes serialnumber reqdate sellprice listprice netprice
discount p_discount discount_sub nodiscount_sub
- linetotal nodiscount_linetotal tax_rate projectnumber
+ linetotal nodiscount_linetotal tax_rate projectnumber projectdescription
price_factor price_factor_name partsgroup);
push @arrays, map { "ic_cvar_$_->{name}" } @{ $ic_cvar_configs };
push @{ $form->{TEMPLATE_ARRAYS}->{nodiscount_linetotal} }, $form->format_amount($myconfig, $nodiscount_linetotal, 2);
push(@{ $form->{TEMPLATE_ARRAYS}->{projectnumber} }, $projectnumbers{$form->{"project_id_$i"}});
+ push(@{ $form->{TEMPLATE_ARRAYS}->{projectdescription} }, $projectdescriptions{$form->{"project_id_$i"}});
@taxaccounts = split(/ /, $form->{"taxaccounts_$i"});
$taxrate = 0;
my %oid = ('Pg' => 'oid',
'Oracle' => 'rowid');
- my (@project_ids, %projectnumbers);
+ my (@project_ids, %projectnumbers, %projectdescriptions);
push(@project_ids, $form->{"globalproject_id"}) if ($form->{"globalproject_id"});
}
if (@project_ids) {
- $query = "SELECT id, projectnumber FROM project WHERE id IN (" .
+ $query = "SELECT id, projectnumber, description FROM project WHERE id IN (" .
join(", ", map("?", @project_ids)) . ")";
$sth = prepare_execute_query($form, $dbh, $query, @project_ids);
while (my $ref = $sth->fetchrow_hashref()) {
$projectnumbers{$ref->{id}} = $ref->{projectnumber};
+ $projectdescriptions{$ref->{id}} = $ref->{description};
}
$sth->finish();
}
$form->{"globalprojectnumber"} = $projectnumbers{$form->{"globalproject_id"}};
+ $form->{"globalprojectdescription"} = $projectdescriptions{$form->{"globalproject_id"}};
$form->{discount} = [];
qw(runningnumber number description longdescription qty ship unit bin
partnotes serialnumber reqdate sellprice listprice netprice
discount p_discount discount_sub nodiscount_sub
- linetotal nodiscount_linetotal tax_rate projectnumber
+ linetotal nodiscount_linetotal tax_rate projectnumber projectdescription
price_factor price_factor_name partsgroup);
push @arrays, map { "ic_cvar_$_->{name}" } @{ $ic_cvar_configs };
push @{ $form->{TEMPLATE_ARRAYS}->{nodiscount_linetotal} }, $form->format_amount($myconfig, $nodiscount_linetotal, 2);
push(@{ $form->{TEMPLATE_ARRAYS}->{projectnumber} }, $projectnumbers{$form->{"project_id_$i"}});
+ push(@{ $form->{TEMPLATE_ARRAYS}->{projectdescription} }, $projectdescriptions{$form->{"project_id_$i"}});
my ($taxamount, $taxbase);
my $taxrate = 0;
<td><code>globalprojectnumber</code></td>
<td>Projektnummer des ganzen Beleges</td>
</tr>
+ <tr>
+ <td><code>globalprojectdescription</code></td>
+ <td>Projekbeschreibung des ganzen Beleges</td>
+ </tr>
<tr>
<td><code>intnotes</code></td>
<td>Interne Bemerkungen</td>
<td><code>projectnumber</code></td>
<td>Projektnummer</td>
</tr>
+ <tr>
+ <td><code>projectdescription</code></td>
+ <td>Projektbeschreibung</td>
+ </tr>
<tr>
<td><code>qty</code></td>
<td>Anzahl</td>