- push @{ $form->{runningnumber} }, $position;
- push @{ $form->{number} }, $form->{"partnumber_$i"};
- push @{ $form->{description} }, $form->{"description_$i"};
- push @{ $form->{longdescription} }, $form->{"longdescription_$i"};
- push @{ $form->{qty} }, $form->format_amount($myconfig, $form->{"qty_$i"});
- push @{ $form->{ship} }, $form->format_amount($myconfig, $form->{"ship_$i"});
- push @{ $form->{unit} }, $form->{"unit_$i"};
- push @{ $form->{bin} }, $form->{"bin_$i"};
- push @{ $form->{partnotes} }, $form->{"partnotes_$i"};
- push @{ $form->{serialnumber} }, $form->{"serialnumber_$i"};
- push @{ $form->{reqdate} }, $form->{"reqdate_$i"};
- push @{ $form->{sellprice} }, $form->{"sellprice_$i"};
- push @{ $form->{listprice} }, $form->{"listprice_$i"};
+ my $price_factor = $price_factors{$form->{"price_factor_id_$i"}} || { 'factor' => 1 };
+
+ push @{ $form->{runningnumber} }, $position;
+ push @{ $form->{number} }, $form->{"partnumber_$i"};
+ push @{ $form->{description} }, $form->{"description_$i"};
+ push @{ $form->{longdescription} }, $form->{"longdescription_$i"};
+ push @{ $form->{qty} }, $form->format_amount($myconfig, $form->{"qty_$i"});
+ push @{ $form->{ship} }, $form->format_amount($myconfig, $form->{"ship_$i"});
+ push @{ $form->{unit} }, $form->{"unit_$i"};
+ push @{ $form->{bin} }, $form->{"bin_$i"};
+ push @{ $form->{partnotes} }, $form->{"partnotes_$i"};
+ push @{ $form->{serialnumber} }, $form->{"serialnumber_$i"};
+ push @{ $form->{reqdate} }, $form->{"reqdate_$i"};
+ push @{ $form->{sellprice} }, $form->{"sellprice_$i"};
+ push @{ $form->{listprice} }, $form->{"listprice_$i"};
+ push @{ $form->{price_factor} }, $price_factor->{formatted_factor};
+ push @{ $form->{price_factor_name} }, $price_factor->{description};