}
$form->{ordnumber} = $form->{invnumber};
+ $form->{old_employee_id} = $form->{employee_id};
+ $form->{old_salesman_id} = $form->{salesman_id};
+
map { delete $form->{$_} } qw(id printed emailed queued);
if ($form->{script} eq 'ir.pl' || $form->{type} eq 'request_quotation') {
$form->{title} = $locale->text('Add Purchase Order');
$form->{defaultcurrency} = $form->get_default_currency(\%myconfig);
+
+ if ($form->{old_employee_id}) {
+ $form->{employee_id} = $form->{old_employee_id};
+ }
+ if ($form->{old_salesman_id}) {
+ $form->{salesman_id} = $form->{old_salesman_id};
+ }
+
map { $form->{$_} =~ s/\"/"/g }
qw(ordnumber quonumber shippingpoint shipvia notes intnotes shiptoname
shiptostreet shiptozipcode shiptocity shiptocountry shiptocontact