+ if ($form->{all_customer}) {
+ unless ($form->{customer_id}) {
+ $form->{customer_id} = $form->{all_customer}->[0]->{id};
+ }
+ }
+
+ IS->get_customer(\%myconfig, \%$form);
+ delete $form->{notes};
+ IS->retrieve_invoice(\%myconfig, \%$form);
+
+ $form->{oldlanguage_code} = $form->{language_code};
+
+ $form->get_partsgroup(\%myconfig, { language_code => $form->{language_code} });
+ if (@{ $form->{all_partsgroup} }) {
+ $form->{selectpartsgroup} = "<option>\n";
+ foreach $ref (@ { $form->{all_partsgroup} }) {
+ if ($ref->{translation}) {
+ $form->{selectpartsgroup} .= qq|<option value="$ref->{partsgroup}--$ref->{id}">$ref->{translation}\n|;
+ } else {
+ $form->{selectpartsgroup} .= qq|<option value="$ref->{partsgroup}--$ref->{id}">$ref->{partsgroup}\n|;
+ }
+ }
+ }
+
+ if (@{ $form->{all_projects} }) {
+ $form->{selectprojectnumber} = "<option>\n";
+ map { $form->{selectprojectnumber} .= qq|<option value="$_->{projectnumber}--$_->{id}">$_->{projectnumber}\n| } @{ $form->{all_projects} };
+ }
+