{ id => 'serialnr', width => 10, value => $locale->text('Serial No.'), display => 0, },
{ id => 'projectnr', width => 10, value => $locale->text('Project'), display => 0, },
{ id => 'sellprice', width => 15, value => $locale->text('Price'), display => !$is_delivery_order, },
- { id => 'sellprice_pg', width => 8, value => $locale->text('Pricegroup'), display => ($form->{type} =~ /^(sales_|invoice)/) && !$is_delivery_order, },
+ { id => 'sellprice_pg', width => 8, value => $locale->text('Pricegroup'), display => !$is_delivery_order && !$is_purchase, },
{ id => 'discount', width => 5, value => $locale->text('Discount'), display => !$is_delivery_order, },
{ id => 'linetotal', width => 10, value => $locale->text('Extended'), display => !$is_delivery_order, },
{ id => 'bin', width => 10, value => $locale->text('Bin'), display => 0, },
# for last row and report
# set pricegroup drop down list from report menu
if ($form->{"sellprice_$i"} != 0) {
+ # remember the pricegroup_id in pricegroup_old
+ # but don't overwrite it
$form->{"pricegroup_old_$i"} = $form->{"pricegroup_id_$i"};
my $default_option = $form->{"sellprice_$i"}.'--'.$form->{"pricegroup_id_$i"};
- $column_data{sellprice_pg} = NTI($cgi->popup_menu("sellpricepg_$i", [ $default_option ], $default_option, { $default_option => $form->{"pricegroup_$i"} || '' }));
+ $column_data{sellprice_pg} = NTI($cgi->popup_menu("sellprice_pg_$i", [ $default_option ], $default_option, { $default_option => $form->{"pricegroup_$i"} || '' }));
} else {
$column_data{sellprice_pg} = qq| |;
}
$form->{email} = $form->{shiptoemail} if $form->{shiptoemail} && $form->{formname} =~ /(pick|packing|bin)_list/;
- if ($form->{"cp_id"} && !$form->{"email"}) {
+ if ($form->{"cp_id"}) {
CT->get_contact(\%myconfig, $form);
- $form->{"email"} = $form->{"cp_email"};
+ $form->{"email"} = $form->{"cp_email"} if $form->{"cp_email"};
}
my $title = $locale->text('E-mail') . " " . $form->get_formname_translation();
&save();
$form->{formname} = $formname;
&edit();
+ $::lxdebug->leave_sub();
::end_of_request();
}