if (@{ $form->{"all_$form->{vc}"} }) {
$form->{ $form->{vc} } =
qq|$form->{$form->{vc}}--$form->{"$form->{vc}_id"}|;
- map { $form->{"select$form->{vc}"} .= "<option>$_->{name}--$_->{id}\n" }
+ map { $form->{"select$form->{vc}"} .=
+"<option>$_->{name}--$_->{id}</option>\n" }
(@{ $form->{"all_$form->{vc}"} });
}
$form->{defaultcurrency} = $curr[0];
$form->{currency} = $form->{defaultcurrency} unless $form->{currency};
- map { $form->{selectcurrency} .= "<option>$_\n" } @curr;
+ map { $form->{selectcurrency} .= "<option>$_</option>\n" } @curr;
$form->{taxincluded} = $taxincluded if ($form->{id});
map {
$form->{selectdepartment} .=
- "<option>$_->{description}--$_->{id}\n"
+ "<option>$_->{description}--$_->{id}</option>\n"
} (@{ $form->{all_departments} });
}
# sales staff
if (@{ $form->{all_employees} }) {
$form->{selectemployee} = "";
- map { $form->{selectemployee} .= "<option>$_->{name}--$_->{id}\n" }
+ map { $form->{selectemployee} .= "<option>$_->{name}--$_->{id}</option>\n" }
(@{ $form->{all_employees} });
}
#quote select[customer|vendor] Bug 133
$form->{"select$form->{vc}"} = $form->quote($form->{"select$form->{vc}"});
+ #substitute \n and \r to \s (bug 543)
+ $form->{"select$form->{vc}"} =~ s/[\n\r]/ /g;
+
my @old_project_ids = ($form->{"globalproject_id"});
map({ push(@old_project_ids, $form->{"project_id_$_"})
if ($form->{"project_id_$_"}); } (1..$form->{"rowcount"}));
$form->all_vc(\%myconfig, $form->{vc},
($form->{vc} eq 'customer') ? "AR" : "AP");
- map { $vc .= "<option>$_->{name}--$_->{id}\n" }
+ map { $vc .= "<option>$_->{name}--$_->{id}</option>\n" }
@{ $form->{"all_$form->{vc}"} };
$vclabel = ucfirst $form->{vc};
$vc =
($vc)
- ? qq|<select name=$form->{vc}><option>\n$vc</select>|
+ ? qq|<select name=$form->{vc}><option>\n$vc</option></select>|
: qq|<input name=$form->{vc} size=35>|;
# departments
map {
$form->{selectdepartment} .=
- "<option>$_->{description}--$_->{id}\n"
+ "<option>$_->{description}--$_->{id}</option>\n"
} (@{ $form->{all_departments} });
}
<table>
<tr>
<th align=right>$vclabel</th>
- <td colspan=3>$vc</td>
+ <td colspan="3">$vc</td>
</tr>
$department
<tr>