- if ($form->{type} =~ (/sales_quotation/) or (($form->{level} =~ /Sales/) and ($form->{type} =~ /invoice/)) or (($form->{level} eq undef) and ($form->{type} =~ /invoice/)) or ($form->{type} =~ /sales_order/)) {
-
- # get pricegroups for parts
- IS->get_pricegroups_for_parts(\%myconfig, \%$form);
+ if ( $form->{type} =~ (/sales_quotation/)
+ or (($form->{level} =~ /Sales/) and ($form->{type} =~ /invoice/))
+ or (($form->{level} eq undef) and ($form->{type} =~ /invoice/))
+ or ($form->{type} =~ /sales_order/)) {
+
+ # get pricegroups for parts
+ IS->get_pricegroups_for_parts(\%myconfig, \%$form);
+
+ # build up html code for prices_$i
+ set_pricegroup($form->{rowcount});