+ if (@project_ids) {
+ $query = "SELECT id, projectnumber 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};
+ }
+ $sth->finish();
+ }
+
+ $form->{"globalprojectnumber"} =
+ $projectnumbers{$form->{"globalproject_id"}};
+
+ my @arrays =
+ 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);
+